]> git.0d.be Git - empathy.git/blob - python/pyempathy/pyempathy.override
Completely reworked ContactList API. Fixes bug #471611, bug #467280, bug #459540...
[empathy.git] / python / pyempathy / pyempathy.override
1 %%
2 headers
3 #include <Python.h>
4 #include <pygobject.h>
5 #include "empathy-avatar.h"
6 #include "empathy-chandler.h"
7 #include "empathy-chatroom-manager.h"
8 #include "empathy-chatroom.h"
9 #include "empathy-conf.h"
10 #include "empathy-contact-list.h"
11 #include "empathy-contact-manager.h"
12 #include "empathy-contact.h"
13 #include "empathy-debug.h"
14 #include "empathy-filter.h"
15 #include "empathy-idle.h"
16 #include "empathy-log-manager.h"
17 #include "empathy-message.h"
18 #include "empathy-presence.h"
19 #include "empathy-time.h"
20 #include "empathy-tp-chat.h"
21 #include "empathy-tp-chatroom.h"
22 #include "empathy-tp-contact-list.h"
23 #include "empathy-tp-group.h"
24 #include "empathy-tp-roomlist.h"
25 #include "empathy-utils.h"
26 #include "empathy-contact-factory.h"
27 #include "empathy-enum-types.h"
28
29 void empathy_add_constants(PyObject *module, const gchar *strip_prefix);
30 void empathy_register_classes(PyObject *d);
31
32 %%
33 modulename empathy
34 %%
35 ignore-glob
36         *_get_type
37 %%
38 import gobject.GObject as PyGObject_Type
39 %%
40 override empathy_contact_list_get_members kwargs
41 static PyObject *
42 _wrap_empathy_contact_list_get_members(PyGObject *self, PyObject *args, PyObject *kwargs)
43 {
44
45         PyObject *py_contacts = PyList_New(0);
46         GList *l, *contacts;
47
48         contacts = empathy_contact_list_get_members(EMPATHY_CONTACT_LIST(self->obj));
49
50         for (l = contacts; l; l = l->next) {
51                 EmpathyContact *contact;
52                 contact = l->data;
53                 PyList_Append(py_contacts, pygobject_new((GObject *) contact));
54         }
55
56         return py_contacts;
57
58 }
59 %%