aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>2009-05-15 21:38:45 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:53:17 +0800
commitea473bb361a461e30e45db76377592346af9b3cf (patch)
treea638b1719c5129805384b05be8a6420165cf822a /python
parentca4022f7e479bf282db649c15860f41b1d281020 (diff)
downloadgsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar.gz
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar.bz2
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar.lz
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar.xz
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.tar.zst
gsoc2013-empathy-ea473bb361a461e30e45db76377592346af9b3cf.zip
Update Python bindings
Diffstat (limited to 'python')
-rw-r--r--python/pyempathy/pyempathy.defs267
-rw-r--r--python/pyempathy/pyempathy.override2
-rw-r--r--python/pyempathygtk/pyempathygtk.defs8
-rw-r--r--python/pyempathygtk/pyempathygtk.override1
-rwxr-xr-xpython/update-binding.sh2
5 files changed, 215 insertions, 65 deletions
diff --git a/python/pyempathy/pyempathy.defs b/python/pyempathy/pyempathy.defs
index 2b56496ed..0e54ea112 100644
--- a/python/pyempathy/pyempathy.defs
+++ b/python/pyempathy/pyempathy.defs
@@ -77,6 +77,20 @@
(gtype-id "EMPATHY_TYPE_DISPATCHER")
)
+(define-object FTFactory
+ (in-module "Empathy")
+ (parent "GObject")
+ (c-name "EmpathyFTFactory")
+ (gtype-id "EMPATHY_TYPE_FT_FACTORY")
+)
+
+(define-object FTHandler
+ (in-module "Empathy")
+ (parent "GObject")
+ (c-name "EmpathyFTHandler")
+ (gtype-id "EMPATHY_TYPE_FT_HANDLER")
+)
+
(define-object Idle
(in-module "Empathy")
(parent "GObject")
@@ -241,6 +255,19 @@
)
)
+(define-enum FTErrorEnum
+ (in-module "Empathy")
+ (c-name "EmpathyFTErrorEnum")
+ (gtype-id "EMPATHY_TYPE_FT_ERROR_ENUM")
+ (values
+ '("failed" "EMPATHY_FT_ERROR_FAILED")
+ '("hash-mismatch" "EMPATHY_FT_ERROR_HASH_MISMATCH")
+ '("tp-error" "EMPATHY_FT_ERROR_TP_ERROR")
+ '("socket" "EMPATHY_FT_ERROR_SOCKET")
+ '("not-supported" "EMPATHY_FT_ERROR_NOT_SUPPORTED")
+ )
+)
+
;; From empathy-account-manager.h
@@ -1343,6 +1370,164 @@
+;; From empathy-ft-factory.h
+
+(define-function ft_factory_get_type
+ (c-name "empathy_ft_factory_get_type")
+ (return-type "GType")
+)
+
+(define-function ft_factory_dup_singleton
+ (c-name "empathy_ft_factory_dup_singleton")
+ (return-type "EmpathyFTFactory*")
+)
+
+(define-method new_transfer_outgoing
+ (of-object "EmpathyFTFactory")
+ (c-name "empathy_ft_factory_new_transfer_outgoing")
+ (return-type "none")
+ (parameters
+ '("EmpathyContact*" "contact")
+ '("GFile*" "source")
+ '("gboolean" "use_hash")
+ )
+)
+
+(define-method claim_channel
+ (of-object "EmpathyFTFactory")
+ (c-name "empathy_ft_factory_claim_channel")
+ (return-type "none")
+ (parameters
+ '("EmpathyDispatchOperation*" "operation")
+ )
+)
+
+(define-method set_destination_for_incoming_handler
+ (of-object "EmpathyFTFactory")
+ (c-name "empathy_ft_factory_set_destination_for_incoming_handler")
+ (return-type "none")
+ (parameters
+ '("EmpathyFTHandler*" "handler")
+ '("GFile*" "destination")
+ '("gboolean" "use_hash")
+ )
+)
+
+
+
+;; From empathy-ft-handler.h
+
+(define-function ft_handler_get_type
+ (c-name "empathy_ft_handler_get_type")
+ (return-type "GType")
+)
+
+(define-function ft_handler_new_outgoing
+ (c-name "empathy_ft_handler_new_outgoing")
+ (return-type "none")
+ (parameters
+ '("EmpathyContact*" "contact")
+ '("GFile*" "source")
+ '("gboolean" "use_hash")
+ '("EmpathyFTHandlerReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-function ft_handler_new_incoming
+ (c-name "empathy_ft_handler_new_incoming")
+ (return-type "none")
+ (parameters
+ '("EmpathyTpFile*" "tp_file")
+ '("EmpathyFTHandlerReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method incoming_set_destination
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_incoming_set_destination")
+ (return-type "none")
+ (parameters
+ '("GFile*" "destination")
+ '("gboolean" "use_hash")
+ )
+)
+
+(define-method start_transfer
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_start_transfer")
+ (return-type "none")
+)
+
+(define-method cancel_transfer
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_cancel_transfer")
+ (return-type "none")
+)
+
+(define-method get_filename
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_filename")
+ (return-type "const-char*")
+)
+
+(define-method get_content_type
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_content_type")
+ (return-type "const-char*")
+)
+
+(define-method get_contact
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_contact")
+ (return-type "EmpathyContact*")
+)
+
+(define-method get_gfile
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_gfile")
+ (return-type "GFile*")
+)
+
+(define-method get_use_hash
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_use_hash")
+ (return-type "gboolean")
+)
+
+(define-method is_incoming
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_is_incoming")
+ (return-type "gboolean")
+)
+
+(define-method get_transferred_bytes
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_transferred_bytes")
+ (return-type "guint64")
+)
+
+(define-method get_total_bytes
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_get_total_bytes")
+ (return-type "guint64")
+)
+
+(define-method is_completed
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_is_completed")
+ (return-type "gboolean")
+)
+
+(define-method is_cancelled
+ (of-object "EmpathyFTHandler")
+ (c-name "empathy_ft_handler_is_cancelled")
+ (return-type "gboolean")
+)
+
+
+
;; From empathy-idle.h
(define-function idle_get_type
@@ -2397,15 +2582,10 @@
(return-type "EmpathyTpFile*")
(parameters
'("TpChannel*" "channel")
+ '("gboolean" "incoming")
)
)
-(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")
@@ -2413,36 +2593,38 @@
(parameters
'("guint64" "offset")
'("GFile*" "gfile")
- '("GError**" "error")
+ '("GCancellable*" "cancellable")
+ '("EmpathyTpFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_user_data")
+ '("EmpathyTpFileOperationCallback" "op_callback")
+ '("gpointer" "op_user_data")
)
)
-(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")
+ '("GCancellable*" "cancellable")
+ '("EmpathyTpFileProgressCallback" "progress_callback")
+ '("gpointer" "progress_user_data")
+ '("EmpathyTpFileOperationCallback" "op_callback")
+ '("gpointer" "op_user_data")
)
)
-(define-method get_contact
+(define-method cancel
(of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_get_contact")
- (return-type "EmpathyContact*")
+ (c-name "empathy_tp_file_cancel")
+ (return-type "none")
)
-(define-method get_filename
+(define-method close
(of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_get_filename")
- (return-type "const-gchar*")
+ (c-name "empathy_tp_file_close")
+ (return-type "none")
)
(define-method is_incoming
@@ -2451,51 +2633,6 @@
(return-type "gboolean")
)
-(define-method get_state
- (of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_get_state")
- (return-type "TpFileTransferState")
- (parameters
- '("TpFileTransferStateChangeReason*" "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_speed
- (of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_get_speed")
- (return-type "gdouble")
-)
-
-(define-method get_content_type
- (of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_get_content_type")
- (return-type "const-gchar*")
-)
-
-(define-method is_ready
- (of-object "EmpathyTpFile")
- (c-name "empathy_tp_file_is_ready")
- (return-type "gboolean")
-)
-
;; From empathy-tp-roomlist.h
diff --git a/python/pyempathy/pyempathy.override b/python/pyempathy/pyempathy.override
index e4c99086c..c985be7b6 100644
--- a/python/pyempathy/pyempathy.override
+++ b/python/pyempathy/pyempathy.override
@@ -14,6 +14,8 @@ headers
#include "empathy-debug.h"
#include "empathy-dispatcher.h"
#include "empathy-enum-types.h"
+#include "empathy-ft-factory.h"
+#include "empathy-ft-handler.h"
#include "empathy-idle.h"
#include "empathy-irc-network.h"
#include "empathy-irc-network-manager.h"
diff --git a/python/pyempathygtk/pyempathygtk.defs b/python/pyempathygtk/pyempathygtk.defs
index c519e8643..291e154d8 100644
--- a/python/pyempathygtk/pyempathygtk.defs
+++ b/python/pyempathygtk/pyempathygtk.defs
@@ -1992,6 +1992,14 @@
)
)
+(define-function receive_file_with_file_chooser
+ (c-name "empathy_receive_file_with_file_chooser")
+ (return-type "none")
+ (parameters
+ '("EmpathyFTHandler*" "handler")
+ )
+)
+
(define-function sound_play
(c-name "empathy_sound_play")
(return-type "none")
diff --git a/python/pyempathygtk/pyempathygtk.override b/python/pyempathygtk/pyempathygtk.override
index 46c2ddcb0..3229cbac2 100644
--- a/python/pyempathygtk/pyempathygtk.override
+++ b/python/pyempathygtk/pyempathygtk.override
@@ -67,6 +67,7 @@ import empathy.ContactList as PyEmpathyContactList_Type
import empathy.TpChat as PyEmpathyTpChat_Type
import empathy.Message as PyEmpathyMessage_Type
import empathy.TpCall as PyEmpathyTpCall_Type
+import empathy.FTHandler as PyEmpathyFTHandler_Type
%%
ignore-glob
*_get_type
diff --git a/python/update-binding.sh b/python/update-binding.sh
index 14a5ddec3..1f6e4ae78 100755
--- a/python/update-binding.sh
+++ b/python/update-binding.sh
@@ -18,6 +18,8 @@ python /usr/share/pygobject/2.0/codegen/h2def.py \
empathy-debug.h \
empathy-dispatcher.h \
empathy-dispatch-operation.h \
+ empathy-ft-factory.h \
+ empathy-ft-handler.h \
empathy-idle.h \
empathy-irc-network.h \
empathy-irc-network-manager.h \