UniMRCP  1.3.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-2014 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  * $Id: mrcp_engine_types.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_ENGINE_TYPES_H
20 #define MRCP_ENGINE_TYPES_H
21 
22 /**
23  * @file mrcp_engine_types.h
24  * @brief MRCP Engine Types
25  */
26 
27 #include <apr_tables.h>
28 #include "mrcp_state_machine.h"
29 #include "mpf_types.h"
30 #include "apt_string.h"
31 
33 
34 /** MRCP engine declaration */
36 /** MRCP engine config declaration */
38 /** MRCP engine vtable declaration */
40 /** MRCP engine event vtable declaration */
42 /** MRCP engine channel declaration */
44 /** MRCP engine channel virtual method table declaration */
46 /** MRCP engine channel virtual event table declaration */
48 
49 /** Table of channel virtual methods */
51  /** Virtual destroy */
53  /** Virtual open */
55  /** Virtual close */
57  /** Virtual process_request */
59 };
60 
61 /** Table of channel virtual event handlers */
63  /** Open event handler */
65  /** Close event handler */
67  /** Message event handler */
69 };
70 
71 /** MRCP engine channel declaration */
73  /** Table of virtual methods */
75  /** External object used with virtual methods */
76  void *method_obj;
77  /** Table of virtual event handlers */
79  /** External object used with event handlers */
80  void *event_obj;
81  /** Media termination */
83  /** Back pointer to engine */
85  /** Unique identifier to be used in traces */
87  /** MRCP version */
89  /** Is channel successfully opened */
91  /** Pool to allocate memory from */
92  apr_pool_t *pool;
93 };
94 
95 /** Table of MRCP engine virtual methods */
97  /** Virtual destroy */
99  /** Virtual open */
101  /** Virtual close */
103  /** Virtual channel create */
104  mrcp_engine_channel_t* (*create_channel)(mrcp_engine_t *engine, apr_pool_t *pool);
105 };
106 
107 /** Table of MRCP engine virtual event handlers */
109  /** Open event handler */
111  /** Close event handler */
113 };
114 
115 /** MRCP engine */
117  /** Identifier of the engine */
118  const char *id;
119  /** Resource identifier */
121  /** External object associated with engine */
122  void *obj;
123  /** Table of virtual methods */
125  /** Table of virtual event handlers */
127  /** External object used with event handlers */
128  void *event_obj;
129  /** Codec manager */
131  /** Dir layout structure */
133  /** Config of engine */
135  /** Number of simultaneous channels currently in use */
136  apr_size_t cur_channel_count;
137  /** Is engine successfully opened */
139  /** Pool to allocate memory from */
140  apr_pool_t *pool;
141 
142  /** Create state machine */
143  mrcp_state_machine_t* (*create_state_machine)(void *obj, mrcp_version_e version, apr_pool_t *pool);
144 };
145 
146 /** MRCP engine config */
148  /** Max number of simultaneous channels */
149  apr_size_t max_channel_count;
150  /** Table of name/value string params */
151  apr_table_t *params;
152 };
153 
155 
156 #endif /* MRCP_ENGINE_TYPES_H */