UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mrcp_server_session.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_session.h 2251 2014-11-21 02:36:44Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MRCP_SERVER_SESSION_H
20 #define MRCP_SERVER_SESSION_H
21 
22 /**
23  * @file mrcp_server_session.h
24  * @brief MRCP Server Session
25  */
26 
27 #include <apr_hash.h>
28 #include "mrcp_session.h"
29 #include "mpf_engine.h"
30 #include "apt_task.h"
31 #include "apt_obj_list.h"
32 
33 
35 
36 /** Opaque MRCP channel declaration */
38 /** MRCP server session declaration */
40 /** MRCP signaling message declaration */
42 
43 /** Enumeration of signaling task messages */
44 typedef enum {
45  SIGNALING_MESSAGE_OFFER,
46  SIGNALING_MESSAGE_CONTROL,
47  SIGNALING_MESSAGE_TERMINATE,
49 
50 /** MRCP signaling message */
52  /** Signaling message type */
54 
55  /** Session */
57  /** Descriptor */
59 
60  /** Channel */
62  /** MRCP message */
64 };
65 
66 /** Server session states */
67 typedef enum {
68  SESSION_STATE_NONE, /**< initial state */
69  SESSION_STATE_GENERATING_ANSWER, /**< received offer, generating answer now */
70  SESSION_STATE_INITIALIZING, /**< answer is ready, finally initializing channels now */
71  SESSION_STATE_DEACTIVATING, /**< received session termination request, deinitializing channels now */
72  SESSION_STATE_TERMINATING /**< finally terminating session */
74 
75 
76 /** MRCP server session */
78  /** Session base */
80  /** MRCP server */
82  /** MRCP profile */
84 
85  /** Media context */
87 
88  /** Media termination array */
89  apr_array_header_t *terminations;
90  /** MRCP control channel array */
91  apr_array_header_t *channels;
92 
93  /** In-progress signaling request */
95  /** Signaling request queue */
97 
98  /** In-progress offer */
100  /** In-progres answer */
102 
103  /** MPF task message, which construction is in progress */
105 
106  /** Session state */
108  /** Number of in-progress sub requests */
109  apr_size_t subrequest_count;
110 };
111 
112 /** MRCP server profile */
114  /** Identifier of the profile */
115  const char *id;
116  /** MRCP version */
118  /** Table of engines (mrcp_engine_t*) */
119  apr_hash_t *engine_table;
120  /** MRCP resource factory */
122  /** Media processing engine */
124  /** RTP termination factory */
126  /** RTP settings */
128  /** Signaling agent */
130  /** Connection agent */
132 };
133 
134 /** Create server session */
136 
137 /** Process signaling message */
139 /** Process MPF message */
141 
142 /** Process channel modify event */
144 /** Process channel remove event */
146 /** Process channel message receive */
148 /** Process connection disconnect event */
150 
151 /** Process channel open event */
153 /** Process channel close event */
155 /** Process message receive event */
157 
158 /** Get session by channel */
160 
162 
163 #endif /* MRCP_SERVER_SESSION_H */