stasis_app_event_source Struct Reference

Event source information and callbacks. More...

#include <stasis_app.h>

Collaboration diagram for stasis_app_event_source:

Collaboration graph
[legend]

Data Fields

void *(* find )(const struct stasis_app *app, const char *id)
 Find an event source data object by the given id/name.
int(* is_subscribed )(struct stasis_app *app, const char *id)
 Find an event source by the given id/name.
struct {
   struct stasis_app_event_source *   next
next
const char * scheme
 The scheme to match against on [un]subscribes.
int(* subscribe )(struct stasis_app *app, void *obj)
 Subscribe an application to an event source.
void(* to_json )(const struct stasis_app *app, struct ast_json *json)
 Convert event source data to json.
int(* unsubscribe )(struct stasis_app *app, const char *id)
 Cancel the subscription an app has to an event source.

Detailed Description

Event source information and callbacks.

Definition at line 139 of file stasis_app.h.


Field Documentation

void*(* find)(const struct stasis_app *app, const char *id)

Find an event source data object by the given id/name.

Parameters:
app Application
id A unique identifier to search on
Returns:
The data object associated with the id/name.

Referenced by app_subscribe().

int(* is_subscribed)(struct stasis_app *app, const char *id)

Find an event source by the given id/name.

Parameters:
app Application
id A unique identifier to check
Returns:
true if id is subscribed, false otherwise.

Referenced by app_unsubscribe().

struct { ... } next

Next item in the list

struct stasis_app_event_source* next [read]

const char* scheme

The scheme to match against on [un]subscribes.

Definition at line 141 of file stasis_app.h.

Referenced by app_event_source_find(), app_subscribe(), and app_unsubscribe().

int(* subscribe)(struct stasis_app *app, void *obj)

Subscribe an application to an event source.

Parameters:
app Application
obj an event source data object
Returns:
0 on success, failure code otherwise

Referenced by app_subscribe().

void(* to_json)(const struct stasis_app *app, struct ast_json *json)

Convert event source data to json.

Parameters:
app Application
id json object to fill

Referenced by app_event_sources_to_json().

int(* unsubscribe)(struct stasis_app *app, const char *id)

Cancel the subscription an app has to an event source.

Parameters:
app Application
id a previously subscribed object id
Returns:
0 on success, failure code otherwise

Referenced by app_unsubscribe().


The documentation for this struct was generated from the following file:

Generated on Thu Apr 16 06:37:42 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6