UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rtsp_server.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: rtsp_server.h 2252 2014-11-21 02:45:15Z achaloyan@gmail.com $
17  */
18 
19 #ifndef RTSP_SERVER_H
20 #define RTSP_SERVER_H
21 
22 /**
23  * @file rtsp_server.h
24  * @brief RTSP Server
25  */
26 
27 #include "apt_task.h"
28 #include "rtsp_message.h"
29 
31 
32 /** Opaque RTSP server declaration */
34 /** Opaque RTSP server session declaration */
36 
37 /** RTSP server vtable declaration */
39 
40 /** RTSP server vtable declaration */
42  /** Virtual create session */
44  /** Virtual terminate session */
46  /** Virtual message handler */
48 };
49 
50 /**
51  * Create RTSP server.
52  * @param id the identifier of the server
53  * @param listen_ip the listen IP address
54  * @param listen_port the listen port
55  * @param max_connection_count the number of max RTSP connections
56  * @param obj the external object to send events to
57  * @param handler the request handler
58  * @param pool the pool to allocate memory from
59  */
61  const char *id,
62  const char *listen_ip,
63  apr_port_t listen_port,
64  apr_size_t max_connection_count,
65  void *obj,
66  const rtsp_server_vtable_t *handler,
67  apr_pool_t *pool);
68 
69 /**
70  * Destroy RTSP server.
71  * @param server the server to destroy
72  */
74 
75 /**
76  * Start server and wait for incoming requests.
77  * @param server the server to start
78  */
80 
81 /**
82  * Terminate server.
83  * @param server the server to terminate
84  */
86 
87 /**
88  * Get task.
89  * @param server the server to get task from
90  */
92 
93 /**
94  * Get external object.
95  * @param server the server to get object from
96  */
98 
99 /**
100  * Send RTSP message.
101  * @param server the server to use
102  * @param session the session to send RTSP response for
103  * @param message the RTSP response to send
104  */
106 
107 /**
108  * Terminate RTSP session (respond to terminate request).
109  * @param server the server to use
110  * @param session the session to terminate
111  */
113 
114 /**
115  * Get object associated with the session.
116  * @param session the session to get object from
117  */
119 
120 /**
121  * Set object associated with the session.
122  * @param session the session to set object for
123  * @param obj the object to set
124  */
126 
127 /**
128  * Get the session identifier.
129  * @param session the session to get identifier from
130  */
132 
133 /**
134  * Get active (in-progress) session request.
135  * @param session the session to get from
136  */
138 
139 /**
140  * Get the session destination (client) IP address.
141  * @param session the session to get IP address from
142  */
144 
146 
147 #endif /* RTSP_SERVER_H */