## EmpathyDispatcher EmpathyDispatcher |

## Synopsis

                        EmpathyDispatcher;
    void                empathy_dispatcher_create_channel   (EmpathyDispatcher *dispatcher,
                                                             TpConnection *connection,
                                                             GHashTable *request,
                                                             EmpathyDispatcherRequestCb *callback,
                                                             gpointer user_data);
    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);
    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);
    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,
                                                             ...);
    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);
    EmpathyDispatcher * empathy_dispatcher_dup_singleton    (void);

## Object Hierarchy

      GObject
       +----EmpathyDispatcher

## Properties

      "handler"                  EmpathyHandler*       : Read / Write / Construct Only

## Signals

      "approve"                                        : Run Last
      "dispatch"                                       : Run Last
      "observe"                                        : Run Last

## Description

## Details

### EmpathyDispatcher

    typedef struct _EmpathyDispatcher EmpathyDispatcher;

### empathy_dispatcher_create_channel ()

    void                empathy_dispatcher_create_channel   (EmpathyDispatcher *dispatcher,
                                                             TpConnection *connection,
                                                             GHashTable *request,
                                                             EmpathyDispatcherRequestCb *callback,
                                                             gpointer user_data);

`dispatcher` : |
`connection` : |
`request` : |
`callback` : |
`user_data` : |

### empathy_dispatcher_chat_with_contact_id ()

    void                empathy_dispatcher_chat_with_contact_id
                                                            (TpConnection *connection,
                                                             const gchar *contact_id,
                                                             EmpathyDispatcherRequestCb *callback,
                                                             gpointer user_data);

`connection` : |
`contact_id` : |
`callback` : |
`user_data` : |

### empathy_dispatcher_chat_with_contact ()

    void                empathy_dispatcher_chat_with_contact
                                                            (EmpathyContact *contact,
                                                             EmpathyDispatcherRequestCb *callback,
                                                             gpointer user_data);

`contact` : |
`callback` : |
`user_data` : |

### empathy_dispatcher_send_file_to_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);

`contact` : |
`filename` : |
`size` : |
`date` : |
`content_type` : |
`callback` : |
`user_data` : |

### empathy_dispatcher_join_muc ()

    void                empathy_dispatcher_join_muc         (TpConnection *connection,
                                                             const gchar *roomname,
                                                             EmpathyDispatcherRequestCb *callback,
                                                             gpointer user_data);

`connection` : |
`roomname` : |
`callback` : |
`user_data` : |

### empathy_dispatcher_find_requestable_channel_classes_async ()

    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,
                                                             ...);

Please see the documentation of `empathy_dispatcher_find_requestable_channel_classes()` for a detailed description of this function.

`dispatcher` : | an EmpathyDispatcher
`connection` : | a TpConnection
`channel_type` : | a string identifying the type of the channel to lookup
`handle_type` : | the handle type for the channel
`callback` : | the callback to call when `connection` is ready
`user_data` : | the user data to pass to `callback`
`first_property_name` : | `NULL`, or the name of the first fixed property, followed optionally by more names, followed by `NULL`.
`...` : |

### empathy_dispatcher_find_requestable_channel_classes ()

    GList *             empathy_dispatcher_find_requestable_channel_classes
                                                            (EmpathyDispatcher *dispatcher,
                                                             TpConnection *connection,
                                                             const gchar *channel_type,
                                                             guint handle_type,
                                                             const char *first_property_name,
                                                             ...);

Returns all the channel classes that a client can request for the connection `connection`, of the type identified by `channel_type`, `handle_type` and the fixed properties list. The classes which are compatible with a fixed properties list (i.e. those that will be returned by this function) are intended as those that do not contain any fixed property other than those in the list; note that this doesn't guarantee that all the classes compatible with the list will contain all the requested fixed properties, so the clients will have to filter the returned list themselves. If `first_property_name` is `NULL`, only the classes with no other fixed properties than ChannelType and TargetHandleType will be returned. Note that this function may return `NULL` without performing any lookup if `connection` is not ready. To ensure that `connection` is always ready, use the `empathy_dispatcher_find_requestable_channel_classes_async()` variant.

`dispatcher` : | an EmpathyDispatcher
`connection` : | a TpConnection
`channel_type` : | a string identifying the type of the channel to lookup
`handle_type` : | the handle type for the channel
`first_property_name` : | `NULL`, or the name of the first fixed property, followed optionally by more names, followed by `NULL`.
`...` : |
Returns : | a GList of GValueArray objects, where the first element in the array is a GHashTable of the fixed properties, and the second is a GStrv of the allowed properties for the class. The list should be free'd with `g_list_free()` when done, but the objects inside the list are owned by the EmpathyDispatcher and must not be modified.

### empathy_dispatcher_new ()

    EmpathyDispatcher * empathy_dispatcher_new              (const gchar *name,
                                                             GPtrArray *filters,
                                                             GStrv capabilities);

`name` : |
`filters` : |
`capabilities` : |
Returns : |

### empathy_dispatcher_add_handler ()

    EmpathyHandler *    empathy_dispatcher_add_handler      (EmpathyDispatcher *dispatcher,
                                                             const gchar *name,
                                                             GPtrArray *filters,
                                                             GStrv capabilities);

`dispatcher` : |
`name` : |
`filters` : |
`capabilities` : |
Returns : |

### empathy_dispatcher_remove_handler ()

    void                empathy_dispatcher_remove_handler   (EmpathyDispatcher *dispatcher,
                                                             EmpathyHandler *handler);

`dispatcher` : |
`handler` : |

### empathy_dispatcher_dup_singleton ()

    EmpathyDispatcher * empathy_dispatcher_dup_singleton    (void);

Returns : |

## Property Details

### The `"handler"` property

      "handler"                  EmpathyHandler*       : Read / Write / Construct Only

The main Telepathy Client Hander object.

## Signal Details

### The `"approve"` signal

    void                user_function                      (EmpathyDispatcher        *empathydispatcher,
                                                            EmpathyDispatchOperation *arg1,
                                                            gpointer                  user_data)              : Run Last

`empathydispatcher` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"dispatch"` signal

    void                user_function                      (EmpathyDispatcher        *empathydispatcher,
                                                            EmpathyDispatchOperation *arg1,
                                                            gpointer                  user_data)              : Run Last

`empathydispatcher` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The `"observe"` signal

    void                user_function                      (EmpathyDispatcher        *empathydispatcher,
                                                            EmpathyDispatchOperation *arg1,
                                                            gpointer                  user_data)              : Run Last

`empathydispatcher` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.