mcd-dispatcher-context

mcd-dispatcher-context

Synopsis

#define             MCD_PLUGIN_INIT_FUNC
#define             MCD_FILTER_IN
#define             MCD_FILTER_OUT
                    McdDispatcherContext;
void                (*McdFilterFunc)                    (McdDispatcherContext *ctx,
                                                         gpointer user_data);
#define             MCD_FILTER_PRIORITY_CRITICAL
#define             MCD_FILTER_PRIORITY_SYSTEM
#define             MCD_FILTER_PRIORITY_USER
#define             MCD_FILTER_PRIORITY_NOTICE
#define             MCD_FILTER_PRIORITY_LOW
                    McdFilter;
McdDispatcher*      mcd_dispatcher_context_get_dispatcher
                                                        (McdDispatcherContext *ctx);
TpChannel *         mcd_dispatcher_context_get_channel_object
                                                        (McdDispatcherContext *ctx);
TpConnection *      mcd_dispatcher_context_get_connection_object
                                                        (McdDispatcherContext *ctx);
McdChannel *        mcd_dispatcher_context_get_channel  (McdDispatcherContext *ctx);
const GList *       mcd_dispatcher_context_get_channels (McdDispatcherContext *context);
McdChannel *        mcd_dispatcher_context_get_channel_by_type
                                                        (McdDispatcherContext *context,
                                                         GQuark type);
McdConnection *     mcd_dispatcher_context_get_connection
                                                        (McdDispatcherContext *context);
void                mcd_dispatcher_context_process      (McdDispatcherContext *ctx,
                                                         gboolean result);

Description

Details

MCD_PLUGIN_INIT_FUNC

#define MCD_PLUGIN_INIT_FUNC  "mcd_plugin_init"


MCD_FILTER_IN

#define MCD_FILTER_IN  1<<0


MCD_FILTER_OUT

#define MCD_FILTER_OUT 1<<1


McdDispatcherContext

typedef struct _McdDispatcherContext McdDispatcherContext;


McdFilterFunc ()

void                (*McdFilterFunc)                    (McdDispatcherContext *ctx,
                                                         gpointer user_data);

ctx :

user_data :


MCD_FILTER_PRIORITY_CRITICAL

#define MCD_FILTER_PRIORITY_CRITICAL 10000


MCD_FILTER_PRIORITY_SYSTEM

#define MCD_FILTER_PRIORITY_SYSTEM   20000


MCD_FILTER_PRIORITY_USER

#define MCD_FILTER_PRIORITY_USER     30000


MCD_FILTER_PRIORITY_NOTICE

#define MCD_FILTER_PRIORITY_NOTICE   40000


MCD_FILTER_PRIORITY_LOW

#define MCD_FILTER_PRIORITY_LOW	     50000


McdFilter

typedef struct {
    McdFilterFunc func;
    guint priority;
    gpointer user_data;
} McdFilter;


mcd_dispatcher_context_get_dispatcher ()

McdDispatcher*      mcd_dispatcher_context_get_dispatcher
                                                        (McdDispatcherContext *ctx);

ctx :

Returns :


mcd_dispatcher_context_get_channel_object ()

TpChannel *         mcd_dispatcher_context_get_channel_object
                                                        (McdDispatcherContext *ctx);

ctx :

Returns :


mcd_dispatcher_context_get_connection_object ()

TpConnection *      mcd_dispatcher_context_get_connection_object
                                                        (McdDispatcherContext *ctx);

ctx :

Returns :


mcd_dispatcher_context_get_channel ()

McdChannel *        mcd_dispatcher_context_get_channel  (McdDispatcherContext *ctx);

ctx :

Returns :


mcd_dispatcher_context_get_channels ()

const GList *       mcd_dispatcher_context_get_channels (McdDispatcherContext *context);

context :

the McdDispatcherContext.

Returns :

a GList of McdChannel elements.

mcd_dispatcher_context_get_channel_by_type ()

McdChannel *        mcd_dispatcher_context_get_channel_by_type
                                                        (McdDispatcherContext *context,
                                                         GQuark type);

context :

the McdDispatcherContext.

type :

the GQuark representing the channel type.

Returns :

the first McdChannel of the requested type, or NULL.

mcd_dispatcher_context_get_connection ()

McdConnection *     mcd_dispatcher_context_get_connection
                                                        (McdDispatcherContext *context);

context :

the McdDispatcherContext.

Returns :

the McdConnection.

mcd_dispatcher_context_process ()

void                mcd_dispatcher_context_process      (McdDispatcherContext *ctx,
                                                         gboolean result);

Continue to process the context.

mcd_dispatcher_context_process (c, TRUE) is exactly equivalent to mcd_dispatcher_context_proceed (c), which should be used instead in new code.

mcd_dispatcher_context_process (c, TRUE) is exactly equivalent to mcd_dispatcher_context_destroy_all (c) followed by mcd_dispatcher_context_proceed (c), which should be used instead in new code.

ctx :

result :

FALSE if the channels are to be destroyed