ShellTpClient

ShellTpClient

Synopsis

void                (*ShellGetSelfContactFeaturesCb)    (TpConnection *connection,
                                                         TpContact *contact);
void                (*ShellGetTpContactCb)              (TpConnection *connection,
                                                         GList *contacts,
                                                         TpHandle *failed);
void                (*ShellTpClientApproveChannelsImpl) (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         TpChannelDispatchOperation *dispatch_operation,
                                                         TpAddDispatchOperationContext *context,
                                                         gpointer user_data);
struct              ShellTpClientClass;
void                (*ShellTpClientContactListChangedImpl)
                                                        (TpConnection *connection,
                                                         GPtrArray *added,
                                                         GPtrArray *removed,
                                                         gpointer user_data);
void                (*ShellTpClientHandleChannelsImpl)  (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         GList *requests_satisfied,
                                                         gint64 user_action_time,
                                                         TpHandleChannelsContext *context,
                                                         gpointer user_data);
void                (*ShellTpClientObserveChannelsImpl) (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         TpChannelDispatchOperation *dispatch_operation,
                                                         GList *requests,
                                                         TpObserveChannelsContext *context,
                                                         gpointer user_data);
void                shell_decline_dispatch_op           (TpAddDispatchOperationContext *context,
                                                         const gchar *message);
void                shell_get_contact_events            (TplLogManager *log_manager,
                                                         TpAccount *account,
                                                         TplEntity *entity,
                                                         guint num_events,
                                                         GAsyncReadyCallback callback);
void                shell_get_self_contact_features     (TpConnection *self,
                                                         guint n_features,
                                                         const TpContactFeature *features,
                                                         ShellGetSelfContactFeaturesCb callback);
void                shell_get_tp_contacts               (TpConnection *self,
                                                         guint n_handles,
                                                         const TpHandle *handles,
                                                         guint n_features,
                                                         const TpContactFeature *features,
                                                         ShellGetTpContactCb callback);
void                shell_tp_client_grab_contact_list_changed
                                                        (ShellTpClient *self,
                                                         TpConnection *conn);
void                shell_tp_client_set_approve_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientApproveChannelsImpl approve_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);
void                shell_tp_client_set_contact_list_changed_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientContactListChangedImpl contact_list_changed_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);
void                shell_tp_client_set_handle_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientHandleChannelsImpl handle_channels_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);
void                shell_tp_client_set_observe_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientObserveChannelsImpl observe_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);

Description

Details

ShellGetSelfContactFeaturesCb ()

void                (*ShellGetSelfContactFeaturesCb)    (TpConnection *connection,
                                                         TpContact *contact);

ShellGetTpContactCb ()

void                (*ShellGetTpContactCb)              (TpConnection *connection,
                                                         GList *contacts,
                                                         TpHandle *failed);

connection :

The connection

contacts :

List of contacts. [element-type TelepathyGLib.Contact]

failed :

Array of failed contacts

ShellTpClientApproveChannelsImpl ()

void                (*ShellTpClientApproveChannelsImpl) (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         TpChannelDispatchOperation *dispatch_operation,
                                                         TpAddDispatchOperationContext *context,
                                                         gpointer user_data);

Signature of the implementation of the AddDispatchOperation method.

client :

a ShellTpClient instance

account :

a TpAccount having TP_ACCOUNT_FEATURE_CORE prepared if possible

connection :

a TpConnection having TP_CONNECTION_FEATURE_CORE prepared if possible

channels :

a GList of TpChannel, all having TP_CHANNEL_FEATURE_CORE prepared if possible. [element-type TelepathyGLib.Channel]

dispatch_operation :

a TpChannelDispatchOperation or NULL; the dispatch_operation is not guaranteed to be prepared. [allow-none]

context :

a TpAddDispatchOperationContext representing the context of this D-Bus call

struct ShellTpClientClass

struct ShellTpClientClass {
};

ShellTpClientContactListChangedImpl ()

void                (*ShellTpClientContactListChangedImpl)
                                                        (TpConnection *connection,
                                                         GPtrArray *added,
                                                         GPtrArray *removed,
                                                         gpointer user_data);

Signature of the implementation of the ContactListChanged method.

connection :

a TpConnection having TP_CONNECTION_FEATURE_CORE prepared if possible

added :

a GPtrArray of added TpContact. [element-type TelepathyGLib.Contact]

removed :

a GPtrArray of removed TpContact. [element-type TelepathyGLib.Contact]

ShellTpClientHandleChannelsImpl ()

void                (*ShellTpClientHandleChannelsImpl)  (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         GList *requests_satisfied,
                                                         gint64 user_action_time,
                                                         TpHandleChannelsContext *context,
                                                         gpointer user_data);

Signature of the implementation of the HandleChannels method.

client :

a ShellTpClient instance

account :

