]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-utils.c
Merge call branch from Elliot Fairweather with cleanups from Xavier Claessens.
[empathy.git] / libempathy / empathy-utils.c
index c810f9cca509d237cc5dfd0cceaaaabbe9d1444e..8c6edafc5ce37f3a04d37163f02b3c587ec82abc 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "empathy-debug.h"
 #include "empathy-utils.h"
+#include "empathy-contact-factory.h"
 #include "empathy-contact-manager.h"
 #include "empathy-tp-group.h"
 
@@ -397,7 +398,7 @@ empathy_inspect_handle (McAccount *account,
 }
 
 void
-empathy_call_contact (EmpathyContact *contact)
+empathy_call_with_contact (EmpathyContact *contact)
 {
 #ifdef HAVE_VOIP
        MissionControl *mc;
@@ -455,6 +456,21 @@ empathy_call_contact (EmpathyContact *contact)
 #endif
 }
 
+void
+empathy_call_with_contact_id (McAccount *account, const gchar *contact_id)
+{
+#ifdef HAVE_VOIP
+       EmpathyContactFactory *factory;
+       EmpathyContact        *contact;
+
+       factory = empathy_contact_factory_new ();
+       contact = empathy_contact_factory_get_from_id (factory, account, contact_id);
+       empathy_call_with_contact (contact);
+       g_object_unref (contact);
+       g_object_unref (factory);
+#endif
+}
+
 void
 empathy_chat_with_contact (EmpathyContact  *contact)
 {
@@ -485,7 +501,6 @@ empathy_chat_with_contact_id (McAccount *account, const gchar *contact_id)
        g_object_unref (mc);
 }
 
-
 const gchar *
 empathy_presence_get_default_message (McPresence presence)
 {