Fork me on GitHub
Data Structures | Macros | Typedefs | Functions
janus_mqttevh.c File Reference

Janus MQTTEventHandler plugin. More...

#include "eventhandler.h"
#include <MQTTAsync.h>
#include "../debug.h"
#include "../config.h"
#include "../utils.h"
#include "../events.h"
Include dependency graph for janus_mqttevh.c:

Data Structures

struct  janus_mqttevh_context
 

Macros

#define JANUS_MQTTEVH_VERSION   1
 
#define JANUS_MQTTEVH_VERSION_STRING   "0.1.0"
 
#define JANUS_MQTTEVH_DESCRIPTION   "An MQTT event handler plugin for Janus."
 
#define JANUS_MQTTEVH_NAME   "JANUS MQTTEventHandler plugin"
 
#define JANUS_MQTTEVH_AUTHOR   "Olle E. Johansson, Edvina AB"
 
#define JANUS_MQTTEVH_PACKAGE   "janus.eventhandler.mqttevh"
 
#define DEFAULT_ADDPLUGIN   1
 
#define DEFAULT_ADDEVENT   1
 
#define DEFAULT_KEEPALIVE   30
 
#define DEFAULT_CLEANSESSION   0 /* Off */
 
#define DEFAULT_TIMEOUT   30
 
#define DEFAULT_DISCONNECT_TIMEOUT   100
 
#define DEFAULT_QOS   0
 
#define DEFAULT_RETAIN   0
 
#define DEFAULT_WILL_CONTENT   "{\"event\": \"disconnect\" }"
 
#define DEFAULT_WILL_RETAIN   1
 
#define DEFAULT_WILL_QOS   0
 
#define DEFAULT_BASETOPIC   "/janus/events"
 
#define DEFAULT_MQTTURL   "tcp://localhost:1883"
 
#define DEFAULT_JSON_FORMAT   JSON_INDENT(3) | JSON_PRESERVE_ORDER
 
#define DEFAULT_TLS_ENABLE   FALSE
 
#define DEFAULT_TLS_VERIFY_PEER   FALSE
 
#define DEFAULT_TLS_VERIFY_HOST   FALSE
 
#define JANUS_MQTTEVH_ERROR_INVALID_REQUEST   411
 
#define JANUS_MQTTEVH_ERROR_MISSING_ELEMENT   412
 
#define JANUS_MQTTEVH_ERROR_INVALID_ELEMENT   413
 
#define JANUS_MQTTEVH_ERROR_UNKNOWN_ERROR   499
 

Typedefs

typedef struct janus_mqttevh_context janus_mqttevh_context
 

Functions

janus_eventhandlercreate (void)
 
json_tjanus_mqttevh_handle_request (json_t *request)
 

Detailed Description

Janus MQTTEventHandler plugin.

Author
Olle E. Johansson oej@e.nosp@m.dvin.nosp@m.a.net

This is an MQTT event handler plugin for Janus. It is a refactoring of the original effort contributed by Olle E. Johansson (see https://github.com/meetecho/janus-gateway/pull/1185), which was based on the MQTT transport by Andrei Nesterov and the RabbitMQ event plugin by Piter Konstantinov.

Event Handlers

Macro Definition Documentation

#define DEFAULT_ADDEVENT   1
#define DEFAULT_ADDPLUGIN   1
#define DEFAULT_BASETOPIC   "/janus/events"
#define DEFAULT_CLEANSESSION   0 /* Off */
#define DEFAULT_DISCONNECT_TIMEOUT   100
#define DEFAULT_JSON_FORMAT   JSON_INDENT(3) | JSON_PRESERVE_ORDER
#define DEFAULT_KEEPALIVE   30
#define DEFAULT_MQTTURL   "tcp://localhost:1883"
#define DEFAULT_QOS   0
#define DEFAULT_RETAIN   0
#define DEFAULT_TIMEOUT   30
#define DEFAULT_TLS_ENABLE   FALSE
#define DEFAULT_TLS_VERIFY_HOST   FALSE
#define DEFAULT_TLS_VERIFY_PEER   FALSE
#define DEFAULT_WILL_CONTENT   "{\"event\": \"disconnect\" }"
#define DEFAULT_WILL_QOS   0
#define DEFAULT_WILL_RETAIN   1
#define JANUS_MQTTEVH_AUTHOR   "Olle E. Johansson, Edvina AB"
#define JANUS_MQTTEVH_DESCRIPTION   "An MQTT event handler plugin for Janus."
#define JANUS_MQTTEVH_ERROR_INVALID_ELEMENT   413
#define JANUS_MQTTEVH_ERROR_INVALID_REQUEST   411
#define JANUS_MQTTEVH_ERROR_MISSING_ELEMENT   412
#define JANUS_MQTTEVH_ERROR_UNKNOWN_ERROR   499
#define JANUS_MQTTEVH_NAME   "JANUS MQTTEventHandler plugin"
#define JANUS_MQTTEVH_PACKAGE   "janus.eventhandler.mqttevh"
#define JANUS_MQTTEVH_VERSION   1
#define JANUS_MQTTEVH_VERSION_STRING   "0.1.0"

Typedef Documentation

Function Documentation

janus_eventhandler* create ( void  )
json_t * janus_mqttevh_handle_request ( json_t request)