/usr/include/gstreamer-1.0/gst/rtsp/gstrtspmessage.h is in libgstreamer-plugins-base1.0-dev 1.14.0-2ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | /* GStreamer
* Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/*
* Unless otherwise indicated, Source Code is licensed under MIT license.
* See further explanation attached in License Statement (distributed in the file
* LICENSE).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is furnished to do
* so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef __GST_RTSP_MESSAGE_H__
#define __GST_RTSP_MESSAGE_H__
#include <gst/gst.h>
#include <gst/rtsp/gstrtspdefs.h>
G_BEGIN_DECLS
/**
* GstRTSPMsgType:
* @GST_RTSP_MESSAGE_INVALID: invalid message type
* @GST_RTSP_MESSAGE_REQUEST: RTSP request message
* @GST_RTSP_MESSAGE_RESPONSE: RTSP response message
* @GST_RTSP_MESSAGE_HTTP_REQUEST: HTTP request message.
* @GST_RTSP_MESSAGE_HTTP_RESPONSE: HTTP response message.
* @GST_RTSP_MESSAGE_DATA: data message
*
* The type of a message.
*/
typedef enum
{
GST_RTSP_MESSAGE_INVALID,
GST_RTSP_MESSAGE_REQUEST,
GST_RTSP_MESSAGE_RESPONSE,
GST_RTSP_MESSAGE_HTTP_REQUEST,
GST_RTSP_MESSAGE_HTTP_RESPONSE,
GST_RTSP_MESSAGE_DATA
} GstRTSPMsgType;
typedef struct _GstRTSPMessage GstRTSPMessage;
/**
* GstRTSPMessage:
* @type: the message type
*
* An RTSP message containing request, response or data messages. Depending on
* the @type, the appropriate structure may be accessed.
*/
struct _GstRTSPMessage
{
GstRTSPMsgType type;
union {
struct {
GstRTSPMethod method;
gchar *uri;
GstRTSPVersion version;
} request;
struct {
GstRTSPStatusCode code;
gchar *reason;
GstRTSPVersion version;
} response;
struct {
guint8 channel;
} data;
} type_data;
/*< private >*/
GArray *hdr_fields;
guint8 *body;
guint body_size;
gpointer _gst_reserved[GST_PADDING];
};
GST_RTSP_API
GType gst_rtsp_msg_get_type (void);
#define GST_TYPE_RTSP_MESSAGE (gst_rtsp_msg_get_type())
#define GST_RTSP_MESSAGE_CAST(object) ((GstRTSPMessage *)(object))
#define GST_RTSP_MESSAGE(object) (GST_RTSP_MESSAGE_CAST(object))
/* memory management */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_new (GstRTSPMessage **msg);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_init (GstRTSPMessage *msg);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_unset (GstRTSPMessage *msg);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_free (GstRTSPMessage *msg);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_copy (const GstRTSPMessage *msg,
GstRTSPMessage **copy);
GST_RTSP_API
GstRTSPMsgType gst_rtsp_message_get_type (GstRTSPMessage *msg);
/* request */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_new_request (GstRTSPMessage **msg,
GstRTSPMethod method,
const gchar *uri);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_init_request (GstRTSPMessage *msg,
GstRTSPMethod method,
const gchar *uri);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_parse_request (GstRTSPMessage *msg,
GstRTSPMethod *method,
const gchar **uri,
GstRTSPVersion *version);
/* response */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_new_response (GstRTSPMessage **msg,
GstRTSPStatusCode code,
const gchar *reason,
const GstRTSPMessage *request);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_init_response (GstRTSPMessage *msg,
GstRTSPStatusCode code,
const gchar *reason,
const GstRTSPMessage *request);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_parse_response (GstRTSPMessage *msg,
GstRTSPStatusCode *code,
const gchar **reason,
GstRTSPVersion *version);
/* data */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_new_data (GstRTSPMessage **msg,
guint8 channel);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_init_data (GstRTSPMessage *msg,
guint8 channel);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_parse_data (GstRTSPMessage *msg,
guint8 *channel);
/* headers */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_add_header (GstRTSPMessage *msg,
GstRTSPHeaderField field,
const gchar *value);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_take_header (GstRTSPMessage *msg,
GstRTSPHeaderField field,
gchar *value);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_remove_header (GstRTSPMessage *msg,
GstRTSPHeaderField field,
gint indx);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_get_header (const GstRTSPMessage *msg,
GstRTSPHeaderField field,
gchar **value,
gint indx);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_add_header_by_name (GstRTSPMessage * msg,
const gchar * header,
const gchar * value);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_take_header_by_name (GstRTSPMessage * msg,
const gchar * header,
gchar * value);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_remove_header_by_name (GstRTSPMessage * msg,
const gchar * header,
gint index);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_get_header_by_name (GstRTSPMessage * msg,
const gchar * header,
gchar ** value,
gint index);
/* header serialization */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_append_headers (const GstRTSPMessage *msg,
GString *str);
/* handling the body */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_set_body (GstRTSPMessage *msg,
const guint8 *data,
guint size);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_take_body (GstRTSPMessage *msg,
guint8 *data,
guint size);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_get_body (const GstRTSPMessage *msg,
guint8 **data,
guint *size);
GST_RTSP_API
GstRTSPResult gst_rtsp_message_steal_body (GstRTSPMessage *msg,
guint8 **data,
guint *size);
typedef struct _GstRTSPAuthCredential GstRTSPAuthCredential;
typedef struct _GstRTSPAuthParam GstRTSPAuthParam;
struct _GstRTSPAuthCredential {
GstRTSPAuthMethod scheme;
/* For Basic/Digest WWW-Authenticate and Digest
* Authorization */
GstRTSPAuthParam **params; /* NULL terminated */
/* For Basic Authorization */
gchar *authorization;
};
struct _GstRTSPAuthParam {
gchar *name;
gchar *value;
};
GST_RTSP_API
GstRTSPAuthParam * gst_rtsp_auth_param_copy (GstRTSPAuthParam * param);
GST_RTSP_API
void gst_rtsp_auth_param_free (GstRTSPAuthParam * param);
GST_RTSP_API
GstRTSPAuthCredential ** gst_rtsp_message_parse_auth_credentials (GstRTSPMessage * msg, GstRTSPHeaderField field);
GST_RTSP_API
void gst_rtsp_auth_credentials_free (GstRTSPAuthCredential ** credentials);
#define GST_TYPE_RTSP_AUTH_CREDENTIAL gst_rtsp_auth_credential_get_type()
GST_RTSP_API
GType gst_rtsp_auth_credential_get_type (void);
#define GST_TYPE_RTSP_AUTH_PARAM gst_rtsp_auth_param_get_type()
GST_RTSP_API
GType gst_rtsp_auth_param_get_type (void);
/* debug */
GST_RTSP_API
GstRTSPResult gst_rtsp_message_dump (GstRTSPMessage *msg);
G_END_DECLS
#endif /* __GST_RTSP_MESSAGE_H__ */
|