Fork me on GitHub
Functions
plugin.c File Reference
#include "plugin.h"
#include <jansson.h>
#include "../apierror.h"
#include "../debug.h"
Include dependency graph for plugin.c:

Functions

janus_plugin_resultjanus_plugin_result_new (janus_plugin_result_type type, const char *text, json_t *content)
 Helper to quickly create a janus_plugin_result instance. More...
 
void janus_plugin_result_destroy (janus_plugin_result *result)
 Helper to quickly destroy a janus_plugin_result instance. More...
 

Function Documentation

void janus_plugin_result_destroy ( janus_plugin_result result)

Helper to quickly destroy a janus_plugin_result instance.

Parameters
[in]resultThe janus_plugin_result instance to destroy
Note
Will decrease the reference counter of the JSON content, if available
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.

Parameters
[in]typeThe type of result
[in]textString to add to the result (for JANUS_PLUGIN_OK_WAIT or JANUS_PLUGIN_ERROR), if any
[in]contentThe json_t object with the content of the result, if any
Returns
A valid janus_plugin_result instance, if successful, or NULL otherwise