]> git.0d.be Git - empathy.git/commitdiff
Update python binding to have EmpathyTpFile API.
authorXavier Claessens <xclaesse@src.gnome.org>
Sat, 29 Nov 2008 22:54:41 +0000 (22:54 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sat, 29 Nov 2008 22:54:41 +0000 (22:54 +0000)
svn path=/trunk/; revision=1930

python/pyempathy/pyempathy.defs
python/pyempathy/pyempathy.override
python/pyempathygtk/pyempathygtk.defs
python/update-binding.sh

index da866fdfc7bdd9e0e33571a2d6cbe071231c02d8..eebe92aa88f255a047b339632a924314d9356310 100644 (file)
   (gtype-id "EMPATHY_TYPE_TP_CONTACT_LIST")
 )
 
+(define-object TpFile
+  (in-module "Empathy")
+  (parent "GObject")
+  (c-name "EmpathyTpFile")
+  (gtype-id "EMPATHY_TYPE_TP_FILE")
+)
+
 (define-object TpGroup
   (in-module "Empathy")
   (parent "GObject")
     '("none" "EMPATHY_CAPABILITIES_NONE")
     '("audio" "EMPATHY_CAPABILITIES_AUDIO")
     '("video" "EMPATHY_CAPABILITIES_VIDEO")
+    '("ft" "EMPATHY_CAPABILITIES_FT")
     '("unknown" "EMPATHY_CAPABILITIES_UNKNOWN")
   )
 )
     '("account" "EMPATHY_DEBUG_ACCOUNT")
     '("irc" "EMPATHY_DEBUG_IRC")
     '("dispatcher" "EMPATHY_DEBUG_DISPATCHER")
+    '("ft" "EMPATHY_DEBUG_FT")
     '("other" "EMPATHY_DEBUG_OTHER")
   )
 )
   (return-type "gboolean")
 )
 
+(define-method can_send_files
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_can_send_files")
+  (return-type "gboolean")
+)
+
 (define-function contact_equal
   (c-name "empathy_contact_equal")
   (return-type "gboolean")
   )
 )
 
+(define-function dispatcher_send_file
+  (c-name "empathy_dispatcher_send_file")
+  (return-type "none")
+  (parameters
+    '("EmpathyContact*" "contact")
+    '("GFile*" "gfile")
+  )
+)
+
 
 
 ;; From empathy-idle.h
 
 
 
+;; From empathy-tp-file.h
+
+(define-function tp_file_get_type
+  (c-name "empathy_tp_file_get_type")
+  (return-type "GType")
+)
+
+(define-function tp_file_new
+  (c-name "empathy_tp_file_new")
+  (is-constructor-of "EmpathyTpFile")
+  (return-type "EmpathyTpFile*")
+  (parameters
+    '("TpChannel*" "channel")
+  )
+)
+
+(define-method get_channel
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_channel")
+  (return-type "TpChannel*")
+)
+
+(define-method accept
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_accept")
+  (return-type "none")
+  (parameters
+    '("guint64" "offset")
+    '("GFile*" "gfile")
+    '("GError**" "error")
+  )
+)
+
+(define-method cancel
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_cancel")
+  (return-type "none")
+)
+
+(define-method offer
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_offer")
+  (return-type "none")
+  (parameters
+    '("GFile*" "gfile")
+    '("GError**" "error")
+  )
+)
+
+(define-method get_contact
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_contact")
+  (return-type "EmpathyContact*")
+)
+
+(define-method get_filename
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_filename")
+  (return-type "const-gchar*")
+)
+
+(define-method is_incoming
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_is_incoming")
+  (return-type "gboolean")
+)
+
+(define-method get_state
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_state")
+  (return-type "EmpFileTransferState")
+  (parameters
+    '("EmpFileTransferStateChangeReason*" "reason")
+  )
+)
+
+(define-method get_size
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_size")
+  (return-type "guint64")
+)
+
+(define-method get_transferred_bytes
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_transferred_bytes")
+  (return-type "guint64")
+)
+
+(define-method get_remaining_time
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_remaining_time")
+  (return-type "gint")
+)
+
+(define-method get_content_type
+  (of-object "EmpathyTpFile")
+  (c-name "empathy_tp_file_get_content_type")
+  (return-type "const-gchar*")
+)
+
+
+
 ;; From empathy-tp-group.h
 
 (define-function tp_group_get_type
index 333ae53174ef5152f460f169327350c86260c469..32b1e3e761c7e3538f7685ccdd29e8d96fe18ff3 100644 (file)
@@ -24,6 +24,7 @@ headers
 #include "empathy-tp-chat.h"
 #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"
index 2065e482360f187dc8374475402f8abbf88891ee..e4044668f11697ce25c80132a0ea15c7a977f9e7 100644 (file)
   (return-type "GtkWidget*")
 )
 
+(define-method invite_menu_item_new
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_invite_menu_item_new")
+  (return-type "GtkWidget*")
+)
+
+(define-method file_transfer_menu_item_new
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_file_transfer_menu_item_new")
+  (return-type "GtkWidget*")
+)
+
 
 
 ;; From empathy-contact-widget.h
   )
 )
 
+(define-function pixbuf_from_data_and_mime
+  (c-name "empathy_pixbuf_from_data_and_mime")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("gchar*" "data")
+    '("gsize" "data_size")
+    '("gchar**" "mime_type")
+  )
+)
+
 (define-function pixbuf_from_avatar_scaled
   (c-name "empathy_pixbuf_from_avatar_scaled")
   (return-type "GdkPixbuf*")
   (varargs #t)
 )
 
+(define-function send_file_with_file_chooser
+  (c-name "empathy_send_file_with_file_chooser")
+  (return-type "none")
+  (parameters
+    '("EmpathyContact*" "contact")
+  )
+)
+
 
index e00c7ce6a5f8fecabfd0375fab3673206cf426d0..962357ef16c05d301edf9f8fe22511092e17f140 100755 (executable)
@@ -26,6 +26,7 @@ python /usr/share/pygobject/2.0/codegen/h2def.py      \
        empathy-tp-chat.h                       \
        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                       \