McdConnection

McdConnection — Connection class representing Telepathy connection class

Stability Level

Unstable, unless otherwise indicated

Synopsis


#include <mcd-connection.h>


                    McdConnection;
McdConnection*      mcd_connection_new                  (TpDBusDaemon *dbus_daemon,
                                                         const gchar *bus_name,
                                                         TpConnectionManager *tp_conn_mgr,
                                                         McAccount *account,
                                                         McdPresenceFrame *presence_frame,
                                                         McdDispatcher *dispatcher);
McAccount*          mcd_connection_get_account          (McdConnection *connection);
TpConnectionStatus  mcd_connection_get_connection_status
                                                        (McdConnection *connection);
gboolean            mcd_connection_request_channel      (McdConnection *connection,
                                                         const struct mcd_channel_request *req,
                                                         GError **error);
gboolean            mcd_connection_cancel_channel_request
                                                        (McdConnection *connection,
                                                         guint operation_id,
                                                         const gchar *requestor_client_id,
                                                         GError **error);
gboolean            mcd_connection_get_telepathy_details
                                                        (McdConnection *id,
                                                         gchar **ret_servname,
                                                         gchar **ret_objpath);
gboolean            mcd_connection_remote_avatar_changed
                                                        (McdConnection *connection,
                                                         guint contact_id,
                                                         const gchar *token);
void                mcd_connection_account_changed      (McdConnection *connection);
void                mcd_connection_close                (McdConnection *connection);

Object Hierarchy


  GObject
   +----McdMission
         +----McdOperation
               +----McdConnection

Properties


  "account"                  McAccount             : Read / Write / Construct Only
  "bus-name"                 gchararray            : Read / Write / Construct Only
  "dbus-daemon"              TpDBusDaemon          : Read / Write / Construct Only
  "dispatcher"               McdDispatcher         : Read / Write / Construct Only
  "presence-frame"           McdPresenceFrame      : Read / Write / Construct Only
  "tp-connection"            TpConnection          : Read
  "tp-manager"               TpConnectionManager   : Read / Write / Construct Only

Description

FIXME

Details

McdConnection

typedef struct _McdConnection McdConnection;


mcd_connection_new ()

McdConnection*      mcd_connection_new                  (TpDBusDaemon *dbus_daemon,
                                                         const gchar *bus_name,
                                                         TpConnectionManager *tp_conn_mgr,
                                                         McAccount *account,
                                                         McdPresenceFrame *presence_frame,
                                                         McdDispatcher *dispatcher);

dbus_daemon :
bus_name :
tp_conn_mgr :
account :
presence_frame :
dispatcher :
Returns :

mcd_connection_get_account ()

McAccount*          mcd_connection_get_account          (McdConnection *connection);

connection :
Returns :

mcd_connection_get_connection_status ()

TpConnectionStatus  mcd_connection_get_connection_status
                                                        (McdConnection *connection);

connection :
Returns :

mcd_connection_request_channel ()

gboolean            mcd_connection_request_channel      (McdConnection *connection,
                                                         const struct mcd_channel_request *req,
                                                         GError **error);

connection :
req :
error :
Returns :

mcd_connection_cancel_channel_request ()

gboolean            mcd_connection_cancel_channel_request
                                                        (McdConnection *connection,
                                                         guint operation_id,
                                                         const gchar *requestor_client_id,
                                                         GError **error);

connection :
operation_id :
requestor_client_id :
error :
Returns :

mcd_connection_get_telepathy_details ()

gboolean            mcd_connection_get_telepathy_details
                                                        (McdConnection *id,
                                                         gchar **ret_servname,
                                                         gchar **ret_objpath);

id :
ret_servname :
ret_objpath :
Returns :

mcd_connection_remote_avatar_changed ()

gboolean            mcd_connection_remote_avatar_changed
                                                        (McdConnection *connection,
                                                         guint contact_id,
                                                         const gchar *token);

This function is to be called when Telepathy signals that our own avatar has been updated. It takes care of checking if the remote avatar has to be retrieved and stored in the account.

connection : the McdConnection.
contact_id : the own contact id in Telepathy.
token : the new avatar token.
Returns : TRUE if the local avatar has been updated.

mcd_connection_account_changed ()

void                mcd_connection_account_changed      (McdConnection *connection);

This function must be called when the account this connection refers to is modified. Note: ideally, this should be a private method and the connection should monitor the account itself; but since the monitoring is already done by McdMaster for all accounts, it seemed more convenient to let it call this function whenever needed.

connection : the McdConnection.

mcd_connection_close ()

void                mcd_connection_close                (McdConnection *connection);

connection :

Property Details

The "account" property

  "account"                  McAccount             : Read / Write / Construct Only

Account that will be used to create this connection.


The "bus-name" property

  "bus-name"                 gchararray            : Read / Write / Construct Only

DBus Bus name to use by us.

Default value: NULL


The "dbus-daemon" property

  "dbus-daemon"              TpDBusDaemon          : Read / Write / Construct Only

DBus daemon.


The "dispatcher" property

  "dispatcher"               McdDispatcher         : Read / Write / Construct Only

Dispatcher to dispatch channels.


The "presence-frame" property

  "presence-frame"           McdPresenceFrame      : Read / Write / Construct Only

Presence frame Object used by connections to update presence.


The "tp-connection" property

  "tp-connection"            TpConnection          : Read

Telepathy Connection Object which this connection uses.


The "tp-manager" property

  "tp-manager"               TpConnectionManager   : Read / Write / Construct Only

Telepathy Manager Object which this connection uses.