Fork me on GitHub
Loading...
Searching...
No Matches
Data Fields
janus_plugin_result Struct Reference

Janus plugin result. More...

#include <plugin.h>

Data Fields

janus_plugin_result_type type
 Result type.
 
const char * text
 Text associated with this plugin result.
 
json_tcontent
 Result content.
 

Detailed Description

Janus plugin result.

Field Documentation

◆ content

json_t* janus_plugin_result::content

Result content.

Note
This is ONLY used for JANUS_PLUGIN_OK, and is ignored otherwise. It MUST be a valid JSON payload (even when returning application level errors). Its reference is decremented automatically when destroying the janus_plugin_result instance, so if your plugin wants to re-use the same object for multiple responses, you have to json_incref the object before passing it to the core, and json_decref it when you're done with it.

◆ text

const char* janus_plugin_result::text

Text associated with this plugin result.

Note
This is ONLY used for JANUS_PLUGIN_OK_WAIT (to provide hints on why a request is being handled asynchronously) and JANUS_PLUGIN_ERROR (to provide a reason for the error). It is ignored for JANUS_PLUGIN_OK. Besides, it is NOT freed when destroying the janus_plugin_result instance, so if you allocated a string for that, you'll have to free it yourself.

◆ type

janus_plugin_result_type janus_plugin_result::type

Result type.


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