]> git.0d.be Git - empathy.git/commitdiff
TplContact has been renamed to TplEntity
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 16 Jun 2010 11:24:33 +0000 (13:24 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 18 Jun 2010 15:18:03 +0000 (17:18 +0200)
libempathy/empathy-contact.c
libempathy/empathy-contact.h
libempathy/empathy-message.c

index bd8a63efafe5aa332c2d349bccc7ec3c57938e70..7530730fc1fd7737507dd9a0b6cb3ab8a161a4ce 100644 (file)
@@ -482,25 +482,25 @@ empathy_contact_new (TpContact *tp_contact)
 #ifdef ENABLE_TPL
 EmpathyContact *
 empathy_contact_from_tpl_contact (TpAccount *account,
-    TplContact *tpl_contact)
+    TplEntity *tpl_entity)
 {
   EmpathyContact *retval;
   gboolean is_user;
 
-  g_return_val_if_fail (TPL_IS_CONTACT (tpl_contact), NULL);
+  g_return_val_if_fail (TPL_IS_ENTITY (tpl_entity), NULL);
 
-  is_user = (TPL_CONTACT_USER == tpl_contact_get_contact_type (tpl_contact));
+  is_user = (TPL_ENTITY_SELF == tpl_entity_get_entity_type (tpl_entity));
 
   retval = g_object_new (EMPATHY_TYPE_CONTACT,
-      "id", tpl_contact_get_alias (tpl_contact),
-      "name", tpl_contact_get_identifier (tpl_contact),
+      "id", tpl_entity_get_alias (tpl_entity),
+      "name", tpl_entity_get_identifier (tpl_entity),
       "account", account,
       "is-user", is_user,
       NULL);
 
-  if (!EMP_STR_EMPTY (tpl_contact_get_avatar_token (tpl_contact)))
+  if (!EMP_STR_EMPTY (tpl_entity_get_avatar_token (tpl_entity)))
     empathy_contact_load_avatar_cache (retval,
-        tpl_contact_get_avatar_token (tpl_contact));
+        tpl_entity_get_avatar_token (tpl_entity));
 
   return retval;
 }
index 568ecd53734b98a86e341fbb9cbe3c78751d8bc5..69c215ad40a2892ca94efd9029864a92bfeb11dc 100644 (file)
@@ -27,7 +27,7 @@
 #include <telepathy-glib/contact.h>
 #include <telepathy-glib/account.h>
 #ifdef ENABLE_TPL
-#include <telepathy-logger/contact.h>
+#include <telepathy-logger/entity.h>
 #endif /* ENABLE_TPL */
 
 G_BEGIN_DECLS
@@ -75,7 +75,7 @@ GType empathy_contact_get_type (void) G_GNUC_CONST;
 EmpathyContact * empathy_contact_new (TpContact *tp_contact);
 #ifdef ENABLE_TPL
 EmpathyContact * empathy_contact_from_tpl_contact (TpAccount *account,
-    TplContact *tpl_contact);
+    TplEntity *tpl_contact);
 #endif /* ENABLE_TPL */
 EmpathyContact * empathy_contact_new_for_log (TpAccount *account,
     const gchar *id, const gchar *name, gboolean is_user);
index 11a926a423fe0dde3453ccf0df88f2bee293b031..ab9e95d375a24a9d065f30e7e7ada18682837ae5 100644 (file)
@@ -31,7 +31,7 @@
 #include <telepathy-glib/account.h>
 #include <telepathy-glib/account-manager.h>
 
-#include <telepathy-logger/contact.h>
+#include <telepathy-logger/entity.h>
 #include <telepathy-logger/entry.h>
 #include <telepathy-logger/entry-text.h>
 #endif /* ENABLE_TPL */
@@ -267,8 +267,8 @@ empathy_message_from_tpl_log_entry (TplEntry *logentry)
        EmpathyMessage *retval = NULL;
        TpAccountManager *acc_man = NULL;
        TpAccount *account = NULL;
-       TplContact *receiver = NULL;
-       TplContact *sender = NULL;
+       TplEntity *receiver = NULL;
+       TplEntity *sender = NULL;
        gchar *body= NULL;
 
        g_return_val_if_fail (TPL_IS_ENTRY (logentry), NULL);
@@ -279,7 +279,7 @@ empathy_message_from_tpl_log_entry (TplEntry *logentry)
         * When #610455 will be fixed, calling tp_account_manager_ensure_account ()
         * might add a not existing account to the AM. tp_account_new () probably
         * will be the best way to handle it.
-        * Note: When creating an EmpathyContact from a TplContact instance, the
+        * Note: When creating an EmpathyContact from a TplEntity instance, the
         * TpAccount is passed *only* to let EmpathyContact be able to retrieve the
         * avatar (contact_get_avatar_filename () need a TpAccount).
         * If the way EmpathyContact stores the avatar is changes, it might not be