Implement a Telepathy Approver and Handler (#643594)
As the Shell does more than observing channels (users can interact with them), it has to be an Handler as well. We have to make sure that all the new incoming text channels are handled by the Shell by default, so we make it an Approver as well. From an user point of view, the only difference is that Empathy's tray icon will stop blicking when receiving new channels. We rely on ChannelDispatcher.DelegateChannels() and PresentChannel() to interact with Empathy. Those methods have been implemented in telepathy-mission-control 5.9.0 and telepathy-glib 0.15.0.
This commit is contained in:
@ -51,13 +51,40 @@ typedef void (*ShellTpClientObserveChannelsImpl) (ShellTpClient *client,
|
||||
TpObserveChannelsContext *context,
|
||||
gpointer user_data);
|
||||
|
||||
ShellTpClient * shell_tp_client_new (TpDBusDaemon *dbus);
|
||||
|
||||
void shell_tp_client_set_observe_channels_func (ShellTpClient *self,
|
||||
ShellTpClientObserveChannelsImpl observe_impl,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
typedef void (*ShellTpClientApproveChannelsImpl) (
|
||||
ShellTpClient *client,
|
||||
TpAccount *account,
|
||||
TpConnection *connection,
|
||||
GList *channels,
|
||||
TpChannelDispatchOperation *dispatch_operation,
|
||||
TpAddDispatchOperationContext *context,
|
||||
gpointer user_data);
|
||||
|
||||
void shell_tp_client_set_approve_channels_func (ShellTpClient *self,
|
||||
ShellTpClientApproveChannelsImpl approve_impl,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
typedef void (*ShellTpClientHandleChannelsImpl) (
|
||||
ShellTpClient *client,
|
||||
TpAccount *account,
|
||||
TpConnection *connection,
|
||||
GList *channels,
|
||||
GList *requests_satisfied,
|
||||
gint64 user_action_time,
|
||||
TpHandleChannelsContext *context,
|
||||
gpointer user_data);
|
||||
|
||||
void shell_tp_client_set_handle_channels_func (ShellTpClient *self,
|
||||
ShellTpClientHandleChannelsImpl handle_channels_impl,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
/* Telepathy utility functions */
|
||||
typedef void (*ShellGetTpContactCb) (TpConnection *connection,
|
||||
GList *contacts,
|
||||
|
Reference in New Issue
Block a user