a TpAccount having TP_ACCOUNT_FEATURE_CORE prepared if possible

connection :

a TpConnection having TP_CONNECTION_FEATURE_CORE prepared if possible

channels :

a GList of TpChannel, all having TP_CHANNEL_FEATURE_CORE prepared if possible. [element-type TelepathyGLib.Channel]

requests_satisfied :

a GList of TpChannelRequest having their object-path defined but are not guaranteed to be prepared. [element-type TelepathyGLib.ChannelRequest]

user_action_time :

the time at which user action occurred, or one of the special values TP_USER_ACTION_TIME_NOT_USER_ACTION or TP_USER_ACTION_TIME_CURRENT_TIME (see "user-action-time" for details)

context :

a TpHandleChannelsContext representing the context of this D-Bus call

ShellTpClientObserveChannelsImpl ()

void                (*ShellTpClientObserveChannelsImpl) (ShellTpClient *client,
                                                         TpAccount *account,
                                                         TpConnection *connection,
                                                         GList *channels,
                                                         TpChannelDispatchOperation *dispatch_operation,
                                                         GList *requests,
                                                         TpObserveChannelsContext *context,
                                                         gpointer user_data);

Signature of the implementation of the ObserveChannels method.

client :

a ShellTpClient instance

account :

a TpAccount having TP_ACCOUNT_FEATURE_CORE prepared if possible

connection :

a TpConnection having TP_CONNECTION_FEATURE_CORE prepared if possible

channels :

a GList of TpChannel, all having TP_CHANNEL_FEATURE_CORE prepared if possible. [element-type TelepathyGLib.Channel]

dispatch_operation :

a TpChannelDispatchOperation or NULL; the dispatch_operation is not guaranteed to be prepared. [allow-none]

requests :

a GList of TpChannelRequest, all having their object-path defined but are not guaranteed to be prepared. [element-type TelepathyGLib.ChannelRequest]

context :

a TpObserveChannelsContext representing the context of this D-Bus call

shell_decline_dispatch_op ()

void                shell_decline_dispatch_op           (TpAddDispatchOperationContext *context,
                                                         const gchar *message);

shell_get_contact_events ()

void                shell_get_contact_events            (TplLogManager *log_manager,
                                                         TpAccount *account,
                                                         TplEntity *entity,
                                                         guint num_events,
                                                         GAsyncReadyCallback callback);

Wrap tpl_log_manager_get_filtered_events_async because gjs cannot support multiple callbacks in the same function call.

log_manager :

A TplLogManager

account :

A TpAccount

entity :

A TplEntity

num_events :

The number of events to retrieve

callback :

User callback to run when the contact is ready. [scope async]

shell_get_self_contact_features ()

void                shell_get_self_contact_features     (TpConnection *self,
                                                         guint n_features,
                                                         const TpContactFeature *features,
                                                         ShellGetSelfContactFeaturesCb callback);

Wrap tp_connection_upgrade_contacts due to the lack of support for proper arrays arguments in GJS.

self :

A connection, which must be ready

n_features :

Number of features in features

features :

Array of features. [array length=n_features][allow-none][element-type uint]

callback :

User callback to run when the contact is ready. [scope async]

shell_get_tp_contacts ()

void                shell_get_tp_contacts               (TpConnection *self,
                                                         guint n_handles,
                                                         const TpHandle *handles,
                                                         guint n_features,
                                                         const TpContactFeature *features,
                                                         ShellGetTpContactCb callback);

Wrap tp_connection_get_contacts_by_handle so we can transform the array into a null-terminated one, which gjs can handle. We send the original callback to tp_connection_get_contacts_by_handle as user_data, and we have our own function as callback, which does the transforming.

self :

A connection, which must be ready

n_handles :

Number of handles in handles

handles :

Array of handles. [array length=n_handles][element-type uint]

n_features :

Number of features in features

features :

Array of features. [array length=n_features][allow-none][element-type uint]

callback :

User callback to run when the contacts are ready. [scope async]

shell_tp_client_grab_contact_list_changed ()

void                shell_tp_client_grab_contact_list_changed
                                                        (ShellTpClient *self,
                                                         TpConnection *conn);

shell_tp_client_set_approve_channels_func ()

void                shell_tp_client_set_approve_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientApproveChannelsImpl approve_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);

shell_tp_client_set_contact_list_changed_func ()

void                shell_tp_client_set_contact_list_changed_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientContactListChangedImpl contact_list_changed_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);

shell_tp_client_set_handle_channels_func ()

void                shell_tp_client_set_handle_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientHandleChannelsImpl handle_channels_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);

shell_tp_client_set_observe_channels_func ()

void                shell_tp_client_set_observe_channels_func
                                                        (ShellTpClient *self,
                                                         ShellTpClientObserveChannelsImpl observe_impl,
                                                         gpointer user_data,
                                                         GDestroyNotify destroy);