aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-04-21 06:43:41 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-04-22 18:21:14 +0800
commit65ed272fef1016fff3403024e3417491ecf30015 (patch)
tree23cb0dabcc28a0d8b7155230462831f8894317a0 /libempathy/empathy-contact.c
parenta5356f9c7ea9979f05a6752a848d944a9ed7264d (diff)
downloadgsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar.gz
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar.bz2
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar.lz
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar.xz
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.tar.zst
gsoc2013-empathy-65ed272fef1016fff3403024e3417491ecf30015.zip
Add empathy_contact_new_static() to create a contact that comes from logs
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r--libempathy/empathy-contact.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 813982b27..27f3ff9c2 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -388,6 +388,23 @@ empathy_contact_new (TpContact *tp_contact)
NULL);
}
+EmpathyContact *
+empathy_contact_new_static (McAccount *account,
+ const gchar *id,
+ const gchar *name,
+ gboolean is_user)
+{
+ g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
+ g_return_val_if_fail (id != NULL, NULL);
+
+ return g_object_new (EMPATHY_TYPE_CONTACT,
+ "account", account,
+ "id", id,
+ "name", name,
+ "is-user", is_user,
+ NULL);
+}
+
TpContact *
empathy_contact_get_tp_contact (EmpathyContact *contact)
{