17 #ifndef MRCP_ENGINE_PLUGIN_H
18 #define MRCP_ENGINE_PLUGIN_H
25 #include "apr_version.h"
33 #define MRCP_PLUGIN_EXTERN_C extern "C"
35 #define MRCP_PLUGIN_EXTERN_C extern
40 #define MRCP_PLUGIN_DECLARE(type) MRCP_PLUGIN_EXTERN_C __declspec(dllexport) type
42 #define MRCP_PLUGIN_DECLARE(type) MRCP_PLUGIN_EXTERN_C type
46 #define MRCP_PLUGIN_ENGINE_SYM_NAME "mrcp_plugin_create"
48 #define MRCP_PLUGIN_VERSION_SYM_NAME "mrcp_plugin_version"
50 #define MRCP_PLUGIN_LOGGER_SYM_NAME "mrcp_plugin_logger_set"
59 #define MRCP_PLUGIN_LOGGER_IMPLEMENT \
60 MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
61 { return apt_log_instance_set(logger); }
64 #define MRCP_PLUGIN_LOG_SOURCE_IMPLEMENT(LOG_SOURCE, LOG_SOURCE_TAG) \
65 apt_log_source_t *LOG_SOURCE = &def_log_source; \
66 MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
67 { apt_log_instance_set(logger); \
68 apt_log_source_assign(LOG_SOURCE_TAG,&LOG_SOURCE); \
72 #define MRCP_PLUGIN_VERSION_DECLARE \
73 MRCP_PLUGIN_DECLARE(mrcp_plugin_version_t) mrcp_plugin_version; \
74 mrcp_plugin_version_t mrcp_plugin_version = \
75 {PLUGIN_MAJOR_VERSION, PLUGIN_MINOR_VERSION, PLUGIN_PATCH_VERSION};
83 #define PLUGIN_MAJOR_VERSION 1
89 #define PLUGIN_MINOR_VERSION 4
95 #define PLUGIN_PATCH_VERSION 0
102 #define PLUGIN_VERSION_AT_LEAST(major,minor,patch) \
103 (((major) < PLUGIN_MAJOR_VERSION) \
104 || ((major) == PLUGIN_MAJOR_VERSION && (minor) < PLUGIN_MINOR_VERSION) \
105 || ((major) == PLUGIN_MAJOR_VERSION && (minor) == PLUGIN_MINOR_VERSION && (patch) <= PLUGIN_PATCH_VERSION))
108 #define PLUGIN_VERSION_STRING \
109 APR_STRINGIFY(PLUGIN_MAJOR_VERSION) "." \
110 APR_STRINGIFY(PLUGIN_MINOR_VERSION) "." \
111 APR_STRINGIFY(PLUGIN_PATCH_VERSION)
#define PLUGIN_PATCH_VERSION
Definition: mrcp_engine_plugin.h:95
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
apr_version_t mrcp_plugin_version_t
Definition: mrcp_engine_plugin.h:114
#define PLUGIN_VERSION_AT_LEAST(major, minor, patch)
Definition: mrcp_engine_plugin.h:102
#define PLUGIN_MAJOR_VERSION
Definition: mrcp_engine_plugin.h:83
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
apt_bool_t(* mrcp_plugin_log_accessor_f)(apt_logger_t *logger)
Definition: mrcp_engine_plugin.h:56
#define PLUGIN_MINOR_VERSION
Definition: mrcp_engine_plugin.h:89
struct apt_logger_t apt_logger_t
Definition: apt_log.h:124
Definition: mrcp_engine_types.h:114