UniMRCP  1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_engine_types.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2015 Arsen Chaloyan
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MRCP_ENGINE_TYPES_H
18 #define MRCP_ENGINE_TYPES_H
19 
20 /**
21  * @file mrcp_engine_types.h
22  * @brief MRCP Engine Types
23  */
24 
25 #include <apr_tables.h>
26 #include "mrcp_state_machine.h"
27 #include "mpf_types.h"
28 #include "apt_string.h"
29 
31 
32 /** MRCP engine declaration */
34 /** MRCP engine config declaration */
36 /** MRCP engine vtable declaration */
38 /** MRCP engine event vtable declaration */
40 /** MRCP engine channel declaration */
42 /** MRCP engine channel virtual method table declaration */
44 /** MRCP engine channel virtual event table declaration */
46 
47 /** Table of channel virtual methods */
49  /** Virtual destroy */
51  /** Virtual open */
53  /** Virtual close */
55  /** Virtual process_request */
57 };
58 
59 /** Table of channel virtual event handlers */
61  /** Open event handler */
63  /** Close event handler */
65  /** Message event handler */
67 };
68 
69 /** MRCP engine channel declaration */
71  /** Table of virtual methods */
73  /** External object used with virtual methods */
74  void *method_obj;
75  /** Table of virtual event handlers */
77  /** External object used with event handlers */
78  void *event_obj;
79  /** Media termination */
81  /** Back pointer to engine */
83  /** Unique identifier to be used in traces */
85  /** MRCP version */
87  /** Is channel successfully opened */
89  /** Pool to allocate memory from */
90  apr_pool_t *pool;
91 };
92 
93 /** Table of MRCP engine virtual methods */
95  /** Virtual destroy */
97  /** Virtual open */
99  /** Virtual close */
101  /** Virtual channel create */
102  mrcp_engine_channel_t* (*create_channel)(mrcp_engine_t *engine, apr_pool_t *pool);
103 };
104 
105 /** Table of MRCP engine virtual event handlers */
107  /** Open event handler */
109  /** Close event handler */
111 };
112 
113 /** MRCP engine */
115  /** Identifier of the engine */
116  const char *id;
117  /** Resource identifier */
119  /** External object associated with engine */
120  void *obj;
121  /** Table of virtual methods */
123  /** Table of virtual event handlers */
125  /** External object used with event handlers */
126  void *event_obj;
127  /** Codec manager */
129  /** Dir layout structure */
131  /** Config of engine */
133  /** Number of simultaneous channels currently in use */
134  apr_size_t cur_channel_count;
135  /** Is engine successfully opened */
137  /** Pool to allocate memory from */
138  apr_pool_t *pool;
139 
140  /** Create state machine */
141  mrcp_state_machine_t* (*create_state_machine)(void *obj, mrcp_version_e version, apr_pool_t *pool);
142 };
143 
144 /** MRCP engine config */
146  /** Max number of simultaneous channels */
147  apr_size_t max_channel_count;
148  /** Table of name/value string params */
149  apr_table_t *params;
150 };
151 
153 
154 #endif /* MRCP_ENGINE_TYPES_H */
apt_bool_t(* destroy)(mrcp_engine_t *engine)
Definition: mrcp_engine_types.h:96
apt_bool_t is_open
Definition: mrcp_engine_types.h:88
const mrcp_engine_method_vtable_t * method_vtable
Definition: mrcp_engine_types.h:122
apr_size_t cur_channel_count
Definition: mrcp_engine_types.h:134
const mrcp_engine_event_vtable_t * event_vtable
Definition: mrcp_engine_types.h:124
struct apt_dir_layout_t apt_dir_layout_t
Definition: apt_dir_layout.h:38
apt_bool_t(* on_open)(mrcp_engine_t *channel, apt_bool_t status)
Definition: mrcp_engine_types.h:108
Definition: mpf_termination.h:51
apt_bool_t(* on_message)(mrcp_engine_channel_t *channel, mrcp_message_t *message)
Definition: mrcp_engine_types.h:66
void * event_obj
Definition: mrcp_engine_types.h:78
apt_bool_t(* on_open)(mrcp_engine_channel_t *channel, apt_bool_t status)
Definition: mrcp_engine_types.h:62
#define APT_END_EXTERN_C
Definition: apt.h:38
apt_bool_t(* destroy)(mrcp_engine_channel_t *channel)
Definition: mrcp_engine_types.h:50
int apt_bool_t
Definition: apt.h:57
void * method_obj
Definition: mrcp_engine_types.h:74
mrcp_engine_t * engine
Definition: mrcp_engine_types.h:82
Definition: mrcp_engine_types.h:94
apr_table_t * params
Definition: mrcp_engine_types.h:149
void * event_obj
Definition: mrcp_engine_types.h:126
Definition: mrcp_engine_types.h:70
mrcp_version_e
Definition: mrcp_types.h:30
Definition: mrcp_state_machine.h:34
apr_pool_t * pool
Definition: mrcp_engine_types.h:90
const mrcp_engine_channel_event_vtable_t * event_vtable
Definition: mrcp_engine_types.h:76
apt_bool_t(* close)(mrcp_engine_channel_t *channel)
Definition: mrcp_engine_types.h:54
apr_pool_t * pool
Definition: mrcp_engine_types.h:138
apr_size_t max_channel_count
Definition: mrcp_engine_types.h:147
Definition: mrcp_engine_types.h:60
const mpf_codec_manager_t * codec_manager
Definition: mrcp_engine_types.h:128
const apt_dir_layout_t * dir_layout
Definition: mrcp_engine_types.h:130
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
MPF Types Declarations.
apt_str_t id
Definition: mrcp_engine_types.h:84
apt_bool_t(* open)(mrcp_engine_channel_t *channel)
Definition: mrcp_engine_types.h:52
apr_size_t mrcp_resource_id
Definition: mrcp_types.h:68
Definition: mrcp_engine_types.h:145
apt_bool_t(* on_close)(mrcp_engine_channel_t *channel)
Definition: mrcp_engine_types.h:64
apt_bool_t(* close)(mrcp_engine_t *engine)
Definition: mrcp_engine_types.h:100
apt_bool_t(* on_close)(mrcp_engine_t *channel)
Definition: mrcp_engine_types.h:110
mrcp_resource_id resource_id
Definition: mrcp_engine_types.h:118
Definition: apt_string.h:36
mpf_termination_t * termination
Definition: mrcp_engine_types.h:80
mrcp_version_e mrcp_version
Definition: mrcp_engine_types.h:86
Definition: mrcp_engine_types.h:106
const mrcp_engine_channel_method_vtable_t * method_vtable
Definition: mrcp_engine_types.h:72
void * obj
Definition: mrcp_engine_types.h:120
Definition: mrcp_engine_types.h:48
mrcp_engine_config_t * config
Definition: mrcp_engine_types.h:132
apt_bool_t(* open)(mrcp_engine_t *engine)
Definition: mrcp_engine_types.h:98
apt_bool_t is_open
Definition: mrcp_engine_types.h:136
Definition: mrcp_engine_types.h:114
MRCP State Machine.
String Representation.
const char * id
Definition: mrcp_engine_types.h:116
struct mpf_codec_manager_t mpf_codec_manager_t
Definition: mpf_types.h:39
apt_bool_t(* process_request)(mrcp_engine_channel_t *channel, mrcp_message_t *request)
Definition: mrcp_engine_types.h:56
Definition: mrcp_message.h:37