UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_server.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_server.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_SERVER_H
20 #define MRCP_SERVER_H
21 
22 /**
23  * @file mrcp_server.h
24  * @brief MRCP Server
25  */
26 
27 #include "mrcp_server_types.h"
28 #include "mrcp_engine_iface.h"
29 #include "mpf_rtp_descriptor.h"
30 #include "apt_task.h"
31 
33 
34 /**
35  * Create MRCP server instance.
36  * @return the created server instance
37  */
39 
40 /**
41  * Start message processing loop.
42  * @param server the MRCP server to start
43  * @return the created server instance
44  */
46 
47 /**
48  * Shutdown message processing loop.
49  * @param server the MRCP server to shutdown
50  */
52 
53 /**
54  * Destroy MRCP server.
55  * @param server the MRCP server to destroy
56  */
58 
59 
60 /**
61  * Register MRCP resource factory.
62  * @param server the MRCP server to set resource factory for
63  * @param resource_factory the resource factory to set
64  */
66  mrcp_server_t *server,
67  mrcp_resource_factory_t *resource_factory);
68 
69 /**
70  * Register MRCP engine.
71  * @param server the MRCP server to set engine for
72  * @param engine the engine to set
73  */
75  mrcp_server_t *server,
76  mrcp_engine_t *engine);
77 
78 /**
79  * Register codec manager.
80  * @param server the MRCP server to set codec manager for
81  * @param codec_manager the codec manager to set
82  */
84 
85 /**
86  * Get registered codec manager.
87  * @param server the MRCP server to get codec manager from
88  */
90 
91 /**
92  * Register media engine.
93  * @param server the MRCP server to set media engine for
94  * @param media_engine the media engine to set
95  */
97  mrcp_server_t *server,
98  mpf_engine_t *media_engine);
99 
100 /**
101  * Register RTP termination factory.
102  * @param server the MRCP server to set termination factory for
103  * @param rtp_termination_factory the termination factory
104  * @param name the name of the factory
105  */
107  mrcp_server_t *server,
108  mpf_termination_factory_t *rtp_termination_factory,
109  const char *name);
110 
111 /**
112  * Register RTP settings.
113  * @param server the MRCP server to set RTP settings for
114  * @param rtp_settings the settings to set
115  * @param name the name of the settings
116  */
118  mrcp_server_t *server,
119  mpf_rtp_settings_t *rtp_settings,
120  const char *name);
121 
122 /**
123  * Register MRCP signaling agent.
124  * @param server the MRCP server to set signaling agent for
125  * @param signaling_agent the signaling agent to set
126  */
128  mrcp_server_t *server,
129  mrcp_sig_agent_t *signaling_agent);
130 
131 /**
132  * Register MRCP connection agent (MRCPv2 only).
133  * @param server the MRCP server to set connection agent for
134  * @param connection_agent the connection agent to set
135  */
137  mrcp_server_t *server,
138  mrcp_connection_agent_t *connection_agent);
139 
140 /** Create MRCP profile */
142  const char *id,
143  mrcp_version_e mrcp_version,
144  mrcp_resource_factory_t *resource_factory,
145  mrcp_sig_agent_t *signaling_agent,
146  mrcp_connection_agent_t *connection_agent,
147  mpf_engine_t *media_engine,
148  mpf_termination_factory_t *rtp_factory,
149  mpf_rtp_settings_t *rtp_settings,
150  apr_pool_t *pool);
151 
152 /**
153  * Register MRCP profile.
154  * @param server the MRCP server to set profile for
155  * @param profile the profile to set
156  * @param plugin_map the map of engines (plugins)
157  */
159  mrcp_server_t *server,
160  mrcp_server_profile_t *profile,
161  apr_table_t *plugin_map);
162 
163 /**
164  * Load MRCP engine as a plugin.
165  * @param server the MRCP server to use
166  * @param id the identifier of the plugin
167  * @param path the path to the plugin to load
168  * @param config the config of the engine
169  */
171  mrcp_server_t *server,
172  const char *id,
173  const char *path,
174  mrcp_engine_config_t *config);
175 
176 /**
177  * Get memory pool.
178  * @param server the MRCP server to get memory pool from
179  */
180 MRCP_DECLARE(apr_pool_t*) mrcp_server_memory_pool_get(const mrcp_server_t *server);
181 
182 /**
183  * Get media engine by name.
184  * @param server the MRCP server to get media engine from
185  * @param name the name of the media engine to lookup
186  */
187 MRCP_DECLARE(mpf_engine_t*) mrcp_server_media_engine_get(const mrcp_server_t *server, const char *name);
188 
189 /**
190  * Get RTP termination factory by name.
191  * @param server the MRCP server to get from
192  * @param name the name to lookup
193  */
195 
196 /**
197  * Get RTP settings by name
198  * @param server the MRCP server to get from
199  * @param name the name to lookup
200  */
202 
203 /**
204  * Get signaling agent by name.
205  * @param server the MRCP server to get from
206  * @param name the name to lookup
207  */
209 
210 /**
211  * Get connection agent by name.
212  * @param server the MRCP server to get from
213  * @param name the name to lookup
214  */
216 
217 /**
218  * Get profile by name.
219  * @param server the MRCP client to get from
220  * @param name the name to lookup
221  */
223 
225 
226 #endif /* MRCP_SERVER_H */