MRCP Engine Plugin. More...
#include "apr_version.h"
#include "apt_log.h"
#include "mrcp_engine_types.h"
Go to the source code of this file.
Defines | |
#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_LOGGER_IMPLEMENT |
#define | MRCP_PLUGIN_VERSION_DECLARE |
#define | PLUGIN_MAJOR_VERSION 1 |
#define | PLUGIN_MINOR_VERSION 1 |
#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 apr_version_t | mrcp_plugin_version_t |
MRCP Engine Plugin.
#define MRCP_PLUGIN_DECLARE | ( | type | ) | MRCP_PLUGIN_EXTERN_C type |
Plugin export defines
#define MRCP_PLUGIN_ENGINE_SYM_NAME "mrcp_plugin_create" |
[REQUIRED] Symbol name of the main entry point in plugin DSO
#define MRCP_PLUGIN_EXTERN_C extern |
Let the plugin symbols be always exported as C functions
#define MRCP_PLUGIN_LOGGER_IMPLEMENT |
MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \ { return apt_log_instance_set(logger); }
Declare this macro in plugins to use log routine of the server
#define MRCP_PLUGIN_LOGGER_SYM_NAME "mrcp_plugin_logger_set" |
[IMPLIED] Symbol name of the log accessor entry point in plugin DSO
#define MRCP_PLUGIN_VERSION_DECLARE |
MRCP_PLUGIN_DECLARE(mrcp_plugin_version_t) mrcp_plugin_version; \ mrcp_plugin_version_t mrcp_plugin_version = \ {PLUGIN_MAJOR_VERSION, PLUGIN_MINOR_VERSION, PLUGIN_PATCH_VERSION};
Declare this macro in plugins to set plugin version
#define MRCP_PLUGIN_VERSION_SYM_NAME "mrcp_plugin_version" |
[REQUIRED] Symbol name of the vesrion number entry point in plugin DSO
#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.
#define PLUGIN_MINOR_VERSION 1 |
minor version Minor API changes that do not cause binary compatibility problems. Reset to 0 when upgrading PLUGIN_MAJOR_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
#define PLUGIN_VERSION_AT_LEAST | ( | major, | |||
minor, | |||||
patch | ) |
(((major) < PLUGIN_MAJOR_VERSION) \ || ((major) == PLUGIN_MAJOR_VERSION && (minor) < PLUGIN_MINOR_VERSION) \ || ((major) == PLUGIN_MAJOR_VERSION && (minor) == PLUGIN_MINOR_VERSION && (patch) <= PLUGIN_PATCH_VERSION))
Check at compile time if the plugin version is at least a certain level.
#define PLUGIN_VERSION_STRING |
APR_STRINGIFY(PLUGIN_MAJOR_VERSION) "." \ APR_STRINGIFY(PLUGIN_MINOR_VERSION) "." \ APR_STRINGIFY(PLUGIN_PATCH_VERSION)
The formatted string of plugin's version
typedef mrcp_engine_t*(* mrcp_plugin_creator_f)(apr_pool_t *pool) |
Prototype of engine creator (entry point of plugin DSO)
typedef apt_bool_t(* mrcp_plugin_log_accessor_f)(apt_logger_t *logger) |
Prototype of log accessor (entry point of plugin DSO)
typedef apr_version_t mrcp_plugin_version_t |
Plugin version