aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-07 17:54:54 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-08 15:13:07 +0800
commitc33d6ea84ba4a11c63f840b659d0568b3a0331d8 (patch)
tree20a90a4920e90e9bdb840a94c6a561c462da0e5e
parent9b8c6a150ac947fed91166505d6b198b0a073f77 (diff)
downloadgsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar.gz
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar.bz2
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar.lz
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar.xz
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.tar.zst
gsoc2013-empathy-c33d6ea84ba4a11c63f840b659d0568b3a0331d8.zip
tp-contact-factory: remove unused methods
https://bugzilla.gnome.org/show_bug.cgi?id=675597
-rw-r--r--libempathy/empathy-tp-contact-factory.c145
-rw-r--r--libempathy/empathy-tp-contact-factory.h32
2 files changed, 0 insertions, 177 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index 111e3190a..63a1cedeb 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -36,8 +36,6 @@ static TpContactFeature contact_features[] = {
};
typedef union {
- EmpathyTpContactFactoryContactsByIdCb ids_cb;
- EmpathyTpContactFactoryContactsByHandleCb handles_cb;
EmpathyTpContactFactoryContactCb contact_cb;
} GetContactsCb;
@@ -61,89 +59,6 @@ get_contacts_data_free (gpointer user_data)
g_slice_free (GetContactsData, data);
}
-static EmpathyContact **
-contacts_array_new (guint n_contacts,
- TpContact * const * contacts)
-{
- EmpathyContact **ret;
- guint i;
-
- ret = g_new0 (EmpathyContact *, n_contacts);
- for (i = 0; i < n_contacts; i++) {
- ret[i] = empathy_contact_dup_from_tp_contact (contacts[i]);
- }
-
- return ret;
-}
-
-static void
-contacts_array_free (guint n_contacts,
- EmpathyContact **contacts)
-{
- guint i;
-
- for (i = 0; i < n_contacts; i++) {
- g_object_unref (contacts[i]);
- }
- g_free (contacts);
-}
-
-static void
-get_contacts_by_id_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- const gchar * const *requested_ids,
- GHashTable *failed_id_errors,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- GetContactsData *data = user_data;
- EmpathyContact **empathy_contacts;
-
- empathy_contacts = contacts_array_new (n_contacts, contacts);
- if (data->callback.ids_cb) {
- data->callback.ids_cb (data->connection,
- n_contacts, empathy_contacts,
- requested_ids,
- failed_id_errors,
- error,
- data->user_data, weak_object);
- }
-
- contacts_array_free (n_contacts, empathy_contacts);
-}
-
-/* The callback is NOT given a reference to the EmpathyContact objects */
-void
-empathy_tp_contact_factory_get_from_ids (TpConnection *connection,
- guint n_ids,
- const gchar * const *ids,
- EmpathyTpContactFactoryContactsByIdCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object)
-{
- GetContactsData *data;
-
- g_return_if_fail (TP_IS_CONNECTION (connection));
- g_return_if_fail (ids != NULL);
-
- data = g_slice_new (GetContactsData);
- data->callback.ids_cb = callback;
- data->user_data = user_data;
- data->destroy = destroy;
- data->connection = g_object_ref (connection);
- tp_connection_get_contacts_by_id (connection,
- n_ids, ids,
- G_N_ELEMENTS (contact_features),
- contact_features,
- get_contacts_by_id_cb,
- data,
- (GDestroyNotify) get_contacts_data_free,
- weak_object);
-}
-
static void
get_contact_by_id_cb (TpConnection *connection,
guint n_contacts,
@@ -213,66 +128,6 @@ empathy_tp_contact_factory_get_from_id (TpConnection *connection,
weak_object);
}
-static void
-get_contacts_by_handle_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- guint n_failed,
- const TpHandle *failed,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- GetContactsData *data = user_data;
- EmpathyContact **empathy_contacts;
-
- empathy_contacts = contacts_array_new (n_contacts, contacts);
- if (data->callback.handles_cb) {
- data->callback.handles_cb (data->connection,
- n_contacts, empathy_contacts,
- n_failed, failed,
- error,
- data->user_data, weak_object);
- }
-
- contacts_array_free (n_contacts, empathy_contacts);
-}
-
-/* The callback is NOT given a reference to the EmpathyContact objects */
-void
-empathy_tp_contact_factory_get_from_handles (TpConnection *connection,
- guint n_handles,
- const TpHandle *handles,
- EmpathyTpContactFactoryContactsByHandleCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object)
-{
- GetContactsData *data;
-
- if (n_handles == 0) {
- callback (connection, 0, NULL, 0, NULL, NULL, user_data, weak_object);
- return;
- }
-
- g_return_if_fail (TP_IS_CONNECTION (connection));
- g_return_if_fail (handles != NULL);
-
- data = g_slice_new (GetContactsData);
- data->callback.handles_cb = callback;
- data->user_data = user_data;
- data->destroy = destroy;
- data->connection = g_object_ref (connection);
- tp_connection_get_contacts_by_handle (connection,
- n_handles, handles,
- G_N_ELEMENTS (contact_features),
- contact_features,
- get_contacts_by_handle_cb,
- data,
- (GDestroyNotify) get_contacts_data_free,
- weak_object);
-}
-
/* The callback is NOT given a reference to the EmpathyContact objects */
static void
get_contact_by_handle_cb (TpConnection *connection,
diff --git a/libempathy/empathy-tp-contact-factory.h b/libempathy/empathy-tp-contact-factory.h
index 29146cb32..20d699a3e 100644
--- a/libempathy/empathy-tp-contact-factory.h
+++ b/libempathy/empathy-tp-contact-factory.h
@@ -30,44 +30,12 @@
G_BEGIN_DECLS
-typedef void (*EmpathyTpContactFactoryContactsByIdCb) (TpConnection *connection,
- guint n_contacts,
- EmpathyContact * const * contacts,
- const gchar * const * requested_ids,
- GHashTable *failed_id_errors,
- const GError *error,
- gpointer user_data,
- GObject *weak_object);
-
-typedef void (*EmpathyTpContactFactoryContactsByHandleCb) (TpConnection *connection,
- guint n_contacts,
- EmpathyContact * const * contacts,
- guint n_failed,
- const TpHandle *failed,
- const GError *error,
- gpointer user_data,
- GObject *weak_object);
-
typedef void (*EmpathyTpContactFactoryContactCb) (TpConnection *connection,
EmpathyContact *contact,
const GError *error,
gpointer user_data,
GObject *weak_object);
-void empathy_tp_contact_factory_get_from_ids (TpConnection *connection,
- guint n_ids,
- const gchar * const *ids,
- EmpathyTpContactFactoryContactsByIdCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object);
-void empathy_tp_contact_factory_get_from_handles (TpConnection *connection,
- guint n_handles,
- const TpHandle *handles,
- EmpathyTpContactFactoryContactsByHandleCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object);
void empathy_tp_contact_factory_get_from_id (TpConnection *connection,
const gchar *id,
EmpathyTpContactFactoryContactCb callback,