]> git.0d.be Git - empathy.git/commitdiff
Update python binding
authorXavier Claessens <xclaesse@gmail.com>
Tue, 3 Mar 2009 21:55:52 +0000 (22:55 +0100)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 22 Apr 2009 10:21:13 +0000 (12:21 +0200)
python/pyempathy/pyempathy.defs
python/pyempathy/pyempathy.override
python/pyempathygtk/pyempathygtk.defs
python/update-binding.sh

index 09849b986d40a031d0e5c2dbbf6219d603b82b93..3e9fd624c146d10ec31ef0f7d8d4871aa2fc6394 100644 (file)
   (gtype-id "EMPATHY_TYPE_CONTACT")
 )
 
-(define-object ContactFactory
-  (in-module "Empathy")
-  (parent "GObject")
-  (c-name "EmpathyContactFactory")
-  (gtype-id "EMPATHY_TYPE_CONTACT_FACTORY")
-)
-
 (define-interface ContactList
   (in-module "Empathy")
   (c-name "EmpathyContactList")
   (gtype-id "EMPATHY_TYPE_TP_FILE")
 )
 
-(define-object TpGroup
-  (in-module "Empathy")
-  (parent "GObject")
-  (c-name "EmpathyTpGroup")
-  (gtype-id "EMPATHY_TYPE_TP_GROUP")
-)
-
 (define-object TpRoomlist
   (in-module "Empathy")
   (parent "GObject")
   )
 )
 
-(define-flags ContactReady
-  (in-module "Empathy")
-  (c-name "EmpathyContactReady")
-  (gtype-id "EMPATHY_TYPE_CONTACT_READY")
-  (values
-    '("none" "EMPATHY_CONTACT_READY_NONE")
-    '("id" "EMPATHY_CONTACT_READY_ID")
-    '("handle" "EMPATHY_CONTACT_READY_HANDLE")
-    '("name" "EMPATHY_CONTACT_READY_NAME")
-    '("all" "EMPATHY_CONTACT_READY_ALL")
-  )
-)
-
 (define-flags DebugFlags
   (in-module "Empathy")
   (c-name "EmpathyDebugFlags")
   (return-type "int")
 )
 
+(define-method get_account
+  (of-object "EmpathyAccountManager")
+  (c-name "empathy_account_manager_get_account")
+  (return-type "McAccount*")
+  (parameters
+    '("TpConnection*" "connection")
+  )
+)
+
+(define-method dup_accounts
+  (of-object "EmpathyAccountManager")
+  (c-name "empathy_account_manager_dup_accounts")
+  (return-type "GList*")
+)
+
+(define-method get_connection
+  (of-object "EmpathyAccountManager")
+  (c-name "empathy_account_manager_get_connection")
+  (return-type "TpConnection*")
+  (parameters
+    '("McAccount*" "account")
+  )
+)
+
+(define-method dup_connections
+  (of-object "EmpathyAccountManager")
+  (c-name "empathy_account_manager_dup_connections")
+  (return-type "GList*")
+)
+
 
 
 ;; From empathy-chatroom.h
   (is-constructor-of "EmpathyContact")
   (return-type "EmpathyContact*")
   (parameters
-    '("McAccount*" "account")
+    '("TpContact*" "tp_contact")
   )
 )
 
-(define-function contact_new_full
-  (c-name "empathy_contact_new_full")
-  (return-type "EmpathyContact*")
-  (parameters
-    '("McAccount*" "account")
-    '("const-gchar*" "id")
-    '("const-gchar*" "name")
-  )
+(define-method get_tp_contact
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_get_tp_contact")
+  (return-type "TpContact*")
 )
 
 (define-method get_id
   (return-type "McAccount*")
 )
 
-(define-method set_account
+(define-method get_connection
   (of-object "EmpathyContact")
-  (c-name "empathy_contact_set_account")
-  (return-type "none")
-  (parameters
-    '("McAccount*" "account")
-  )
+  (c-name "empathy_contact_get_connection")
+  (return-type "TpConnection*")
 )
 
 (define-method get_presence
   )
 )
 
-(define-method get_ready
-  (of-object "EmpathyContact")
-  (c-name "empathy_contact_get_ready")
-  (return-type "EmpathyContactReady")
-)
-
 (define-method is_user
   (of-object "EmpathyContact")
   (c-name "empathy_contact_is_user")
   (return-type "gboolean")
 )
 
-(define-function contact_equal
-  (c-name "empathy_contact_equal")
-  (return-type "gboolean")
-  (parameters
-    '("gconstpointer" "v1")
-    '("gconstpointer" "v2")
-  )
-)
-
 (define-function contact_hash
   (c-name "empathy_contact_hash")
   (return-type "guint")
   )
 )
 
