UniMRCP
1.3.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
libs
mrcpv2-transport
include
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
30
APT_BEGIN_EXTERN_C
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
*/
39
MRCP_DECLARE
(
mrcp_connection_agent_t
*)
mrcp_client_connection_agent_create
(
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
*/
49
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_connection_agent_destroy
(
mrcp_connection_agent_t
*agent);
50
51
/**
52
* Start connection agent and wait for incoming requests.
53
* @param agent the agent to start
54
*/
55
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_connection_agent_start
(
mrcp_connection_agent_t
*agent);
56
57
/**
58
* Terminate connection agent.
59
* @param agent the agent to terminate
60
*/
61
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_connection_agent_terminate
(
mrcp_connection_agent_t
*agent);
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
*/
70
MRCP_DECLARE
(
void
)
mrcp_client_connection_agent_handler_set
(
71
mrcp_connection_agent_t
*agent,
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
*/
80
MRCP_DECLARE
(
void
)
mrcp_client_connection_resource_factory_set
(
81
mrcp_connection_agent_t
*agent,
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
*/
88
MRCP_DECLARE
(
void
)
mrcp_client_connection_rx_size_set
(
89
mrcp_connection_agent_t
*agent,
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
*/
97
MRCP_DECLARE
(
void
)
mrcp_client_connection_tx_size_set
(
98
mrcp_connection_agent_t
*agent,
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
*/
105
MRCP_DECLARE
(
void
)
mrcp_client_connection_timeout_set
(
106
mrcp_connection_agent_t
*agent,
107
apr_size_t timeout);
108
109
/**
110
* Get task.
111
* @param agent the agent to get task from
112
*/
113
MRCP_DECLARE
(
apt_task_t
*)
mrcp_client_connection_agent_task_get
(const
mrcp_connection_agent_t
*agent);
114
115
/**
116
* Get external object.
117
* @param agent the agent to get object from
118
*/
119
MRCP_DECLARE
(
void
*)
mrcp_client_connection_agent_object_get
(const
mrcp_connection_agent_t
*agent);
120
121
/**
122
* Get string identifier.
123
* @param agent the agent to get identifier of
124
*/
125
MRCP_DECLARE
(const
char
*)
mrcp_client_connection_agent_id_get
(const
mrcp_connection_agent_t
*agent);
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
*/
134
MRCP_DECLARE
(
mrcp_control_channel_t
*)
mrcp_client_control_channel_create
(
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
*/
144
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_control_channel_add
(
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
*/
153
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_control_channel_modify
(
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
*/
161
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_control_channel_remove
(
mrcp_control_channel_t
*channel);
162
163
/**
164
* Destroy MRCPv2 control channel.
165
* @param channel the control channel to destroy
166
*/
167
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_control_channel_destroy
(
mrcp_control_channel_t
*channel);
168
169
/**
170
* Send MRCPv2 message.
171
* @param channel the control channel to send message through
172
* @param message the message to send
173
*/
174
MRCP_DECLARE
(
apt_bool_t
)
mrcp_client_control_message_send
(
mrcp_control_channel_t
*channel,
mrcp_message_t
*message);
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
*/
181
MRCP_DECLARE
(
void
)
mrcp_client_control_channel_log_obj_set
(
mrcp_control_channel_t
*channel,
void
*log_obj);
182
183
184
APT_END_EXTERN_C
185
186
#endif
/* MRCP_CLIENT_CONNECTION_H */
Generated on Mon Feb 2 2015 19:41:39 for UniMRCP by
1.8.3.1