## McdDispatcher McdDispatcher — Dispatcher class to dispatch channels to handlers |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <mcd-dispatcher.h>

                        McdDispatcher;
                        McdDispatcherStatus;
    McdDispatcher*      mcd_dispatcher_new                  (TpDBusDaemon *dbus_daemon,
                                                             McdMaster *master);
    gboolean            mcd_dispatcher_send                 (McdDispatcher *dispatcher,
                                                             McdChannel *channel);
    McdDispatcherStatus mcd_dispatcher_get_status           (McdDispatcher *dispatcher,
                                                             McdChannel *channel);
    gint                mcd_dispatcher_get_channel_type_usage
                                                            (McdDispatcher *dispatcher,
                                                             GQuark chan_type_quark);
    GPtrArray*          mcd_dispatcher_get_channel_capabilities
                                                            (McdDispatcher *dispatcher,
                                                             const gchar *protocol);

## Object Hierarchy

      GObject
       +----McdMission
             +----McdDispatcher

## Properties

      "dbus-daemon"              TpDBusDaemon*         : Read / Write / Construct
      "mcd-master"               McdMaster*            : Read / Write / Construct
      "plugin-dir"               gchar*                : Read / Write / Construct

## Signals

      "channel-added"                                  : Run Last / Has Details
      "channel-removed"                                : Run Last / Has Details
      "dispatch-failed"                                : Run Last / Has Details
      "dispatched"                                     : Run Last / Has Details

## Description

FIXME

## Details

### McdDispatcher

    typedef struct _McdDispatcher McdDispatcher;

### McdDispatcherStatus

    typedef struct _McdDispatcherStatus McdDispatcherStatus;

### mcd_dispatcher_new ()

    McdDispatcher*      mcd_dispatcher_new                  (TpDBusDaemon *dbus_daemon,
                                                             McdMaster *master);

`dbus_daemon` : |
`master` : |
Returns : |

### mcd_dispatcher_send ()

    gboolean            mcd_dispatcher_send                 (McdDispatcher *dispatcher,
                                                             McdChannel *channel);

`dispatcher` : |
`channel` : |
Returns : |

### mcd_dispatcher_get_status ()

    McdDispatcherStatus mcd_dispatcher_get_status           (McdDispatcher *dispatcher,
                                                             McdChannel *channel);

`dispatcher` : |
`channel` : |
Returns : |

### mcd_dispatcher_get_channel_type_usage ()

    gint                mcd_dispatcher_get_channel_type_usage
                                                            (McdDispatcher *dispatcher,
                                                             GQuark chan_type_quark);

`dispatcher` : |
`chan_type_quark` : |
Returns : |

### mcd_dispatcher_get_channel_capabilities ()

    GPtrArray*          mcd_dispatcher_get_channel_capabilities
                                                            (McdDispatcher *dispatcher,
                                                             const gchar *protocol);

`dispatcher` : |
`protocol` : |
Returns : |

## Property Details

### The `"dbus-daemon"` property

      "dbus-daemon"              TpDBusDaemon*         : Read / Write / Construct

DBus daemon.

### The `"mcd-master"` property

      "mcd-master"               McdMaster*            : Read / Write / Construct

McdMaster.

### The `"plugin-dir"` property

      "plugin-dir"               gchar*                : Read / Write / Construct

The Directory to load filter plugins from.

Default value: "/usr/local/lib/mission-control"

## Signal Details

### The `"channel-added"` signal

    void                user_function                      (McdDispatcher *mcddispatcher,
                                                            McdChannel    *arg1,
                                                            gpointer       user_data)          : Run Last / Has Details

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

### The `"channel-removed"` signal

    void                user_function                      (McdDispatcher *mcddispatcher,
                                                            McdChannel    *arg1,
                                                            gpointer       user_data)          : Run Last / Has Details

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

### The `"dispatch-failed"` signal

    void                user_function                      (McdDispatcher *mcddispatcher,
                                                            McdChannel    *arg1,
                                                            gpointer       arg2,
                                                            gpointer       user_data)          : Run Last / Has Details

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

### The `"dispatched"` signal

    void                user_function                      (McdDispatcher *mcddispatcher,
                                                            McdChannel    *arg1,
                                                            gpointer       user_data)          : Run Last / Has Details

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