]> git.0d.be Git - empathy.git/commitdiff
Python binding for empathy_dispatcher_chat_with_contact_id: Take the
authorXavier Claessens <xclaesse@src.gnome.org>
Tue, 10 Jun 2008 15:01:04 +0000 (15:01 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 10 Jun 2008 15:01:04 +0000 (15:01 +0000)
account id instead of the McAccount object since there is no binding for
libmissioncontrol-client.

svn path=/trunk/; revision=1157

python/pyempathy/pyempathy.override

index 169f375adb17644c4f5ad95bd68cf9132ca695a3..333ae53174ef5152f460f169327350c86260c469 100644 (file)
@@ -61,3 +61,24 @@ _wrap_empathy_contact_list_get_members(PyGObject *self, PyObject *args, PyObject
 
 }
 %%
+override empathy_dispatcher_chat_with_contact_id kwargs
+static PyObject *
+_wrap_empathy_dispatcher_chat_with_contact_id(PyObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "account_id", "contact_id", NULL };
+    char *account_id, *contact_id;
+    McAccount *account;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ss:dispatcher_chat_with_contact_id", kwlist, &account_id, &contact_id))
+        return NULL;
+
+    account = mc_account_lookup (account_id);
+    if (account) {
+        empathy_dispatcher_chat_with_contact_id(account, contact_id);
+        g_object_unref (account);
+    }
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+%%