UniMRCP  1.7.0
Macros | Typedefs
mrcp_engine_plugin.h File Reference

MRCP Engine Plugin. More...

#include "apr_version.h"
#include "apt_log.h"
#include "mrcp_engine_types.h"
Include dependency graph for mrcp_engine_plugin.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MRCP_PLUGIN_EXTERN_C   extern
 
#define MRCP_PLUGIN_DECLARE(type)   MRCP_PLUGIN_EXTERN_C type
 
#define MRCP_PLUGIN_ENGINE_SYM_NAME   "mrcp_plugin_create"
 
#define MRCP_PLUGIN_VERSION_SYM_NAME   "mrcp_plugin_version"
 
#define MRCP_PLUGIN_LOGGER_SYM_NAME   "mrcp_plugin_logger_set"
 
#define MRCP_PLUGIN_LOG_SOURCE_SYM_NAME   "mrcp_plugin_log_source_set"
 
#define MRCP_PLUGIN_LOGGER_IMPLEMENT
 
#define MRCP_PLUGIN_LOG_SOURCE_IMPLEMENT(LOG_SOURCE, LOG_SOURCE_TAG)
 
#define MRCP_PLUGIN_VERSION_DECLARE
 
#define PLUGIN_MAJOR_VERSION   1
 
#define PLUGIN_MINOR_VERSION   7
 
#define PLUGIN_PATCH_VERSION   0
 
#define PLUGIN_VERSION_AT_LEAST(major, minor, patch)
 
#define PLUGIN_VERSION_STRING
 

Typedefs

typedef mrcp_engine_t *(* mrcp_plugin_creator_f) (apr_pool_t *pool)
 
typedef apt_bool_t(* mrcp_plugin_log_accessor_f) (apt_logger_t *logger)
 
typedef apt_bool_t(* mrcp_plugin_log_source_accessor_f) (apt_log_source_t *log_source)
 
typedef apr_version_t mrcp_plugin_version_t
 

Detailed Description

MRCP Engine Plugin.

Macro Definition Documentation

◆ MRCP_PLUGIN_DECLARE

#define MRCP_PLUGIN_DECLARE (   type)    MRCP_PLUGIN_EXTERN_C type

Plugin export defines

◆ MRCP_PLUGIN_ENGINE_SYM_NAME

#define MRCP_PLUGIN_ENGINE_SYM_NAME   "mrcp_plugin_create"

[REQUIRED] Symbol name of the main entry point in plugin DSO

◆ MRCP_PLUGIN_EXTERN_C

#define MRCP_PLUGIN_EXTERN_C   extern

Let the plugin symbols be always exported as C functions

◆ MRCP_PLUGIN_LOG_SOURCE_IMPLEMENT

#define MRCP_PLUGIN_LOG_SOURCE_IMPLEMENT (   LOG_SOURCE,
  LOG_SOURCE_TAG 
)
Value:
MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
{ apt_log_instance_set(logger); \
return TRUE; } \
MRCP_PLUGIN_DECLARE(void) mrcp_plugin_log_source_set(apt_log_source_t *orig_log_source) \
{ apt_def_log_source_set(orig_log_source); \
apt_log_source_assign(LOG_SOURCE_TAG,&LOG_SOURCE); }
apt_bool_t apt_log_instance_set(apt_logger_t *logger)
int apt_bool_t
Definition: apt.h:57
void apt_def_log_source_set(apt_log_source_t *log_source)
apt_log_source_t def_log_source
struct apt_log_source_t apt_log_source_t
Definition: apt_log.h:37
struct apt_logger_t apt_logger_t
Definition: apt_log.h:125

Declare this macro in plugins to use log routine of the server

◆ MRCP_PLUGIN_LOG_SOURCE_SYM_NAME

#define MRCP_PLUGIN_LOG_SOURCE_SYM_NAME   "mrcp_plugin_log_source_set"

[IMPLIED] Symbol name of the log source accessor entry point in plugin DSO

◆ MRCP_PLUGIN_LOGGER_IMPLEMENT

#define MRCP_PLUGIN_LOGGER_IMPLEMENT
Value:
MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
{ apt_log_instance_set(logger); \
return TRUE; } \
MRCP_PLUGIN_DECLARE(void) mrcp_plugin_log_source_set(apt_log_source_t *orig_log_source) \
{ apt_def_log_source_set(orig_log_source); }
apt_bool_t apt_log_instance_set(apt_logger_t *logger)
int apt_bool_t
Definition: apt.h:57
#define MRCP_PLUGIN_DECLARE(type)
Definition: mrcp_engine_plugin.h:42
void apt_def_log_source_set(apt_log_source_t *log_source)
struct apt_log_source_t apt_log_source_t
Definition: apt_log.h:37
struct apt_logger_t apt_logger_t
Definition: apt_log.h:125