-(define-method call_when_ready
-  (of-object "EmpathyContact")
-  (c-name "empathy_contact_call_when_ready")
-  (return-type "none")
-  (parameters
-    '("EmpathyContactReady" "ready")
-    '("EmpathyContactReadyCb*" "callback")
-    '("gpointer" "user_data")
-    '("GDestroyNotify" "destroy")
-    '("GObject*" "weak_object")
-  )
-)
-
-(define-method run_until_ready
-  (of-object "EmpathyContact")
-  (c-name "empathy_contact_run_until_ready")
-  (return-type "none")
-  (parameters
-    '("EmpathyContactReady" "ready")
-    '("GMainLoop**" "loop")
-  )
-)
-
 (define-method load_avatar_data
   (of-object "EmpathyContact")
   (c-name "empathy_contact_load_avatar_data")
 
 
 
-;; From empathy-contact-factory.h
-
-(define-function contact_factory_get_type
-  (c-name "empathy_contact_factory_get_type")
-  (return-type "GType")
-)
-
-(define-function contact_factory_dup_singleton
-  (c-name "empathy_contact_factory_dup_singleton")
-  (return-type "EmpathyContactFactory*")
-)
-
-(define-method get_tp_factory
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_get_tp_factory")
-  (return-type "EmpathyTpContactFactory*")
-  (parameters
-    '("McAccount*" "account")
-  )
-)
-
-(define-method get_user
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_get_user")
-  (return-type "EmpathyContact*")
-  (parameters
-    '("McAccount*" "account")
-  )
-)
-
-(define-method get_from_id
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_get_from_id")
-  (return-type "EmpathyContact*")
-  (parameters
-    '("McAccount*" "account")
-    '("const-gchar*" "id")
-  )
-)
-
-(define-method get_from_handle
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_get_from_handle")
-  (return-type "EmpathyContact*")
-  (parameters
-    '("McAccount*" "account")
-    '("guint" "handle")
-  )
-)
-
-(define-method get_from_handles
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_get_from_handles")
-  (return-type "GList*")
-  (parameters
-    '("McAccount*" "account")
-    '("const-GArray*" "handles")
-  )
-)
-
-(define-method set_alias
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_set_alias")
-  (return-type "none")
-  (parameters
-    '("EmpathyContact*" "contact")
-    '("const-gchar*" "alias")
-  )
-)
-
-(define-method set_avatar
-  (of-object "EmpathyContactFactory")
-  (c-name "empathy_contact_factory_set_avatar")
-  (return-type "none")
-  (parameters
-    '("McAccount*" "account")
-    '("const-gchar*" "data")
-    '("gsize" "size")
-    '("const-gchar*" "mime_type")
-  )
-)
-
-
-
 ;; From empathy-contact-groups.h
 
 (define-function contact_groups_get_all
   (c-name "empathy_contact_manager_get_list")
   (return-type "EmpathyTpContactList*")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
   )
 )
 
   (c-name "empathy_contact_manager_can_add")
   (return-type "gboolean")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
   )
 )
 
   (c-name "empathy_dispatcher_create_channel")
   (return-type "none")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
     '("GHashTable*" "request")
     '("EmpathyDispatcherRequestCb*" "callback")
     '("gpointer" "user_data")
   )
 )
 
