Asterisk - The Open Source Telephony Project  GIT-master-a1fa8df
Data Fields
stasis_app_event_source Struct Reference

Event source information and callbacks. More...

#include <stasis_app.h>

Data Fields

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

Detailed Description

Event source information and callbacks.

Definition at line 174 of file stasis_app.h.

Field Documentation

◆ find

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

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

Parameters
appApplication
idA unique identifier to search on
Returns
The data object associated with the id/name.

Definition at line 186 of file stasis_app.h.

Referenced by app_subscribe().

◆ is_subscribed

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

Find an event source by the given id/name.

Parameters
appApplication
idA unique identifier to check
Returns
true if id is subscribed, false otherwise.

Definition at line 216 of file stasis_app.h.

Referenced by app_unsubscribe().

◆ next [1/2]

struct { ... } next

Next item in the list

◆ next [2/2]

◆ scheme

const char* scheme

The scheme to match against on [un]subscribes.

Definition at line 176 of file stasis_app.h.

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

◆ subscribe

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

Subscribe an application to an event source.

Parameters
appApplication
objan event source data object
Returns
0 on success, failure code otherwise

Definition at line 196 of file stasis_app.h.

Referenced by __stasis_app_register(), and app_subscribe().

◆ to_json

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

Convert event source data to json.

Parameters
appApplication
idjson object to fill

Definition at line 224 of file stasis_app.h.

Referenced by app_event_sources_to_json().

◆ unsubscribe

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

Cancel the subscription an app has to an event source.

Parameters
appApplication
ida previously subscribed object id
Returns
0 on success, failure code otherwise

Definition at line 206 of file stasis_app.h.

Referenced by app_unsubscribe().


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