]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-dispatcher.h
Updated Basque language
[empathy.git] / libempathy / empathy-dispatcher.h
index 0c6cecb32be61bede97083f5809bbc2877806fbe..6176ea088c854643facebbc40bcf848fa265b326 100644 (file)
@@ -28,6 +28,7 @@
 #include <telepathy-glib/channel.h>
 
 #include "empathy-contact.h"
+#include "empathy-handler.h"
 #include "empathy-dispatch-operation.h"
 
 G_BEGIN_DECLS
@@ -42,57 +43,77 @@ G_BEGIN_DECLS
 typedef struct _EmpathyDispatcher      EmpathyDispatcher;
 typedef struct _EmpathyDispatcherClass EmpathyDispatcherClass;
 
-struct _EmpathyDispatcher {
-       GObject parent;
-       gpointer priv;
+struct _EmpathyDispatcher
+{
+  GObject parent;
+  gpointer priv;
 };
 
-struct _EmpathyDispatcherClass {
-       GObjectClass parent_class;
+struct _EmpathyDispatcherClass
+{
+ GObjectClass parent_class;
 };
 
-#define EMPATHY_TYPE_DISPATCHER_TUBE (empathy_dispatcher_tube_get_type ())
-typedef struct {
-       EmpathyContact *initiator;
-       TpChannel      *channel;
-       guint           id;
-       gboolean        activatable;
-} EmpathyDispatcherTube;
-
-
 /* Will be called when the channel is ready for dispatching. The requestor
  * handle the channel itself by calling empathy_dispatch_operation_handles */
 typedef void (EmpathyDispatcherRequestCb) (
   EmpathyDispatchOperation *dispatch,  const GError *error,
   gpointer user_data);
+typedef void (EmpathyDispatcherFindChannelClassCb) (
+  GList *channel_classes, gpointer user_data);
 
-GType empathy_dispatcher_get_type             (void) G_GNUC_CONST;
+GType empathy_dispatcher_get_type (void) G_GNUC_CONST;
 
-void empathy_dispatcher_call_with_contact (EmpathyContact *contact,
+void empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher,
+  TpConnection *connection, GHashTable *request,
   EmpathyDispatcherRequestCb *callback, gpointer user_data);
-void empathy_dispatcher_call_with_contact_id (McAccount *account,
-  const gchar           *contact_id, EmpathyDispatcherRequestCb *callback,
-  gpointer user_data);
 
-void empathy_dispatcher_chat_with_contact_id (McAccount *account,
+/* Requesting 1 to 1 text channels */
+void empathy_dispatcher_chat_with_contact_id (TpConnection *connection,
   const gchar *contact_id, EmpathyDispatcherRequestCb *callback,
   gpointer user_data);
 void  empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
   EmpathyDispatcherRequestCb *callback, gpointer user_data);
 
-/* Get the dispatcher singleton */
-EmpathyDispatcher *    empathy_get_dispatcher (void);
-GType                  empathy_dispatcher_tube_get_type        (void);
+/* Request a file channel to a specific contact */
+void empathy_dispatcher_send_file_to_contact (EmpathyContact *contact,
+  const gchar *filename, guint64 size, guint64 date,
+  const gchar *content_type, EmpathyDispatcherRequestCb *callback,
+  gpointer user_data);
 
+/* Request a muc channel */
+void empathy_dispatcher_join_muc (TpConnection *connection,
+  const gchar *roomname, EmpathyDispatcherRequestCb *callback,
+  gpointer user_data);
 
-void  empathy_dispatcher_send_file            (EmpathyContact        *contact,
-                                                               GFile                 *gfile);
+void empathy_dispatcher_find_requestable_channel_classes_async
+    (EmpathyDispatcher *dispatcher, TpConnection *connection,
+     const gchar *channel_type, guint handle_type,
+     EmpathyDispatcherFindChannelClassCb callback, gpointer user_data,
+     const char *first_property_name, ...);
 
-/* tube stuff */
-EmpathyDispatcherTube *empathy_dispatcher_tube_ref             (EmpathyDispatcherTube *tube);
-void                   empathy_dispatcher_tube_unref           (EmpathyDispatcherTube *tube);
-void                   empathy_dispatcher_tube_process         (EmpathyDispatcher     *dispatcher,
-                                                               EmpathyDispatcherTube *etube);
+GList * empathy_dispatcher_find_requestable_channel_classes
+    (EmpathyDispatcher *dispatcher, TpConnection *connection,
+     const gchar *channel_type, guint handle_type,
+     const char *first_property_name, ...);
+
+/* Create the dispatcher singleton */
+EmpathyDispatcher * empathy_dispatcher_new (const gchar *name,
+  GPtrArray *filters,
+  GStrv capabilities);
+
+EmpathyHandler *
+empathy_dispatcher_add_handler (EmpathyDispatcher *dispatcher,
+    const gchar *name,
+    GPtrArray *filters,
+    GStrv capabilities);
+
+void
+empathy_dispatcher_remove_handler (EmpathyDispatcher *dispatcher,
+  EmpathyHandler *handler);
+
+/* Get the dispatcher singleton */
+EmpathyDispatcher *    empathy_dispatcher_dup_singleton (void);
 
 G_END_DECLS