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_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
30
APT_BEGIN_EXTERN_C
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
*/
41
MRCP_DECLARE
(
mrcp_connection_agent_t
*)
mrcp_server_connection_agent_create
(
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
*/
53
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_connection_agent_destroy
(
mrcp_connection_agent_t
*agent);
54
55
/**
56
* Start connection agent and wait for incoming requests.
57
* @param agent the agent to start
58
*/
59
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_connection_agent_start
(
mrcp_connection_agent_t
*agent);
60
61
/**
62
* Terminate connection agent.
63
* @param agent the agent to terminate
64
*/
65
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_connection_agent_terminate
(
mrcp_connection_agent_t
*agent);
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
*/
73
MRCP_DECLARE
(
void
)
mrcp_server_connection_agent_handler_set
(
74
mrcp_connection_agent_t
*agent,
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
*/
83
MRCP_DECLARE
(
void
)
mrcp_server_connection_resource_factory_set
(
84
mrcp_connection_agent_t
*agent,
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
*/
92
MRCP_DECLARE
(
void
)
mrcp_server_connection_rx_size_set
(
93
mrcp_connection_agent_t
*agent,
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
*/
101
MRCP_DECLARE
(
void
)
mrcp_server_connection_tx_size_set
(
102
mrcp_connection_agent_t
*agent,
103
apr_size_t size);
104
105
/**
106
* Get task.
107
* @param agent the agent to get task from
108
*/
109
MRCP_DECLARE
(
apt_task_t
*)
mrcp_server_connection_agent_task_get
(const
mrcp_connection_agent_t
*agent);
110
111
/**
112
* Get external object.
113
* @param agent the agent to get object from
114
*/
115
MRCP_DECLARE
(
void
*)
mrcp_server_connection_agent_object_get
(const
mrcp_connection_agent_t
*agent);
116
117
/**
118
* Get string identifier.
119
* @param agent the agent to get identifier of
120
*/
121
MRCP_DECLARE
(const
char
*)
mrcp_server_connection_agent_id_get
(const
mrcp_connection_agent_t
*agent);
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
*/
130
MRCP_DECLARE
(
mrcp_control_channel_t
*)
mrcp_server_control_channel_create
(
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
*/
140
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_control_channel_add
(
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
*/
149
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_control_channel_modify
(
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
*/
157
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_control_channel_remove
(
mrcp_control_channel_t
*channel);
158
159
/**
160
* Destroy MRCPv2 control channel.
161
* @param channel the control channel to destroy
162
*/
163
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_control_channel_destroy
(
mrcp_control_channel_t
*channel);
164
165
/**
166
* Send MRCPv2 message.
167
* @param channel the control channel to send message through
168
* @param message the message to send
169
*/
170
MRCP_DECLARE
(
apt_bool_t
)
mrcp_server_control_message_send
(
mrcp_control_channel_t
*channel,
mrcp_message_t
*message);
171
172
173
APT_END_EXTERN_C
174
175
#endif
/* MRCP_SERVER_CONNECTION_H */
Generated on Mon Feb 2 2015 19:41:39 for UniMRCP by
1.8.3.1