148 #ifndef _JANUS_PLUGIN_H 149 #define _JANUS_PLUGIN_H 157 #include <inttypes.h> 173 #define JANUS_PLUGIN_API_VERSION 13 191 #define JANUS_PLUGIN_INIT(...) { \ 194 .get_api_compatibility = NULL, \ 195 .get_version = NULL, \ 196 .get_version_string = NULL, \ 197 .get_description = NULL, \ 199 .get_author = NULL, \ 200 .get_package = NULL, \ 201 .create_session = NULL, \ 202 .handle_message = NULL, \ 203 .handle_admin_message = NULL, \ 204 .setup_media = NULL, \ 205 .incoming_rtp = NULL, \ 206 .incoming_rtcp = NULL, \ 207 .incoming_data = NULL, \ 209 .hangup_media = NULL, \ 210 .destroy_session = NULL, \ 211 .query_session = NULL, \ 248 void (*
const destroy)(void);
256 int (*
const get_api_compatibility)(void);
258 int (*
const get_version)(void);
388 gboolean (*
const events_is_enabled)(void);
400 gboolean (*
const auth_is_signature_valid)(
janus_plugin *plugin,
const char *token);
406 gboolean (*
const auth_signature_contains)(
janus_plugin *plugin,
const char *token,
const char *descriptor);
The request was correctly handled and a response is provided (synchronous)
Definition: plugin.h:437
volatile gint stopped
Whether this mapping has been stopped definitely or not: if so, the plugin shouldn't make use of it a...
Definition: plugin.h:235
Reference counter mechanism.
json_t *(*const query_session)(janus_plugin_session *handle)
Method to get plugin-specific info of a session/handle.
Definition: plugin.h:339
struct json_t json_t
Definition: plugin.h:225
void * gateway_handle
Opaque pointer to the Janus core-level handle.
Definition: plugin.h:230
const char *(*const get_author)(void)
Informative method to request the author of the plugin.
Definition: plugin.h:266
const char *(*const get_version_string)(void)
Informative method to request the string version of the plugin.
Definition: plugin.h:260
const char *(*const get_name)(void)
Informative method to request the name of the plugin.
Definition: plugin.h:264
Definition: refcount.h:78
void janus_plugin_result_destroy(janus_plugin_result *result)
Helper to quickly destroy a janus_plugin_result instance.
Definition: plugin.c:32
Janus plugin result.
Definition: plugin.h:443
janus_plugin_result_type
Result types.
Definition: plugin.h:433
const char *(*const get_package)(void)
Informative method to request the package name of the plugin (what will be used in web applications t...
Definition: plugin.h:268
The request was correctly handled and notifications will follow with more info (asynchronous) ...
Definition: plugin.h:439
The plugin session and callbacks interface.
Definition: plugin.h:241
const char *(*const get_description)(void)
Informative method to request a description of the plugin.
Definition: plugin.h:262
json_t * content
Result content.
Definition: plugin.h:460
A severe error happened (not an application level error)
Definition: plugin.h:435
janus_refcount ref
Reference counter for this instance.
Definition: plugin.h:237
janus_plugin * create_p(void)
The hook that plugins need to implement to be created from the Janus core.
Definition: plugin.h:410
Callbacks to contact the Janus core.
Definition: plugin.h:344
janus_plugin_result * janus_plugin_result_new(janus_plugin_result_type type, const char *text, json_t *content)
Helper to quickly create a janus_plugin_result instance.
Definition: plugin.c:19
void * plugin_handle
Opaque pointer to the plugin session.
Definition: plugin.h:232
Plugin-Gateway session mapping.
Definition: plugin.h:228
const char * text
Text associated with this plugin result.
Definition: plugin.h:452
janus_plugin_result_type type
Result type.
Definition: plugin.h:445