ConnectionContactsByIdCb


Description:

[ CCode ( instance_pos = 5.9 ) ]
[ Version ( since = "0.7.18" ) ]
public delegate void ConnectionContactsByIdCb (Connection connection, Contact[] contacts, string[] requested_ids, HashTable<string,Error> failed_id_errors, Error error, Object weak_object)

Signature of a callback used to receive the result of get_contacts_by_id.

requested_ids contains the IDs that were converted to handles successfully. The normalized form of requested_ids[i] is tp_contact_get_identifier (contacts[i]).

If some or even all of the ids passed to get_contacts_by_id were not valid, this is not considered to be a fatal error. error will be null in this situation, contacts will contain contact objects for those IDs that were valid (it may be empty), and failed_id_errors will map the IDs that were not valid to a corresponding Error (if the connection manager complies with the Telepathy spec, it will have domain Error and code INVALID_HANDLE).

If an unrecoverable error occurs (for instance, if connection becomes disconnected) the whole operation fails, and no contacts or requested IDs are returned. failed_id_errors will contain all the IDs that were requested, mapped to a corresponding Error (either one indicating that the ID was invalid, if that was determined before the fatal error occurred, or a copy of error).

Parameters:

connection

The connection

contacts

An array of contacts.length TpContact objects (this callback is not given a reference to any of these objects, and must call @ref on any that it will keep), or null on unrecoverable errors

requested_ids

An array of contacts.length valid IDs (JIDs, SIP URIs etc.) that were passed to get_contacts_by_id, in an order corresponding to contacts, or null on unrecoverable errors

failed_id_errors

A hash table in which the keys are IDs and the values are errors (#GError)

error

null on success, or an unrecoverable error that caused everything to fail

weak_object

the weak_object that was passed to get_contacts_by_id

n_contacts

The number of TpContact objects successfully created (one per valid ID), or 0 on unrecoverable errors

user_data

the user_data that was passed to get_contacts_by_id


Namespace: TelepathyGLib
Package: telepathy-glib