Declare this macro in plugins to use log routine of the server

◆ MRCP_PLUGIN_LOGGER_SYM_NAME

#define MRCP_PLUGIN_LOGGER_SYM_NAME   "mrcp_plugin_logger_set"

[IMPLIED] Symbol name of the log accessor entry point in plugin DSO

◆ MRCP_PLUGIN_VERSION_DECLARE

#define MRCP_PLUGIN_VERSION_DECLARE
Value:
mrcp_plugin_version_t mrcp_plugin_version = \
#define PLUGIN_PATCH_VERSION
Definition: mrcp_engine_plugin.h:105
apr_version_t mrcp_plugin_version_t
Definition: mrcp_engine_plugin.h:124
#define PLUGIN_MAJOR_VERSION
Definition: mrcp_engine_plugin.h:93
#define MRCP_PLUGIN_DECLARE(type)
Definition: mrcp_engine_plugin.h:42
#define PLUGIN_MINOR_VERSION
Definition: mrcp_engine_plugin.h:99

Declare this macro in plugins to set plugin version

◆ MRCP_PLUGIN_VERSION_SYM_NAME

#define MRCP_PLUGIN_VERSION_SYM_NAME   "mrcp_plugin_version"

[REQUIRED] Symbol name of the vesrion number entry point in plugin DSO

◆ PLUGIN_MAJOR_VERSION

#define PLUGIN_MAJOR_VERSION   1

major version Major API changes that could cause compatibility problems for older plugins such as structure size changes. No binary compatibility is possible across a change in the major version.

◆ PLUGIN_MINOR_VERSION

#define PLUGIN_MINOR_VERSION   7

minor version Minor API changes that do not cause binary compatibility problems. Reset to 0 when upgrading PLUGIN_MAJOR_VERSION

◆ PLUGIN_PATCH_VERSION

#define PLUGIN_PATCH_VERSION   0

patch level The Patch Level never includes API changes, simply bug fixes. Reset to 0 when upgrading PLUGIN_MINOR_VERSION

◆ PLUGIN_VERSION_AT_LEAST

#define PLUGIN_VERSION_AT_LEAST (   major,
  minor,
  patch 
)
Value:
(((major) < PLUGIN_MAJOR_VERSION) \
|| ((major) == PLUGIN_MAJOR_VERSION && (minor) < PLUGIN_MINOR_VERSION) \
|| ((major) == PLUGIN_MAJOR_VERSION && (minor) == PLUGIN_MINOR_VERSION && (patch) <= PLUGIN_PATCH_VERSION))
#define PLUGIN_PATCH_VERSION
Definition: mrcp_engine_plugin.h:105
#define PLUGIN_MAJOR_VERSION
Definition: mrcp_engine_plugin.h:93
#define PLUGIN_MINOR_VERSION
Definition: mrcp_engine_plugin.h:99

Check at compile time if the plugin version is at least a certain level.

◆ PLUGIN_VERSION_STRING

#define PLUGIN_VERSION_STRING
Value:
APR_STRINGIFY(PLUGIN_MAJOR_VERSION) "." \
APR_STRINGIFY(PLUGIN_MINOR_VERSION) "." \
APR_STRINGIFY(PLUGIN_PATCH_VERSION)
#define PLUGIN_PATCH_VERSION
Definition: mrcp_engine_plugin.h:105
#define PLUGIN_MAJOR_VERSION
Definition: mrcp_engine_plugin.h:93
#define PLUGIN_MINOR_VERSION
Definition: mrcp_engine_plugin.h:99

The formatted string of plugin's version

Typedef Documentation

◆ mrcp_plugin_creator_f

typedef mrcp_engine_t*(* mrcp_plugin_creator_f) (apr_pool_t *pool)

Prototype of engine creator (entry point of plugin DSO)

◆ mrcp_plugin_log_accessor_f

typedef apt_bool_t(* mrcp_plugin_log_accessor_f) (apt_logger_t *logger)

Prototype of log accessor (entry point of plugin DSO)

◆ mrcp_plugin_log_source_accessor_f

typedef apt_bool_t(* mrcp_plugin_log_source_accessor_f) (apt_log_source_t *log_source)

Prototype of log source accessor (entry point of plugin DSO)

◆ mrcp_plugin_version_t

typedef apr_version_t mrcp_plugin_version_t

Plugin version