get_photo


Description:

[ CCode ( array_length_pos = 1.5 , array_length_type = "gsize" ) ]
[ Version ( since = "0.8.0" ) ]
public uint8[] get_photo (ContactsService service, out string content_type, Cancellable? cancellable = null) throws Error

Downloads and returns the contact's photo, if they have one.

If the contact doesn't have a photo (i.e. get_photo_etag returns null), null is returned, but no error is set in throws.

If cancellable is not null, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error g_io_error_cancelled will be returned.

If there is an error getting the photo, a gdata_service_error_protocol_error error will be returned.

Parameters:

this

a ContactsContact

service

a ContactsService

content_type

return location for the image's content type, or null; free with g_free

cancellable

optional Cancellable object, or null

length

return location for the image length, in bytes

Returns:

the image data, or null; free with g_free