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"
52 #define MRCP_PLUGIN_LOG_SOURCE_SYM_NAME "mrcp_plugin_log_source_set"
64 #define MRCP_PLUGIN_LOGGER_IMPLEMENT \
65 MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
66 { apt_log_instance_set(logger); \
68 MRCP_PLUGIN_DECLARE(void) mrcp_plugin_log_source_set(apt_log_source_t *orig_log_source) \
69 { apt_def_log_source_set(orig_log_source); }
72 #define MRCP_PLUGIN_LOG_SOURCE_IMPLEMENT(LOG_SOURCE, LOG_SOURCE_TAG) \
73 apt_log_source_t *LOG_SOURCE = &def_log_source; \
74 MRCP_PLUGIN_DECLARE(apt_bool_t) mrcp_plugin_logger_set(apt_logger_t *logger) \
75 { apt_log_instance_set(logger); \
77 MRCP_PLUGIN_DECLARE(void) mrcp_plugin_log_source_set(apt_log_source_t *orig_log_source) \
78 { apt_def_log_source_set(orig_log_source); \
79 apt_log_source_assign(LOG_SOURCE_TAG,&LOG_SOURCE); }
82 #define MRCP_PLUGIN_VERSION_DECLARE \
83 MRCP_PLUGIN_DECLARE(mrcp_plugin_version_t) mrcp_plugin_version; \
84 mrcp_plugin_version_t mrcp_plugin_version = \
85 {PLUGIN_MAJOR_VERSION, PLUGIN_MINOR_VERSION, PLUGIN_PATCH_VERSION};
93 #define PLUGIN_MAJOR_VERSION 1
99 #define PLUGIN_MINOR_VERSION 5
105 #define PLUGIN_PATCH_VERSION 0
112 #define PLUGIN_VERSION_AT_LEAST(major,minor,patch) \
113 (((major) < PLUGIN_MAJOR_VERSION) \
114 || ((major) == PLUGIN_MAJOR_VERSION && (minor) < PLUGIN_MINOR_VERSION) \
115 || ((major) == PLUGIN_MAJOR_VERSION && (minor) == PLUGIN_MINOR_VERSION && (patch) <= PLUGIN_PATCH_VERSION))
118 #define PLUGIN_VERSION_STRING \
119 APR_STRINGIFY(PLUGIN_MAJOR_VERSION) "." \
120 APR_STRINGIFY(PLUGIN_MINOR_VERSION) "." \
121 APR_STRINGIFY(PLUGIN_PATCH_VERSION)
#define PLUGIN_PATCH_VERSION
Definition: mrcp_engine_plugin.h:105
#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:124
#define PLUGIN_VERSION_AT_LEAST(major, minor, patch)
Definition: mrcp_engine_plugin.h:112
#define PLUGIN_MAJOR_VERSION
Definition: mrcp_engine_plugin.h:93
#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:58
struct apt_log_source_t apt_log_source_t
Definition: apt_log.h:37
#define PLUGIN_MINOR_VERSION
Definition: mrcp_engine_plugin.h:99
apt_bool_t(* mrcp_plugin_log_source_accessor_f)(apt_log_source_t *log_source)
Definition: mrcp_engine_plugin.h:61
struct apt_logger_t apt_logger_t
Definition: apt_log.h:124
Definition: mrcp_engine_types.h:114