UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_client_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_client_connection.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_CLIENT_CONNECTION_H
20 #define MRCP_CLIENT_CONNECTION_H
21 
22 /**
23  * @file mrcp_client_connection.h
24  * @brief MRCPv2 Client 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 agent
35  * @param max_connection_count the number of max MRCPv2 connections
36  * @param offer_new_connection the connection establishment policy in o/a
37  * @param pool the pool to allocate memory from
38  */
40  const char *id,
41  apr_size_t max_connection_count,
42  apt_bool_t offer_new_connection,
43  apr_pool_t *pool);
44 
45 /**
46  * Destroy connection agent.
47  * @param agent the agent to destroy
48  */
50 
51 /**
52  * Start connection agent and wait for incoming requests.
53  * @param agent the agent to start
54  */
56 
57 /**
58  * Terminate connection agent.
59  * @param agent the agent to terminate
60  */
62 
63 
64 /**
65  * Set connection event handler.
66  * @param agent the agent to set event hadler for
67  * @param obj the external object to associate with the agent
68  * @param vtable the event handler virtual methods
69  */
72  void *obj,
73  const mrcp_connection_event_vtable_t *vtable);
74 
75 /**
76  * Set MRCP resource factory.
77  * @param agent the agent to set resource factory for
78  * @param resource_factory the MRCP resource factory to set
79  */
82  const mrcp_resource_factory_t *resource_factory);
83 /**
84  * Set rx buffer size.
85  * @param agent the agent to set buffer size for
86  * @param size the size of rx buffer to set
87  */
90  apr_size_t size);
91 
92 /**
93  * Set tx buffer size.
94  * @param agent the agent to set buffer size for
95  * @param size the size of the rx buffer to set
96  */
99  apr_size_t size);
100 /**
101  * Set request timeout.
102  * @param agent the agent to set timeout for
103  * @param timeout the timeout to set
104  */
107  apr_size_t timeout);
108 
109 /**
110  * Get task.
111  * @param agent the agent to get task from
112  */
114 
115 /**
116  * Get external object.
117  * @param agent the agent to get object from
118  */
120 
121 /**
122  * Get string identifier.
123  * @param agent the agent to get identifier of
124  */
126 
127 
128 /**
129  * Create control channel.
130  * @param agent the agent to create channel for
131  * @param obj the external object to associate with the control channel
132  * @param pool the pool to allocate memory from
133  */
135  mrcp_connection_agent_t *agent,
136  void *obj,
137  apr_pool_t *pool);
138 
139 /**
140  * Add MRCPv2 control channel.
141  * @param channel the control channel to add
142  * @param descriptor the control descriptor
143  */
145  mrcp_control_channel_t *channel,
146  mrcp_control_descriptor_t *descriptor);
147 
148 /**
149  * Modify MRCPv2 control channel.
150  * @param channel the control channel to modify
151  * @param descriptor the control descriptor
152  */
154  mrcp_control_channel_t *channel,
155  mrcp_control_descriptor_t *descriptor);
156 
157 /**
158  * Remove MRCPv2 control channel.
159  * @param channel the control channel to remove
160  */
162 
163 /**
164  * Destroy MRCPv2 control channel.
165  * @param channel the control channel to destroy
166  */
168 
169 /**
170  * Send MRCPv2 message.
171  * @param channel the control channel to send message through
172  * @param message the message to send
173  */
175 
176 /**
177  * Set the logger object.
178  * @param channel the control channel to set the object for
179  * @param log_obj the object to set
180  */
182 
183 
185 
186 #endif /* MRCP_CLIENT_CONNECTION_H */