From 236262c25f3660c7ed891eaafc89f7eeebfdc5c7 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Sat, 19 Apr 2008 21:04:25 +0000 Subject: [PATCH] Update python binding svn path=/trunk/; revision=985 --- python/pyempathy/pyempathy.defs | 126 ++++++++++++++++++++++++++ python/pyempathy/pyempathy.override | 2 + python/pyempathygtk/pyempathygtk.defs | 34 +++++-- python/update-binding.sh | 3 + 4 files changed, 156 insertions(+), 9 deletions(-) diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs index 55ca3d6d..e77e0a93 100644 --- a/python/pyempathy/pyempathy.defs +++ b/python/pyempathy/pyempathy.defs @@ -141,6 +141,20 @@ (gtype-id "EMPATHY_TYPE_TP_ROOMLIST") ) +(define-object TpTube + (in-module "Empathy") + (parent "GObject") + (c-name "EmpathyTpTube") + (gtype-id "EMPATHY_TYPE_TP_TUBE") +) + +(define-object TubeHandler + (in-module "Empathy") + (parent "GObject") + (c-name "EmpathyTubeHandler") + (gtype-id "EMPATHY_TYPE_TUBE_HANDLER") +) + ;; Enumerations and flags ... (define-enum RegExType @@ -572,6 +586,25 @@ ) ) +(define-function empathy_connect_to_account_status_changed + (c-name "empathy_connect_to_account_status_changed") + (return-type "gpointer") + (parameters + '("MissionControl*" "mc") + '("GCallback" "handler") + '("gpointer" "user_data") + '("GClosureNotify" "free_func") + ) +) + +(define-function empathy_disconnect_account_status_changed + (c-name "empathy_disconnect_account_status_changed") + (return-type "none") + (parameters + '("gpointer" "token") + ) +) + ;; From empathy-message.h @@ -1584,6 +1617,12 @@ (return-type "gboolean") ) +(define-method get_members_count + (of-object "EmpathyTpChat") + (c-name "empathy_tp_chat_get_members_count") + (return-type "guint") +) + (define-method send (of-object "EmpathyTpChat") (c-name "empathy_tp_chat_send") @@ -1737,6 +1776,56 @@ +;; From empathy-tp-tube.h + +(define-function empathy_tp_tube_get_type + (c-name "empathy_tp_tube_get_type") + (return-type "GType") +) + +(define-function empathy_tp_tube_new + (c-name "empathy_tp_tube_new") + (is-constructor-of "EmpathyTpTube") + (return-type "EmpathyTpTube*") + (parameters + '("TpChannel*" "channel") + '("guint" "tube_id") + ) +) + +(define-function empathy_tp_tube_new_stream_tube + (c-name "empathy_tp_tube_new_stream_tube") + (return-type "EmpathyTpTube*") + (parameters + '("EmpathyContact*" "contact") + '("TpSocketAddressType" "type") + '("const-gchar*" "hostname") + '("guint" "port") + '("const-gchar*" "service") + ) +) + +(define-method accept_stream_tube + (of-object "EmpathyTpTube") + (c-name "empathy_tp_tube_accept_stream_tube") + (return-type "none") + (parameters + '("TpSocketAddressType" "type") + ) +) + +(define-method get_socket + (of-object "EmpathyTpTube") + (c-name "empathy_tp_tube_get_socket") + (return-type "none") + (parameters + '("gchar**" "hostname") + '("guint*" "port") + ) +) + + + ;; From empathy-chandler.h (define-function empathy_chandler_get_type @@ -2134,3 +2223,40 @@ ) + +;; From empathy-tube-handler.h + +(define-function empathy_tube_handler_get_type + (c-name "empathy_tube_handler_get_type") + (return-type "GType") +) + +(define-function empathy_tube_handler_new + (c-name "empathy_tube_handler_new") + (is-constructor-of "EmpathyTubeHandler") + (return-type "EmpathyTubeHandler*") + (parameters + '("TpTubeType" "type") + '("const-gchar*" "service") + ) +) + +(define-function empathy_tube_handler_build_bus_name + (c-name "empathy_tube_handler_build_bus_name") + (return-type "gchar*") + (parameters + '("TpTubeType" "type") + '("const-gchar*" "service") + ) +) + +(define-function empathy_tube_handler_build_object_path + (c-name "empathy_tube_handler_build_object_path") + (return-type "gchar*") + (parameters + '("TpTubeType" "type") + '("const-gchar*" "service") + ) +) + + diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override index c5b70c17..6960369c 100644 --- a/python/pyempathy/pyempathy.override +++ b/python/pyempathy/pyempathy.override @@ -28,6 +28,8 @@ headers #include "empathy-tp-contact-list.h" #include "empathy-tp-group.h" #include "empathy-tp-roomlist.h" +#include "empathy-tp-tube.h" +#include "empathy-tube-handler.h" #include "empathy-utils.h" void empathy_add_constants(PyObject *module, const gchar *strip_prefix); diff --git a/python/pyempathygtk/pyempathygtk.defs b/python/pyempathygtk/pyempathygtk.defs index a0ae4eaf..fd3ca201 100644 --- a/python/pyempathygtk/pyempathygtk.defs +++ b/python/pyempathygtk/pyempathygtk.defs @@ -313,6 +313,18 @@ (return-type "const-gchar*") ) +(define-method get_remote_contact + (of-object "EmpathyChat") + (c-name "empathy_chat_get_remote_contact") + (return-type "EmpathyContact*") +) + +(define-method get_members_count + (of-object "EmpathyChat") + (c-name "empathy_chat_get_members_count") + (return-type "guint") +) + (define-method clear (of-object "EmpathyChat") (c-name "empathy_chat_clear") @@ -708,15 +720,6 @@ ) ) -(define-function empathy_account_widget_sip_new - (c-name "empathy_account_widget_sip_new") - (is-constructor-of "EmpathyAccountWidgetSip") - (return-type "GtkWidget*") - (parameters - '("McAccount*" "account") - ) -) - (define-function empathy_account_widget_groupwise_new (c-name "empathy_account_widget_groupwise_new") (is-constructor-of "EmpathyAccountWidgetGroupwise") @@ -956,6 +959,19 @@ +;; From empathy-account-widget-sip.h + +(define-function empathy_account_widget_sip_new + (c-name "empathy_account_widget_sip_new") + (is-constructor-of "EmpathyAccountWidgetSip") + (return-type "GtkWidget*") + (parameters + '("McAccount*" "account") + ) +) + + + ;; From empathy-contact-dialogs.h (define-function empathy_subscription_dialog_show diff --git a/python/update-binding.sh b/python/update-binding.sh index 0c4b94ac..9e536a5c 100755 --- a/python/update-binding.sh +++ b/python/update-binding.sh @@ -23,6 +23,7 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-tp-chat.h \ empathy-tp-roomlist.h \ empathy-tp-call.h \ + empathy-tp-tube.h \ empathy-chandler.h \ empathy-filter.h \ empathy-idle.h \ @@ -30,6 +31,7 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-irc-network-manager.h \ empathy-irc-network.h \ empathy-irc-server.h \ + empathy-tube-handler.h \ > ../python/pyempathy/pyempathy.defs # Update the list of headers from Makefile.am @@ -48,6 +50,7 @@ python /usr/share/pygtk/2.0/codegen/h2def.py \ empathy-conf.h \ empathy-theme.h \ empathy-account-widget-irc.h \ + empathy-account-widget-sip.h \ empathy-contact-dialogs.h \ empathy-new-message-dialog.h \ empathy-theme-irc.h \ -- 2.39.2