#include <telepathy-glib/channel.h>
#include "empathy-contact.h"
+#include "empathy-handler.h"
#include "empathy-dispatch-operation.h"
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;
-/* Requesting 1 to 1 stream media channels */
-void empathy_dispatcher_call_with_contact (EmpathyContact *contact,
+void empathy_dispatcher_create_channel (EmpathyDispatcher *dispatcher,
+ TpConnection *connection, GHashTable *request,
EmpathyDispatcherRequestCb *callback, gpointer user_data);
/* Requesting 1 to 1 text channels */
-void empathy_dispatcher_chat_with_contact_id (McAccount *account,
+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,
gpointer user_data);
/* Request a muc channel */
-void empathy_dispatcher_join_muc (McAccount *account,
+void empathy_dispatcher_join_muc (TpConnection *connection,
const gchar *roomname, EmpathyDispatcherRequestCb *callback,
gpointer user_data);
+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, ...);
+
+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);
-GType empathy_dispatcher_tube_get_type (void);
-
-/* 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);
G_END_DECLS