Loading...
Searching...
No Matches
logger.h
Go to the documentation of this file.
#ifndef JANUS_LOGGER_H
#define JANUS_LOGGER_H
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <unistd.h>
#include <inttypes.h>
#include <glib.h>
#include <jansson.h>
#include "../utils.h"
#define JANUS_LOGGER_API_VERSION 3
#define JANUS_LOGGER_INIT(...) { \
.init = NULL, \
.destroy = NULL, \
.get_api_compatibility = NULL, \
.get_version = NULL, \
.get_version_string = NULL, \
.get_description = NULL, \
.get_name = NULL, \
.get_author = NULL, \
.get_package = NULL, \
.incoming_logline = NULL, \
## __VA_ARGS__ }
typedef struct janus_logger janus_logger;
struct janus_logger {
int (* const init)(const char *server_name, const char *config_path);
void (* const destroy)(void);
int (* const get_api_compatibility)(void);
int (* const get_version)(void);
const char *(* const get_version_string)(void);
const char *(* const get_description)(void);
const char *(* const get_name)(void);
const char *(* const get_author)(void);
const char *(* const get_package)(void);
void (* const incoming_logline)(int64_t timestamp, const char *line);
json_t *(* const handle_request)(json_t *request);
};
typedef janus_logger* create_l(void);
#endif
create_l
janus_logger * create_l(void)
The hook that logger plugins need to implement to be created from the Janus core.
Definition logger.h:176
json_t
struct json_t json_t
Definition plugin.h:236
janus_logger
The logger plugin session and callbacks interface.
Definition logger.h:123
janus_logger::get_api_compatibility
int(*const get_api_compatibility)(void)
Informative method to request the API version this logger plugin was compiled against.
Definition logger.h:135
janus_logger::get_description
const char *(*const get_description)(void)
Informative method to request a description of the logger plugin.
Definition logger.h:141
janus_logger::init
int(*const init)(const char *server_name, const char *config_path)
Logger plugin initialization/constructor.
Definition logger.h:128
janus_logger::destroy
void(*const destroy)(void)
Logger plugin deinitialization/destructor.
Definition logger.h:130
janus_logger::get_name
const char *(*const get_name)(void)
Informative method to request the name of the logger plugin.
Definition logger.h:143
janus_logger::get_version_string
const char *(*const get_version_string)(void)
Informative method to request the string version of the logger plugin.
Definition logger.h:139
janus_logger::get_version
int(*const get_version)(void)
Informative method to request the numeric version of the logger plugin.
Definition logger.h:137
janus_logger::get_package
const char *(*const get_package)(void)
Informative method to request the package name of the logger plugin (what will be used in web applica...
Definition logger.h:147
janus_logger::get_author
const char *(*const get_author)(void)
Informative method to request the author of the logger plugin.
Definition logger.h:145
janus_logger::handle_request
json_t *(*const handle_request)(json_t *request)
Method to send a request to this specific logger plugin.
Definition logger.h:172
janus_logger::incoming_logline
void(*const incoming_logline)(int64_t timestamp, const char *line)
Method to notify the logger plugin that a new log line is available.
Definition logger.h:159
utils.h
TURN REST API client.