-(define-function dispatcher_call_with_contact
-  (c-name "empathy_dispatcher_call_with_contact")
-  (return-type "none")
-  (parameters
-    '("EmpathyContact*" "contact")
-    '("EmpathyDispatcherRequestCb*" "callback")
-    '("gpointer" "user_data")
-  )
-)
-
 (define-function dispatcher_chat_with_contact_id
   (c-name "empathy_dispatcher_chat_with_contact_id")
   (return-type "none")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
     '("const-gchar*" "contact_id")
     '("EmpathyDispatcherRequestCb*" "callback")
     '("gpointer" "user_data")
   (c-name "empathy_dispatcher_join_muc")
   (return-type "none")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
     '("const-gchar*" "roomname")
     '("EmpathyDispatcherRequestCb*" "callback")
     '("gpointer" "user_data")
   (c-name "empathy_dispatcher_find_channel_class")
   (return-type "GStrv")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
     '("const-gchar*" "channel_type")
     '("guint" "handle_type")
   )
   (return-type "EmpathyContact*")
 )
 
-(define-method get_account
-  (of-object "EmpathyTpChat")
-  (c-name "empathy_tp_chat_get_account")
-  (return-type "McAccount*")
-)
-
 (define-method get_channel
   (of-object "EmpathyTpChat")
   (c-name "empathy_tp_chat_get_channel")
   (return-type "TpChannel*")
 )
 
