]> git.0d.be Git - empathy.git/blobdiff - python/pyempathy/pyempathy.defs
Merge branch 'ft_rework'
[empathy.git] / python / pyempathy / pyempathy.defs
index 6f8f0f65d47982eaadcfda3567aabbab7a19ceac..02c8dad1978c40e43da88298f455e6a3ca048c08 100644 (file)
   (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")
     '("audio" "EMPATHY_CAPABILITIES_AUDIO")
     '("video" "EMPATHY_CAPABILITIES_VIDEO")
     '("ft" "EMPATHY_CAPABILITIES_FT")
+    '("stream-tube" "EMPATHY_CAPABILITIES_STREAM_TUBE")
     '("unknown" "EMPATHY_CAPABILITIES_UNKNOWN")
   )
 )
     '("irc" "EMPATHY_DEBUG_IRC")
     '("dispatcher" "EMPATHY_DEBUG_DISPATCHER")
     '("ft" "EMPATHY_DEBUG_FT")
+    '("location" "EMPATHY_DEBUG_LOCATION")
     '("other" "EMPATHY_DEBUG_OTHER")
   )
 )
   )
 )
 
+(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
 
   )
 )
 
+(define-method new_call_with_streams
+  (of-object "EmpathyCallFactory")
+  (c-name "empathy_call_factory_new_call_with_streams")
+  (return-type "none")
+  (parameters
+    '("EmpathyContact*" "contact")
+    '("gboolean" "initial_audio")
+    '("gboolean" "initial_video")
+  )
+)
+
 (define-method claim_channel
   (of-object "EmpathyCallFactory")
   (c-name "empathy_call_factory_claim_channel")
   )
 )
 
+(define-function call_handler_new_for_contact_with_streams
+  (c-name "empathy_call_handler_new_for_contact_with_streams")
+  (return-type "EmpathyCallHandler*")
+  (parameters
+    '("EmpathyContact*" "contact")
+    '("gboolean" "audio")
+    '("gboolean" "video")
+  )
+)
+
 (define-function call_handler_new_for_channel
   (c-name "empathy_call_handler_new_for_channel")
   (return-type "EmpathyCallHandler*")
 (define-method get_presence
   (of-object "EmpathyContact")
   (c-name "empathy_contact_get_presence")
-  (return-type "McPresence")
+  (return-type "TpConnectionPresenceType")
 )
 
 (define-method set_presence
   (c-name "empathy_contact_set_presence")
   (return-type "none")
   (parameters
-    '("McPresence" "presence")
+    '("TpConnectionPresenceType" "presence")
   )
 )
 
   (return-type "gboolean")
 )
 
+(define-method can_use_stream_tube
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_can_use_stream_tube")
+  (return-type "gboolean")
+)
+
 (define-function contact_hash
   (c-name "empathy_contact_hash")
   (return-type "guint")
   )
 )
 
+(define-method get_location
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_get_location")
+  (return-type "GHashTable*")
+)
+
+(define-method set_location
+  (of-object "EmpathyContact")
+  (c-name "empathy_contact_set_location")
+  (return-type "none")
+  (parameters
+    '("GHashTable*" "location")
+  )
+)
+
 
 
 ;; From empathy-contact-groups.h
   )
 )
 
