Skip to content

Commit

Permalink
Fix macro names to not use reserved identifiers (fixes meetecho#1725) (
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero authored Aug 9, 2019
1 parent a18d95a commit ab5d1f9
Show file tree
Hide file tree
Showing 38 changed files with 100 additions and 100 deletions.
4 changes: 2 additions & 2 deletions apierror.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* \ref core
*/

#ifndef _JANUS_API_ERROR_H
#define _JANUS_API_ERROR_H
#ifndef JANUS_API_ERROR_H
#define JANUS_API_ERROR_H

/*! \brief Success (no error) */
#define JANUS_OK 0
Expand Down
8 changes: 4 additions & 4 deletions auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
* completely up to the controlling application: these tokens are
* completely opaque to Janus, and treated as strings, which means
* Janus will only check if the token exists or not when asked.
*
*
* \ingroup core
* \ref core
*/
#ifndef _JANUS_AUTH_H
#define _JANUS_AUTH_H

#ifndef JANUS_AUTH_H
#define JANUS_AUTH_H

#include <glib.h>

Expand Down
4 changes: 2 additions & 2 deletions config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* \ref core
*/

#ifndef _JANUS_CONFIG_H
#define _JANUS_CONFIG_H
#ifndef JANUS_CONFIG_H
#define JANUS_CONFIG_H

#include <glib.h>

Expand Down
4 changes: 2 additions & 2 deletions debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* \ref core
*/

#ifndef _JANUS_DEBUG_H
#define _JANUS_DEBUG_H
#ifndef JANUS_DEBUG_H
#define JANUS_DEBUG_H

#include <glib.h>
#include <glib/gprintf.h>
Expand Down
8 changes: 4 additions & 4 deletions dtls-bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* \copyright GNU General Public License v3
* \brief OpenSSL BIO agent writer
* \details OpenSSL BIO that writes packets to a libnice agent.
*
*
* \ingroup protocols
* \ref protocols
*/
#ifndef _JANUS_DTLS_BIO_H
#define _JANUS_DTLS_BIO_H

#ifndef JANUS_DTLS_BIO_H
#define JANUS_DTLS_BIO_H

#include <openssl/opensslv.h>
#include <openssl/err.h>
Expand Down
4 changes: 2 additions & 2 deletions dtls.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* \ref protocols
*/

#ifndef _JANUS_DTLS_H
#define _JANUS_DTLS_H
#ifndef JANUS_DTLS_H
#define JANUS_DTLS_H

#include <inttypes.h>
#include <glib.h>
Expand Down
4 changes: 2 additions & 2 deletions events.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* \ref core
*/

#ifndef _JANUS_EVENTS_H
#define _JANUS_EVENTS_H
#ifndef JANUS_EVENTS_H
#define JANUS_EVENTS_H

#include "debug.h"
#include "events/eventhandler.h"
Expand Down
32 changes: 16 additions & 16 deletions events/eventhandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* send them to an external tool for statistics purposes or troubleshooting.
* Whatever the aim, the structures to make the interaction between core
* and event handlers possible are defined here.
*
*
* An event handler plugin that wants to register at the Janus core needs to
* implement the \c janus_eventhandler interface. This includes callbacks
* the Janus core can use to pass and request information, and a mask of
Expand All @@ -25,7 +25,7 @@
* core itself, in order to be dynamically loaded at startup it needs
* to implement the \c create_e() hook as well, that should return a
* pointer to the plugin instance. This is an example of such a step:
*
*
\verbatim
static janus_eventhandler myhandler = {
[..]
Expand All @@ -36,14 +36,14 @@ janus_eventhandler *create(void) {
return &myhandler;
}
\endverbatim
*
*
* This will make sure that your event handler plugin is loaded at startup
* by the Janus core, if it is deployed in the proper folder.
*
*
* As anticipated and described in the above example, an event handler plugin
* must basically be an instance of the \c janus_eventhandler type. As such,
* it must implement the following methods and callbacks for the core:
*
*
* - \c init(): this is called by the Janus core as soon as your event handler
* plugin is started; this is where you should setup your event handler plugin
* (e.g., static stuff and reading the configuration file);
Expand All @@ -56,17 +56,17 @@ janus_eventhandler *create(void) {
* - \c get_name(): this method should return a short display name for your event handler plugin (e.g., "My Amazing Event Handler");
* - \c get_package(): this method should return a unique package identifier for your event handler plugin (e.g., "janus.eventhandler.myeventhandler");
* - \c incoming_event(): this callack informs the event handler that an event is available for consumption.
*
*
* All the above methods and callbacks are mandatory: the Janus core will
* reject an event handler plugin that doesn't implement any of the
* mandatory callbacks.
*
*
* Additionally, a \c janus_eventhandler instance must also include a
* mask of the events it is interested in, a \c events_mask janus_flag
* object that must refer to the available types defined in this header.
* The core, in fact, will refer to that mask to check whether your event
* handler is interested in a specific event or not.
*
* handler is interested in a specific event or not.
*
* Unlike other kind of modules (transports, plugins), the \c init() method
* here only passes the path to the configurations files folder, as event
* handlers never need to contact the Janus core themselves. This path can be used to read and
Expand All @@ -77,14 +77,14 @@ janus_eventhandler *create(void) {
* as it doesn't collide with existing ones. Besides, the existing eventhandler
* plugins use the same INI format for configuration files the core
* uses (relying on the \c janus_config helpers for the purpose) but
* again, if you prefer a different format (XML, JSON, etc.) that's up to you.
*
* again, if you prefer a different format (XML, JSON, etc.) that's up to you.
*
* \ingroup eventhandlerapi
* \ref eventhandlerapi
*/

#ifndef _JANUS_EVENTHANDLER_H
#define _JANUS_EVENTHANDLER_H
#ifndef JANUS_EVENTHANDLER_H
#define JANUS_EVENTHANDLER_H

#include <stdlib.h>
#include <stdint.h>
Expand All @@ -104,15 +104,15 @@ janus_eventhandler *create(void) {
#define JANUS_EVENTHANDLER_API_VERSION 3

/*! \brief Initialization of all event handler plugin properties to NULL
*
*
* \note All event handler plugins MUST add this as the FIRST line when initializing
* their event handler plugin structure, e.g.:
*
*
\verbatim
static janus_eventhandler janus_fake_eventhandler handler plugin =
{
JANUS_EVENTHANDLER_INIT,
.init = janus_fake_init,
[..]
\endverbatim
Expand Down
4 changes: 2 additions & 2 deletions ice.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* \ref protocols
*/

#ifndef _JANUS_ICE_H
#define _JANUS_ICE_H
#ifndef JANUS_ICE_H
#define JANUS_ICE_H

#include <glib.h>
#include <agent.h>
Expand Down
4 changes: 2 additions & 2 deletions ip-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* \ref core
*/

#ifndef _JANUS_IP_UTILS_H
#define _JANUS_IP_UTILS_H
#ifndef JANUS_IP_UTILS_H
#define JANUS_IP_UTILS_H

#include <ifaddrs.h>
#include <netinet/in.h>
Expand Down
4 changes: 2 additions & 2 deletions janus.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
* \ref core
*/

#ifndef _JANUS_CORE_H
#define _JANUS_CORE_H
#ifndef JANUS_CORE_H
#define JANUS_CORE_H

#include <inttypes.h>
#include <stdlib.h>
Expand Down
4 changes: 2 additions & 2 deletions log.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* \ref core
*/

#ifndef _JANUS_LOG_H
#define _JANUS_LOG_H
#ifndef JANUS_LOG_H
#define JANUS_LOG_H

#include <stdio.h>
#include <glib.h>
Expand Down
8 changes: 4 additions & 4 deletions mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* \author Lorenzo Miniero <[email protected]>
* \brief Semaphors, Mutexes and Conditions
* \details Implementation (based on GMutex or pthread_mutex) of a locking mechanism based on mutexes and conditions.
*
*
* \ingroup core
* \ref core
*/
#ifndef _JANUS_MUTEX_H
#define _JANUS_MUTEX_H

#ifndef JANUS_MUTEX_H
#define JANUS_MUTEX_H

#include <pthread.h>
#include <errno.h>
Expand Down
4 changes: 2 additions & 2 deletions plugins/janus_duktape_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* \ref jspapi
*/

#ifndef _JANUS_DUKTAPE_DATA_H
#define _JANUS_DUKTAPE_DATA_H
#ifndef JANUS_DUKTAPE_DATA_H
#define JANUS_DUKTAPE_DATA_H

#include "duktape-deps/duktape.h"
#include "duktape-deps/duk_console.h"
Expand Down
4 changes: 2 additions & 2 deletions plugins/janus_duktape_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* \ref jspapi
*/

#ifndef _JANUS_DUKTAPE_EXTRA_H
#define _JANUS_DUKTAPE_EXTRA_H
#ifndef JANUS_DUKTAPE_EXTRA_H
#define JANUS_DUKTAPE_EXTRA_H

#include "duktape-deps/duktape.h"

Expand Down
4 changes: 2 additions & 2 deletions plugins/janus_lua_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* \ref luapapi
*/

#ifndef _JANUS_LUA_DATA_H
#define _JANUS_LUA_DATA_H
#ifndef JANUS_LUA_DATA_H
#define JANUS_LUA_DATA_H

#include <lua.h>
#include <lualib.h>
Expand Down
4 changes: 2 additions & 2 deletions plugins/janus_lua_extra.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* \ref luapapi
*/

#ifndef _JANUS_LUA_EXTRA_H
#define _JANUS_LUA_EXTRA_H
#ifndef JANUS_LUA_EXTRA_H
#define JANUS_LUA_EXTRA_H

#include <lua.h>
#include <lualib.h>
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ janus_plugin *create(void) {
* \ref pluginapi
*/

#ifndef _JANUS_PLUGIN_H
#define _JANUS_PLUGIN_H
#ifndef JANUS_PLUGIN_H
#define JANUS_PLUGIN_H

#include <stdlib.h>
#include <stdint.h>
Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-g711.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_G711
#define _JANUS_PP_G711
#ifndef JANUS_PP_G711
#define JANUS_PP_G711

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-g722.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_G722
#define _JANUS_PP_G722
#ifndef JANUS_PP_G722
#define JANUS_PP_G722

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-h264.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_H264
#define _JANUS_PP_H264
#ifndef JANUS_PP_H264
#define JANUS_PP_H264

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-opus.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_OPUS
#define _JANUS_PP_OPUS
#ifndef JANUS_PP_OPUS
#define JANUS_PP_OPUS

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-rtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_RTP
#define _JANUS_PP_RTP
#ifndef JANUS_PP_RTP
#define JANUS_PP_RTP

#ifdef __MACH__
#include <machine/endian.h>
Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-srt.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_SRT
#define _JANUS_PP_SRT
#ifndef JANUS_PP_SRT
#define JANUS_PP_SRT

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions postprocessing/pp-webm.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
* \ref postprocessing
*/

#ifndef _JANUS_PP_WEBM
#define _JANUS_PP_WEBM
#ifndef JANUS_PP_WEBM
#define JANUS_PP_WEBM

#include <stdio.h>

Expand Down
4 changes: 2 additions & 2 deletions record.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* \ref core
*/

#ifndef _JANUS_RECORD_H
#define _JANUS_RECORD_H
#ifndef JANUS_RECORD_H
#define JANUS_RECORD_H

#include <inttypes.h>
#include <string.h>
Expand Down
Loading

0 comments on commit ab5d1f9

Please sign in to comment.