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

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <mcd-dispatcher.h>

                        McdDispatcher;
    McdDispatcher *     mcd_dispatcher_new                  (TpDBusDaemon *dbus_daemon,
                                                             McdMaster *master);
    gint                mcd_dispatcher_get_channel_type_usage
                                                            (McdDispatcher *dispatcher,
                                                             GQuark chan_type_quark);
    void                mcd_dispatcher_add_filter           (McdDispatcher *dispatcher,
                                                             McdFilterFunc filter,
                                                             guint priority,
                                                             gpointer user_data);
    void                mcd_dispatcher_add_filters          (McdDispatcher *dispatcher,
                                                             const McdFilter *filters);

## Object Hierarchy

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

## Implemented Interfaces

McdDispatcher implements TpSvcChannelDispatcher, TpSvcChannelDispatcherInterfaceOperationList and TpSvcDBusProperties.

## Properties

      "dbus-daemon"              TpDBusDaemon*         : Read / Write / Construct
      "dispatch-operations"      GPtrArray_GValueArray_DBusGObjectPath+GHashTable_gchararray+GValue___*  : Read
      "interfaces"               GStrv*                : Read
      "mcd-master"               McdMaster*            : Read / Write / Construct

## Description

FIXME

## Details

### McdDispatcher

    typedef struct _McdDispatcher McdDispatcher;

### mcd_dispatcher_new ()

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

`dbus_daemon` : |
`master` : |
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_add_filter ()

    void                mcd_dispatcher_add_filter           (McdDispatcher *dispatcher,
                                                             McdFilterFunc filter,
                                                             guint priority,
                                                             gpointer user_data);

Register a filter into the dispatcher chain: `filter` will be invoked whenever channels need to be dispatched.

`dispatcher` : | The McdDispatcher.
`filter` : | the filter function to be registered.
`priority` : | The priority of the filter.
`user_data` : | user data to be passed to `filter` on invocation.

### mcd_dispatcher_add_filters ()

    void                mcd_dispatcher_add_filters          (McdDispatcher *dispatcher,
                                                             const McdFilter *filters);

Convenience function to add a batch of filters at once.

`dispatcher` : | The McdDispatcher.
`filters` : | a zero-terminated array of McdFilter elements.

## Property Details

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

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

DBus daemon.

### The `"dispatch-operations"` property

      "dispatch-operations"      GPtrArray_GValueArray_DBusGObjectPath+GHashTable_gchararray+GValue___*  : Read

A dbus-glib a(oa{sv}).

### The `"interfaces"` property

      "interfaces"               GStrv*                : Read

Interfaces.

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

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

McdMaster.