UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_server_connection.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_connection.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_SERVER_CONNECTION_H
20 #define MRCP_SERVER_CONNECTION_H
21 
22 /**
23  * @file mrcp_server_connection.h
24  * @brief MRCPv2 Server Connection
25  */
26 
27 #include "apt_task.h"
28 #include "mrcp_connection_types.h"
29 
31 
32 /**
33  * Create connection agent.
34  * @param id the identifier of the engine
35  * @param listen_ip the IP address to listen on
36  * @param listen_port the port to listen on
37  * @param max_connection_count the number of max MRCPv2 connections
38  * @param force_new_connection the policy used in o/a for connection establishment
39  * @param pool the pool to allocate memory from
40  */
42  const char *id,
43  const char *listen_ip,
44  apr_port_t listen_port,
45  apr_size_t max_connection_count,
46  apt_bool_t force_new_connection,
47  apr_pool_t *pool);
48 
49 /**
50  * Destroy connection agent.
51  * @param agent the agent to destroy
52  */
54 
55 /**
56  * Start connection agent and wait for incoming requests.
57  * @param agent the agent to start
58  */
60 
61 /**
62  * Terminate connection agent.
63  * @param agent the agent to terminate
64  */
66 
67 /**
68  * Set connection event handler.
69  * @param agent the agent to set event hadler for
70  * @param obj the external object to associate with the agent
71  * @param vtable the event handler virtual methods
72  */
75  void *obj,
76  const mrcp_connection_event_vtable_t *vtable);
77 
78 /**
79  * Set MRCP resource factory.
80  * @param agent the agent to set resource factory for
81  * @param resource_factory the MRCP resource factory to set
82  */
85  const mrcp_resource_factory_t *resource_factory);
86 
87 /**
88  * Set rx buffer size.
89  * @param agent the agent to set buffer size for
90  * @param size the size of rx buffer to set
91  */
94  apr_size_t size);
95 
96 /**
97  * Set tx buffer size.
98  * @param agent the agent to set buffer size for
99  * @param size the size of the rx buffer to set
100  */
103  apr_size_t size);
104 
105 /**
106  * Get task.
107  * @param agent the agent to get task from
108  */
110 
111 /**
112  * Get external object.
113  * @param agent the agent to get object from
114  */
116 
117 /**
118  * Get string identifier.
119  * @param agent the agent to get identifier of
120  */
122 
123 
124 /**
125  * Create control channel.
126  * @param agent the agent to create channel for
127  * @param obj the external object to associate with the control channel
128  * @param pool the pool to allocate memory from
129  */
131  mrcp_connection_agent_t *agent,
132  void *obj,
133  apr_pool_t *pool);
134 
135 /**
136  * Add MRCPv2 control channel.
137  * @param channel the control channel to add
138  * @param descriptor the control descriptor
139  */
141  mrcp_control_channel_t *channel,
142  mrcp_control_descriptor_t *descriptor);
143 
144 /**
145  * Modify MRCPv2 control channel.
146  * @param channel the control channel to modify
147  * @param descriptor the control descriptor
148  */
150  mrcp_control_channel_t *channel,
151  mrcp_control_descriptor_t *descriptor);
152 
153 /**
154  * Remove MRCPv2 control channel.
155  * @param channel the control channel to remove
156  */
158 
159 /**
160  * Destroy MRCPv2 control channel.
161  * @param channel the control channel to destroy
162  */
164 
165 /**
166  * Send MRCPv2 message.
167  * @param channel the control channel to send message through
168  * @param message the message to send
169  */
171 
172 
174 
175 #endif /* MRCP_SERVER_CONNECTION_H */