-(define-method is_ready
+(define-method get_connection
   (of-object "EmpathyTpChat")
-  (c-name "empathy_tp_chat_is_ready")
-  (return-type "gboolean")
+  (c-name "empathy_tp_chat_get_connection")
+  (return-type "TpConnection*")
 )
 
-(define-method get_members_count
+(define-method is_ready
   (of-object "EmpathyTpChat")
-  (c-name "empathy_tp_chat_get_members_count")
-  (return-type "guint")
+  (c-name "empathy_tp_chat_is_ready")
+  (return-type "gboolean")
 )
 
 (define-method send
   (return-type "GType")
 )
 
-(define-function tp_contact_factory_new
-  (c-name "empathy_tp_contact_factory_new")
-  (is-constructor-of "EmpathyTpContactFactory")
+(define-function tp_contact_factory_dup_singleton
+  (c-name "empathy_tp_contact_factory_dup_singleton")
   (return-type "EmpathyTpContactFactory*")
   (parameters
-    '("McAccount*" "account")
-  )
-)
-
-(define-method get_user
-  (of-object "EmpathyTpContactFactory")
-  (c-name "empathy_tp_contact_factory_get_user")
-  (return-type "EmpathyContact*")
-)
-
-(define-method get_from_id
-  (of-object "EmpathyTpContactFactory")
-  (c-name "empathy_tp_contact_factory_get_from_id")
-  (return-type "EmpathyContact*")
-  (parameters
-    '("const-gchar*" "id")
+    '("TpConnection*" "connection")
   )
 )
 
-(define-method get_from_handle
+(define-method get_from_ids
   (of-object "EmpathyTpContactFactory")
-  (c-name "empathy_tp_contact_factory_get_from_handle")
-  (return-type "EmpathyContact*")
+  (c-name "empathy_tp_contact_factory_get_from_ids")
+  (return-type "none")
   (parameters
-    '("guint" "handle")
+    '("guint" "n_ids")
+    '("const-gchar*-const*" "ids")
+    '("EmpathyTpContactFactoryGotContactsCb" "callback")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "destroy")
+    '("GObject*" "weak_object")
   )
 )
 
 (define-method get_from_handles
   (of-object "EmpathyTpContactFactory")
   (c-name "empathy_tp_contact_factory_get_from_handles")
-  (return-type "GList*")
+  (return-type "none")
   (parameters
-    '("const-GArray*" "handles")
+    '("guint" "n_handles")
+    '("const-TpHandle*" "handles")
+    '("EmpathyTpContactFactoryGotContactsCb" "callback")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "destroy")
+    '("GObject*" "weak_object")
   )
 )
 
   )
 )
 
-(define-method is_ready
-  (of-object "EmpathyTpContactFactory")
-  (c-name "empathy_tp_contact_factory_is_ready")
-  (return-type "gboolean")
-)
-
 
 
 ;; From empathy-tp-contact-list.h
   (is-constructor-of "EmpathyTpContactList")
   (return-type "EmpathyTpContactList*")
   (parameters
-    '("McAccount*" "account")
+    '("TpConnection*" "connection")
   )
 )
 
-(define-method get_account
+(define-method get_connection
   (of-object "EmpathyTpContactList")
-  (c-name "empathy_tp_contact_list_get_account")
-  (return-type "McAccount*")
+  (c-name "empathy_tp_contact_list_get_connection")
+  (return-type "TpConnection*")
 )
 
 (define-method can_add
   (return-type "gboolean")
 )
 
+(define-method remove_all
+  (of-object "EmpathyTpContactList")
+  (c-name "empathy_tp_contact_list_remove_all")
+  (return-type "none")
+)
+
 
 
 ;; From empathy-tp-file.h
   (return-type "const-gchar*")
 )
 
-
-
-;; From empathy-tp-group.h
-
-(define-function tp_group_get_type
-  (c-name "empathy_tp_group_get_type")
-  (return-type "GType")
-)
-
-(define-function tp_group_new
-  (c-name "empathy_tp_group_new")
-  (is-constructor-of "EmpathyTpGroup")
-  (return-type "EmpathyTpGroup*")
-  (parameters
-    '("TpChannel*" "channel")
-  )
-)
-
-(define-method close
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_close")
-  (return-type "none")
-)
-
-(define-method add_members
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_add_members")
-  (return-type "none")
-  (parameters
-    '("GList*" "contacts")
-    '("const-gchar*" "message")
-  )
-)
-
-(define-method add_member
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_add_member")
-  (return-type "none")
-  (parameters
-    '("EmpathyContact*" "contact")
-    '("const-gchar*" "message")
-  )
-)
-
-(define-method remove_members
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_remove_members")
-  (return-type "none")
-  (parameters
-    '("GList*" "contacts")
-    '("const-gchar*" "message")
-  )
-)
-
-(define-method remove_member
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_remove_member")
-  (return-type "none")
-  (parameters
-    '("EmpathyContact*" "contact")
-    '("const-gchar*" "message")
-  )
-)
-
-(define-method get_members
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_members")
-  (return-type "GList*")
-)
-
-(define-method get_local_pendings
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_local_pendings")
-  (return-type "GList*")
-)
-
-(define-method get_remote_pendings
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_remote_pendings")
-  (return-type "GList*")
-)
-
-(define-method get_name
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_name")
-  (return-type "const-gchar*")
-)
-
-(define-method get_self_contact
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_self_contact")
-  (return-type "EmpathyContact*")
-)
-
-(define-method is_member
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_is_member")
-  (return-type "gboolean")
-  (parameters
-    '("EmpathyContact*" "contact")
-  )
-)
-
 (define-method is_ready
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_is_ready")
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_is_ready")
   (return-type "gboolean")
 )
 
-(define-method get_invitation
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_invitation")
-  (return-type "EmpathyPendingInfo*")
-  (parameters
-    '("EmpathyContact**" "remote_contact")
-  )
-)
-
-(define-function pending_info_new
-  (c-name "empathy_pending_info_new")
-  (is-constructor-of "EmpathyPendingInfo")
-  (return-type "EmpathyPendingInfo*")
-  (parameters
-    '("EmpathyContact*" "member")
-    '("EmpathyContact*" "actor")
-    '("const-gchar*" "message")
-  )
-)
-
-(define-method free
-  (of-object "EmpathyPendingInfo")
-  (c-name "empathy_pending_info_free")
-  (return-type "none")
-)
-
-(define-method get_flags
-  (of-object "EmpathyTpGroup")
-  (c-name "empathy_tp_group_get_flags")
-  (return-type "TpChannelGroupFlags")
-)
-
 
 
 ;; From empathy-tp-roomlist.h
   )
 )
 
