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

Janus RabbitMQ transport plugin. More...

#include "transport.h"
#include <amqp.h>
#include <amqp_framing.h>
#include <amqp_tcp_socket.h>
#include <amqp_ssl_socket.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../utils.h"
Include dependency graph for janus_rabbitmq.c:

Data Structures

struct  janus_rabbitmq_client
 
struct  janus_rabbitmq_response
 

Macros

#define JANUS_RABBITMQ_VERSION   1
 
#define JANUS_RABBITMQ_VERSION_STRING   "0.0.1"
 
#define JANUS_RABBITMQ_DESCRIPTION   "This transport plugin adds RabbitMQ support to the Janus API via rabbitmq-c."
 
#define JANUS_RABBITMQ_NAME   "JANUS RabbitMQ transport plugin"
 
#define JANUS_RABBITMQ_AUTHOR   "Meetecho s.r.l."
 
#define JANUS_RABBITMQ_PACKAGE   "janus.transport.rabbitmq"
 
#define JANUS_RABBITMQ_EXCHANGE_TYPE   "fanout"
 
#define JANUS_RABBITMQ_ERROR_INVALID_REQUEST   411
 
#define JANUS_RABBITMQ_ERROR_MISSING_ELEMENT   412
 
#define JANUS_RABBITMQ_ERROR_INVALID_ELEMENT   413
 
#define JANUS_RABBITMQ_ERROR_UNKNOWN_ERROR   499
 

Typedefs

typedef struct janus_rabbitmq_client janus_rabbitmq_client
 
typedef struct janus_rabbitmq_response janus_rabbitmq_response
 

Functions

janus_transportcreate (void)
 
int janus_rabbitmq_init (janus_transport_callbacks *callback, const char *config_path)
 
void janus_rabbitmq_destroy (void)
 
int janus_rabbitmq_get_api_compatibility (void)
 
int janus_rabbitmq_get_version (void)
 
const char * janus_rabbitmq_get_version_string (void)
 
const char * janus_rabbitmq_get_description (void)
 
const char * janus_rabbitmq_get_name (void)
 
const char * janus_rabbitmq_get_author (void)
 
const char * janus_rabbitmq_get_package (void)
 
gboolean janus_rabbitmq_is_janus_api_enabled (void)
 
gboolean janus_rabbitmq_is_admin_api_enabled (void)
 
int janus_rabbitmq_send_message (janus_transport_session *transport, void *request_id, gboolean admin, json_t *message)
 
void janus_rabbitmq_session_created (janus_transport_session *transport, guint64 session_id)
 
void janus_rabbitmq_session_over (janus_transport_session *transport, guint64 session_id, gboolean timeout, gboolean claimed)
 
void janus_rabbitmq_session_claimed (janus_transport_session *transport, guint64 session_id)
 
json_tjanus_rabbitmq_query_transport (json_t *request)
 
void * janus_rmq_in_thread (void *data)
 
void * janus_rmq_out_thread (void *data)
 

Detailed Description

Janus RabbitMQ transport plugin.

Author
Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om
Note
When you create a session using RabbitMQ, a subscription to the events related to it is done automatically through the outgoing queue, so no need for an explicit request as the GET in the plain HTTP API.

transports

Macro Definition Documentation

◆ JANUS_RABBITMQ_AUTHOR

#define JANUS_RABBITMQ_AUTHOR   "Meetecho s.r.l."

◆ JANUS_RABBITMQ_DESCRIPTION

#define JANUS_RABBITMQ_DESCRIPTION   "This transport plugin adds RabbitMQ support to the Janus API via rabbitmq-c."

◆ JANUS_RABBITMQ_ERROR_INVALID_ELEMENT

#define JANUS_RABBITMQ_ERROR_INVALID_ELEMENT   413

◆ JANUS_RABBITMQ_ERROR_INVALID_REQUEST

#define JANUS_RABBITMQ_ERROR_INVALID_REQUEST   411

◆ JANUS_RABBITMQ_ERROR_MISSING_ELEMENT

#define JANUS_RABBITMQ_ERROR_MISSING_ELEMENT   412

◆ JANUS_RABBITMQ_ERROR_UNKNOWN_ERROR

#define JANUS_RABBITMQ_ERROR_UNKNOWN_ERROR   499

◆ JANUS_RABBITMQ_EXCHANGE_TYPE

#define JANUS_RABBITMQ_EXCHANGE_TYPE   "fanout"

◆ JANUS_RABBITMQ_NAME

#define JANUS_RABBITMQ_NAME   "JANUS RabbitMQ transport plugin"

◆ JANUS_RABBITMQ_PACKAGE

#define JANUS_RABBITMQ_PACKAGE   "janus.transport.rabbitmq"

◆ JANUS_RABBITMQ_VERSION

#define JANUS_RABBITMQ_VERSION   1

◆ JANUS_RABBITMQ_VERSION_STRING

#define JANUS_RABBITMQ_VERSION_STRING   "0.0.1"

Typedef Documentation

◆ janus_rabbitmq_client

◆ janus_rabbitmq_response

Function Documentation

◆ create()

janus_transport* create ( void  )

◆ janus_rabbitmq_destroy()

void janus_rabbitmq_destroy ( void  )

◆ janus_rabbitmq_get_api_compatibility()

int janus_rabbitmq_get_api_compatibility ( void  )

◆ janus_rabbitmq_get_author()

const char * janus_rabbitmq_get_author ( void  )

◆ janus_rabbitmq_get_description()

const char * janus_rabbitmq_get_description ( void  )

◆ janus_rabbitmq_get_name()

const char * janus_rabbitmq_get_name ( void  )

◆ janus_rabbitmq_get_package()

const char * janus_rabbitmq_get_package ( void  )

◆ janus_rabbitmq_get_version()

int janus_rabbitmq_get_version ( void  )

◆ janus_rabbitmq_get_version_string()

const char * janus_rabbitmq_get_version_string ( void  )

◆ janus_rabbitmq_init()

int janus_rabbitmq_init ( janus_transport_callbacks callback,
const char *  config_path 
)

◆ janus_rabbitmq_is_admin_api_enabled()

gboolean janus_rabbitmq_is_admin_api_enabled ( void  )

◆ janus_rabbitmq_is_janus_api_enabled()

gboolean janus_rabbitmq_is_janus_api_enabled ( void  )

◆ janus_rabbitmq_query_transport()

json_t * janus_rabbitmq_query_transport ( json_t request)

◆ janus_rabbitmq_send_message()

int janus_rabbitmq_send_message ( janus_transport_session transport,
void *  request_id,
gboolean  admin,
json_t message 
)

◆ janus_rabbitmq_session_claimed()

void janus_rabbitmq_session_claimed ( janus_transport_session transport,
guint64  session_id 
)

◆ janus_rabbitmq_session_created()

void janus_rabbitmq_session_created ( janus_transport_session transport,
guint64  session_id 
)

◆ janus_rabbitmq_session_over()

void janus_rabbitmq_session_over ( janus_transport_session transport,
guint64  session_id,
gboolean  timeout,
gboolean  claimed 
)

◆ janus_rmq_in_thread()

void * janus_rmq_in_thread ( void *  data)

◆ janus_rmq_out_thread()

void * janus_rmq_out_thread ( void *  data)