UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
rtsp_client.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_client.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef RTSP_CLIENT_H
20 #define RTSP_CLIENT_H
21 
22 /**
23  * @file rtsp_client.h
24  * @brief RTSP Client
25  */
26 
27 #include "apt_task.h"
28 #include "rtsp_message.h"
29 
31 
32 /** Opaque RTSP client declaration */
34 /** Opaque RTSP client session declaration */
36 
37 /** RTSP client vtable declaration */
39 
40 /** RTSP client vtable */
42  /** Sesssion termination response handler */
44  /** Sesssion termination event handler */
46  /** Sesssion setup response handler */
48  /** Sesssion event handler */
50 };
51 
52 /**
53  * Create RTSP client.
54  * @param id the identifier of the client
55  * @param max_connection_count the number of max RTSP connections
56  * @param request_timeout the request timeout to set
57  * @param obj the external object to send event to
58  * @param handler the response/event handler
59  * @param pool the pool to allocate memory from
60  */
62  const char *id,
63  apr_size_t max_connection_count,
64  apr_size_t request_timeout,
65  void *obj,
66  const rtsp_client_vtable_t *handler,
67  apr_pool_t *pool);
68 
69 /**
70  * Destroy RTSP client.
71  * @param client the client to destroy
72  */
74 
75 /**
76  * Start client and wait for incoming requests.
77  * @param client the client to start
78  */
80 
81 /**
82  * Terminate client.
83  * @param client the client to terminate
84  */
86 
87 /**
88  * Get task.
89  * @param client the client to get task from
90  */
92 
93 /**
94  * Get external object.
95  * @param client the client to get object from
96  */
98 
99 
100 /**
101  * Create RTSP session.
102  * @param client the client to create session for
103  * @param server_ip the IP address of RTSP server
104  * @param server_port the port of RTSP server
105  * @param resource_location the location of RTSP resource (path in RTSP URI)
106  */
108  rtsp_client_t *client,
109  const char *server_ip,
110  apr_port_t server_port,
111  const char *resource_location);
112 
113 /**
114  * Destroy RTSP session.
115  * @param session the session to destroy
116  */
118 
119 /**
120  * Terminate RTSP session.
121  * @param client the client to use
122  * @param session the session to terminate
123  */
125 
126 /**
127  * Send RTSP message.
128  * @param client the client to use
129  * @param session the session to send RTSP request for
130  * @param message the RTSP request to send
131  */
133 
134 /**
135  * Get object associated with the session.
136  * @param session the session to get object from
137  */
139 
140 /**
141  * Set object associated with the session.
142  * @param session the session to set object for
143  * @param obj the object to set
144  */
146 
147 /**
148  * Get the session identifier.
149  * @param session the session to get identifier from
150  */
152 
154 
155 #endif /* RTSP_CLIENT_H */