[telepathy-mission-control/master] McdAccount: Compat: remove old channel-requesting API (no longer used)

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Apr 2 12:09:52 PDT 2009


---
 src/mcd-account-compat.c |  121 ----------------------------------------------
 src/mcd-account-compat.h |   13 -----
 src/mcd-master.h         |    2 -
 3 files changed, 0 insertions(+), 136 deletions(-)

diff --git a/src/mcd-account-compat.c b/src/mcd-account-compat.c
index dba4733..7f3cb70 100644
--- a/src/mcd-account-compat.c
+++ b/src/mcd-account-compat.c
@@ -202,127 +202,6 @@ account_compat_iface_init (McSvcAccountInterfaceCompatClass *iface,
 #undef IMPLEMENT
 }
 
-static void
-process_channel_request (McdAccount *account, gpointer userdata,
-			 const GError *error)
-{
-    McdChannel *channel = MCD_CHANNEL (userdata);
-    McdConnection *connection;
-
-    if (error)
-    {
-        g_warning ("%s: got error: %s", G_STRFUNC, error->message);
-        /* TODO: report the error to the requestor process */
-        g_object_unref (channel);
-        return;
-    }
-    DEBUG ("called");
-    connection = mcd_account_get_connection (account);
-    g_return_if_fail (connection != NULL);
-    g_return_if_fail (mcd_connection_get_connection_status (connection)
-                      == TP_CONNECTION_STATUS_CONNECTED);
-
-    mcd_connection_request_channel (connection, channel);
-}
-
-static void
-on_channel_status_changed (McdChannel *channel, McdChannelStatus status,
-                           McdAccount *account)
-{
-    McdAccountCompatReq *req_data;
-
-    DEBUG ("%u", status);
-    g_return_if_fail (MCD_IS_ACCOUNT (account));
-
-    if (status == MCD_CHANNEL_STATUS_FAILED &&
-        (req_data = g_object_get_data ((GObject *)channel, COMPAT_REQ_DATA))
-        != NULL)
-    {
-        const GError *error;
-        McdMaster *master;
-
-        master = mcd_master_get_default ();
-        g_return_if_fail (MCD_IS_SERVICE (master));
-
-        error = mcd_channel_get_error (channel);
-        g_signal_emit_by_name (master, "mcd-error",
-                               req_data->requestor_serial,
-                               req_data->requestor_client_id, error->code);
-    }
-    else if (status == MCD_CHANNEL_STATUS_DISPATCHED)
-    {
-        /* we don't need the request data anymore */
-        g_object_set_data ((GObject *)channel, COMPAT_REQ_DATA, NULL);
-    }
-}
-
-static void
-compat_req_data_free (McdAccountCompatReq *req)
-{
-    g_free (req->requestor_client_id);
-    g_slice_free (McdAccountCompatReq, req);
-}
-
-gboolean
-_mcd_account_compat_request_channel_nmc4 (McdAccount *account,
-                                          const struct mcd_channel_request *req,
-                                          GError **error)
-{
-    McdChannel *channel;
-    McdAccountCompatReq *req_data;
-    GHashTable *properties;
-    GValue *value;
-    McdDispatcher *dispatcher;
-
-    properties = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                        NULL,
-                                        (GDestroyNotify)tp_g_value_slice_free);
-
-    value = tp_g_value_slice_new (G_TYPE_STRING);
-    g_value_set_string (value, req->channel_type);
-    g_hash_table_insert (properties, TP_IFACE_CHANNEL ".ChannelType", value);
-
-    if (req->channel_handle_string)
-    {
-        value = tp_g_value_slice_new (G_TYPE_STRING);
-        g_value_set_string (value, req->channel_handle_string);
-        g_hash_table_insert (properties, TP_IFACE_CHANNEL ".TargetID", value);
-    }
-
-    if (req->channel_handle)
-    {
-        value = tp_g_value_slice_new (G_TYPE_UINT);
-        g_value_set_uint (value, req->channel_handle);
-        g_hash_table_insert (properties, TP_IFACE_CHANNEL ".TargetHandle",
-                             value);
-    }
-
-    value = tp_g_value_slice_new (G_TYPE_UINT);
-    g_value_set_uint (value, req->channel_handle_type);
-    g_hash_table_insert (properties, TP_IFACE_CHANNEL ".TargetHandleType",
-                         value);
-
-    channel = mcd_channel_new_request (properties, 0, NULL);
-    g_hash_table_unref (properties);
-
-    dispatcher = mcd_master_get_dispatcher (mcd_master_get_default ());
-    _mcd_dispatcher_add_request (dispatcher, account, channel);
-
-    req_data = g_slice_new0 (McdAccountCompatReq);
-    req_data->requestor_serial = req->requestor_serial;
-    req_data->requestor_client_id = g_strdup (req->requestor_client_id);
-    g_object_set_data_full ((GObject *)channel, COMPAT_REQ_DATA,
-                            req_data, (GDestroyNotify)compat_req_data_free);
-
-    g_signal_connect (channel, "status-changed",
-                      G_CALLBACK (on_channel_status_changed), account);
-
-    return _mcd_account_online_request (account,
-                                        process_channel_request,
-                                        channel,
-                                        error);
-}
-
 /**
  * mcd_account_compat_get_profile:
  * @account: the #McdAccount.
diff --git a/src/mcd-account-compat.h b/src/mcd-account-compat.h
index c18b4cc..6603e68 100644
--- a/src/mcd-account-compat.h
+++ b/src/mcd-account-compat.h
@@ -39,22 +39,9 @@ extern const McdDBusProp account_compat_properties[];
 void account_compat_iface_init (McSvcAccountInterfaceCompatClass *iface,
 				     gpointer iface_data);
 
-struct mcd_channel_request
-{
-    const gchar *account_name;
-    const gchar *channel_type;
-    guint channel_handle;
-    const gchar *channel_handle_string;
-    gint channel_handle_type;
-    guint requestor_serial;
-    gchar *requestor_client_id;
-};
-
 McProfile *mcd_account_compat_get_mc_profile (McdAccount *account);
 
 /* not exported */
-gboolean _mcd_account_compat_request_channel_nmc4 (McdAccount *account,
-    const struct mcd_channel_request *req, GError **error);
 G_GNUC_INTERNAL
 inline void _mcd_account_compat_class_init (McdAccountClass *klass);
 
diff --git a/src/mcd-master.h b/src/mcd-master.h
index bf60b63..2e7bba7 100644
--- a/src/mcd-master.h
+++ b/src/mcd-master.h
@@ -63,8 +63,6 @@ struct _McdMasterClass
     void (*_mc_reserved6) (void);
 };
 
-struct mcd_channel_request;
-
 GType mcd_master_get_type (void);
 #define mcd_master_new()    mcd_master_get_default()
 McdMaster *mcd_master_get_default (void);
-- 
1.5.6.5




More information about the telepathy-commits mailing list