Loading...
Searching...
No Matches
janus_sampleevh.c File Reference
Event Handlers

Janus SampleEventHandler plugin. More...

`#include "eventhandler.h"`
`#include <math.h>`
`#include <curl/curl.h>`
`#include "../debug.h"`
`#include "../config.h"`
`#include "../mutex.h"`
`#include "../utils.h"`
`#include "../events.h"`
Include dependency graph for janus_sampleevh.c:

## Macros

#define | JANUS_SAMPLEEVH_VERSION 1
#define | JANUS_SAMPLEEVH_VERSION_STRING "0.0.1"
#define | JANUS_SAMPLEEVH_DESCRIPTION "This is a trivial sample event handler plugin for Janus, which forwards events via HTTP POST."
#define | JANUS_SAMPLEEVH_NAME "JANUS SampleEventHandler plugin"
#define | JANUS_SAMPLEEVH_AUTHOR "Meetecho s.r.l."
#define | JANUS_SAMPLEEVH_PACKAGE "janus.eventhandler.sampleevh"
#define | JANUS_SAMPLEEVH_ERROR_INVALID_REQUEST 411
#define | JANUS_SAMPLEEVH_ERROR_MISSING_ELEMENT 412
#define | JANUS_SAMPLEEVH_ERROR_INVALID_ELEMENT 413
#define | JANUS_SAMPLEEVH_ERROR_UNKNOWN_ERROR 499

## Functions

janus_eventhandler * | create (void)
int | janus_sampleevh_init (const char *config_path)
void | janus_sampleevh_destroy (void)
int | janus_sampleevh_get_api_compatibility (void)
int | janus_sampleevh_get_version (void)
const char * | janus_sampleevh_get_version_string (void)
const char * | janus_sampleevh_get_description (void)
const char * | janus_sampleevh_get_name (void)
const char * | janus_sampleevh_get_author (void)
const char * | janus_sampleevh_get_package (void)
void | janus_sampleevh_incoming_event (json_t *event)
json_t * | janus_sampleevh_handle_request (json_t *request)

## Detailed Description

Janus SampleEventHandler plugin.

Author
  Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Copyright
  GNU General Public License v3

This is a trivial event handler plugin for Janus, which is only there to showcase how you can handle an event coming from the Janus core or one of the plugins. This specific plugin forwards every event it receives to a web server via an HTTP POST request, using libcurl.

Event handlers documentation

## Macro Definition Documentation

## JANUS_SAMPLEEVH_AUTHOR

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

## JANUS_SAMPLEEVH_DESCRIPTION

#define JANUS_SAMPLEEVH_DESCRIPTION "This is a trivial sample event handler plugin for Janus, which forwards events via HTTP POST."

## JANUS_SAMPLEEVH_ERROR_INVALID_ELEMENT

#define JANUS_SAMPLEEVH_ERROR_INVALID_ELEMENT 413

## JANUS_SAMPLEEVH_ERROR_INVALID_REQUEST

#define JANUS_SAMPLEEVH_ERROR_INVALID_REQUEST 411

## JANUS_SAMPLEEVH_ERROR_MISSING_ELEMENT

#define JANUS_SAMPLEEVH_ERROR_MISSING_ELEMENT 412

## JANUS_SAMPLEEVH_ERROR_UNKNOWN_ERROR

#define JANUS_SAMPLEEVH_ERROR_UNKNOWN_ERROR 499

## JANUS_SAMPLEEVH_NAME

#define JANUS_SAMPLEEVH_NAME "JANUS SampleEventHandler plugin"

## JANUS_SAMPLEEVH_PACKAGE

#define JANUS_SAMPLEEVH_PACKAGE "janus.eventhandler.sampleevh"

## JANUS_SAMPLEEVH_VERSION

#define JANUS_SAMPLEEVH_VERSION 1

## JANUS_SAMPLEEVH_VERSION_STRING

#define JANUS_SAMPLEEVH_VERSION_STRING "0.0.1"

## Function Documentation

## create()

janus_eventhandler * create | ( | void |  | ) |

## janus_sampleevh_destroy()

void janus_sampleevh_destroy | ( | void |  | ) |

## janus_sampleevh_get_api_compatibility()

int janus_sampleevh_get_api_compatibility | ( | void |  | ) |

## janus_sampleevh_get_author()

const char * janus_sampleevh_get_author | ( | void |  | ) |

## janus_sampleevh_get_description()

const char * janus_sampleevh_get_description | ( | void |  | ) |

## janus_sampleevh_get_name()

const char * janus_sampleevh_get_name | ( | void |  | ) |

## janus_sampleevh_get_package()

const char * janus_sampleevh_get_package | ( | void |  | ) |

## janus_sampleevh_get_version()

int janus_sampleevh_get_version | ( | void |  | ) |

## janus_sampleevh_get_version_string()

const char * janus_sampleevh_get_version_string | ( | void |  | ) |

## janus_sampleevh_handle_request()

json_t * janus_sampleevh_handle_request | ( | json_t * | request | ) |

## janus_sampleevh_incoming_event()

void janus_sampleevh_incoming_event | ( | json_t * | event | ) |

## janus_sampleevh_init()

int janus_sampleevh_init | ( | const char * | config_path | ) |