aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-dispatcher.h
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-01-10 00:12:07 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-01-10 00:12:07 +0800
commit9940bfed4c589710add05be776b7b1817bf9d48d (patch)
treea60db33d3e746612c1c502006d151fd40407dc33 /libempathy/empathy-dispatcher.h
parent9d4e38bf73836e75dd4a86b3929317b612236f1f (diff)
downloadgsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar.gz
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar.bz2
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar.lz
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar.xz
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.tar.zst
gsoc2013-empathy-9940bfed4c589710add05be776b7b1817bf9d48d.zip
Start reworking the dispatcher
Rework the channel dispatche so it's model is somewhat similar to the ChannelDispatcher in the telepathy-spec. Which allows for a much cleaner and extensible implementation containg no ugly hacks. Currently it's only able to do Text Channels and a lot of the other functionality is temporary disabled Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2130
Diffstat (limited to 'libempathy/empathy-dispatcher.h')
-rw-r--r--libempathy/empathy-dispatcher.h44
1 files changed, 31 insertions, 13 deletions
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
index 6f9d4e718..0c6cecb32 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-dispatcher.h
@@ -28,6 +28,7 @@
#include <telepathy-glib/channel.h>
#include "empathy-contact.h"
+#include "empathy-dispatch-operation.h"
G_BEGIN_DECLS
@@ -58,23 +59,40 @@ typedef struct {
gboolean activatable;
} EmpathyDispatcherTube;
-GType empathy_dispatcher_get_type (void) G_GNUC_CONST;
-EmpathyDispatcher * empathy_dispatcher_new (void);
-void empathy_dispatcher_channel_process (EmpathyDispatcher *dispatcher,
- TpChannel *channel);
+
+/* 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);
+
+GType empathy_dispatcher_get_type (void) G_GNUC_CONST;
+
+void empathy_dispatcher_call_with_contact (EmpathyContact *contact,
+ 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,
+ 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);
+
+
+void empathy_dispatcher_send_file (EmpathyContact *contact,
+ GFile *gfile);
+
+/* tube stuff */
EmpathyDispatcherTube *empathy_dispatcher_tube_ref (EmpathyDispatcherTube *tube);
void empathy_dispatcher_tube_unref (EmpathyDispatcherTube *tube);
void empathy_dispatcher_tube_process (EmpathyDispatcher *dispatcher,
- EmpathyDispatcherTube *tube);
-void empathy_dispatcher_call_with_contact (EmpathyContact *contact);
-void empathy_dispatcher_call_with_contact_id (McAccount *account,
- const gchar *contact_id);
-void empathy_dispatcher_chat_with_contact_id (McAccount *account,
- const gchar *contact_id);
-void empathy_dispatcher_chat_with_contact (EmpathyContact *contact);
-void empathy_dispatcher_send_file (EmpathyContact *contact,
- GFile *gfile);
+ EmpathyDispatcherTube *etube);
G_END_DECLS