-(define-function run_until_ready
-  (c-name "empathy_run_until_ready")
-  (return-type "none")
-  (parameters
-    '("gpointer" "object")
-  )
-)
-
-(define-function run_until_ready_full
-  (c-name "empathy_run_until_ready_full")
-  (return-type "none")
-  (parameters
-    '("gpointer" "object")
-    '("const-gchar*" "signal")
-    '("EmpathyRunUntilReadyFunc" "func")
-    '("gpointer" "user_data")
-    '("GMainLoop**" "loop")
-  )
-)
-
-(define-function channel_get_account
-  (c-name "empathy_channel_get_account")
-  (return-type "McAccount*")
-  (parameters
-    '("TpChannel*" "channel")
-  )
-)
-
 (define-function proxy_equal
   (c-name "empathy_proxy_equal")
   (return-type "gboolean")
index 72d7ccb0ee8a3da32bfdf252a18823a5b6ae1794..e4c99086c994ccb019b37348f18a93effcfeab66 100644 (file)
@@ -7,7 +7,6 @@ headers
 #include "empathy-chatroom.h"
 #include "empathy-chatroom-manager.h"
 #include "empathy-contact.h"
-#include "empathy-contact-factory.h"
 #include "empathy-contact-groups.h"
 #include "empathy-contact-list.h"
 #include "empathy-contact-manager.h"
@@ -29,7 +28,6 @@ headers
 #include "empathy-tp-contact-factory.h"
 #include "empathy-tp-contact-list.h"
 #include "empathy-tp-file.h"
-#include "empathy-tp-group.h"
 #include "empathy-tp-roomlist.h"
 #include "empathy-tp-tube.h"
 #include "empathy-tube-handler.h"
@@ -66,25 +64,3 @@ _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,
-          NULL, NULL);
-        g_object_unref (account);
-    }
-    
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-%%
index 1cb19f52744799441f1a515bbfd29bd1814aa3a9..01b65f7a1e39d8f7ede6123aeabf96a2e423774a 100644 (file)
   (return-type "McAccount*")
 )
 
+(define-method get_connection
+  (of-object "EmpathyAccountChooser")
+  (c-name "empathy_account_chooser_get_connection")
+  (return-type "TpConnection*")
+)
+
 (define-method set_account
   (of-object "EmpathyAccountChooser")
   (c-name "empathy_account_chooser_set_account")
   (return-type "EmpathyContact*")
 )
 
-(define-method get_members_count
-  (of-object "EmpathyChat")
-  (c-name "empathy_chat_get_members_count")
-  (return-type "guint")
-)
-
 (define-method get_contact_menu
   (of-object "EmpathyChat")
   (c-name "empathy_chat_get_contact_menu")
   (return-type "none")
   (parameters
     '("GtkWindow*" "parent")
-    '("gboolean" "edit")
-    '("gboolean" "is_user")
+  )
+)
+
+(define-method edit_dialog_show
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_edit_dialog_show")
+  (return-type "none")
+  (parameters
+    '("GtkWindow*" "parent")
+  )
+)
+
+(define-function contact_personal_dialog_show
+  (c-name "empathy_contact_personal_dialog_show")
+  (return-type "none")
+  (parameters
+    '("GtkWindow*" "parent")
   )
 )
 
index 19c8f10b0b5487f9d29faa07140aee940cb6354f..16a879faf215141b25a0defd7039ae2d3da7d88e 100755 (executable)
@@ -11,7 +11,6 @@ python /usr/share/pygobject/2.0/codegen/h2def.py      \
        empathy-call-factory.h                  \
        empathy-call-handler.h                  \
        empathy-contact.h                       \
-       empathy-contact-factory.h               \
        empathy-contact-groups.h                \
        empathy-contact-list.h                  \
        empathy-contact-manager.h               \
@@ -34,7 +33,6 @@ python /usr/share/pygobject/2.0/codegen/h2def.py      \
        empathy-tp-contact-factory.h            \
        empathy-tp-contact-list.h               \
        empathy-tp-file.h                       \
-       empathy-tp-group.h                      \
        empathy-tp-roomlist.h                   \
        empathy-tp-tube.h                       \
        empathy-tube-handler.h                  \