-(define-method find_channel_class
+(define-method find_requestable_channel_classes_async
+  (of-object "EmpathyDispatcher")
+  (c-name "empathy_dispatcher_find_requestable_channel_classes_async")
+  (return-type "none")
+  (parameters
+    '("TpConnection*" "connection")
+    '("const-gchar*" "channel_type")
+    '("guint" "handle_type")
+    '("EmpathyDispatcherFindChannelClassCb" "callback")
+    '("gpointer" "user_data")
+    '("const-char*" "first_property_name")
+  )
+  (varargs #t)
+)
+
+(define-method find_requestable_channel_classes
   (of-object "EmpathyDispatcher")
-  (c-name "empathy_dispatcher_find_channel_class")
-  (return-type "GStrv")
+  (c-name "empathy_dispatcher_find_requestable_channel_classes")
+  (return-type "GList*")
   (parameters
     '("TpConnection*" "connection")
     '("const-gchar*" "channel_type")
     '("guint" "handle_type")
+    '("const-char*" "first_property_name")
   )
+  (varargs #t)
 )
 
 (define-function dispatcher_dup_singleton
 
 
 
+;; 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")
+  )
+)
+
+(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")
+  )
+)
+
+
+
+;; 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")
+    '("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")
+  )
+)
+
+(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
 (define-method get_state
   (of-object "EmpathyIdle")
   (c-name "empathy_idle_get_state")
-  (return-type "McPresence")
+  (return-type "TpConnectionPresenceType")
 )
 
 (define-method set_state
   (c-name "empathy_idle_set_state")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
   )
 )
 
 (define-method get_flash_state
   (of-object "EmpathyIdle")
   (c-name "empathy_idle_get_flash_state")
-  (return-type "McPresence")
+  (return-type "TpConnectionPresenceType")
 )
 
 (define-method set_flash_state
   (c-name "empathy_idle_set_flash_state")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
   )
 )
 
   (c-name "empathy_idle_set_presence")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
     '("const-gchar*" "status")
   )
 )
   (c-name "empathy_status_presets_get")
   (return-type "GList*")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
     '("gint" "max_number")
   )
 )
   (c-name "empathy_status_presets_set_last")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
     '("const-gchar*" "status")
   )
 )
   (c-name "empathy_status_presets_remove")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
     '("const-gchar*" "status")
   )
 )
 
 (define-function status_presets_get_default_state
   (c-name "empathy_status_presets_get_default_state")
-  (return-type "McPresence")
+  (return-type "TpConnectionPresenceType")
 )
 
 (define-function status_presets_get_default_status
   (c-name "empathy_status_presets_set_default")
   (return-type "none")
   (parameters
-    '("McPresence" "state")
+    '("TpConnectionPresenceType" "state")
     '("const-gchar*" "status")
   )
 )
   )
 )
 
+(define-function time_to_string_relative
+  (c-name "empathy_time_to_string_relative")
+  (return-type "gchar*")
+  (parameters
+    '("time_t" "t")
+  )
+)
+
 
 
 ;; From empathy-tp-call.h
   (return-type "none")
   (parameters
     '("EmpathyContact*" "contact")
+    '("gboolean" "audio")
+    '("gboolean" "video")
   )
 )
 
   )
 )
 
+(define-method set_location
+  (of-object "EmpathyTpContactFactory")
+  (c-name "empathy_tp_contact_factory_set_location")
+  (return-type "none")
+  (parameters
+    '("GHashTable*" "location")
+  )
+)
+
 
 
 ;; From empathy-tp-contact-list.h
   (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")
   (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
   (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
   (return-type "none")
   (parameters
     '("TpSocketAddressType" "type")
-    '("EmpatyTpTubeAcceptStreamTubeCb*" "callback")
+    '("EmpathyTpTubeAcceptStreamTubeCb*" "callback")
     '("gpointer" "user_data")
   )
 )
 
+(define-method call_when_ready
+  (of-object "EmpathyTpTube")
+  (c-name "empathy_tp_tube_call_when_ready")
+  (return-type "none")
+  (parameters
+    '("EmpathyTpTubeReadyCb*" "callback")
+    '("gpointer" "user_data")
+    '("GDestroyNotify" "destroy")
+    '("GObject*" "weak_object")
+  )
+)
+
 
 
 ;; From empathy-tube-handler.h
   (c-name "empathy_presence_get_default_message")
   (return-type "const-gchar*")
   (parameters
-    '("McPresence" "presence")
+    '("TpConnectionPresenceType" "presence")
   )
 )
 
   (c-name "empathy_presence_to_str")
   (return-type "const-gchar*")
   (parameters
-    '("McPresence" "presence")
+    '("TpConnectionPresenceType" "presence")
   )
 )
 
 (define-function presence_from_str
   (c-name "empathy_presence_from_str")
-  (return-type "McPresence")
+  (return-type "TpConnectionPresenceType")
   (parameters
     '("const-gchar*" "str")
   )
   (return-type "gboolean")
 )
 
+(define-function uint_compare
+  (c-name "empathy_uint_compare")
+  (return-type "gint")
+  (parameters
+    '("gconstpointer" "a")
+    '("gconstpointer" "b")
+  )
+)
+