2 * Copyright (C) 2010 Wim Taymans <wim.taymans at gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
22 #ifndef __GST_RTSP_TOKEN_H__
23 #define __GST_RTSP_TOKEN_H__
25 typedef struct _GstRTSPToken GstRTSPToken;
27 #include "rtsp-auth.h"
31 GType gst_rtsp_token_get_type(void);
33 #define GST_TYPE_RTSP_TOKEN (gst_rtsp_token_get_type())
34 #define GST_IS_RTSP_TOKEN(obj) (GST_IS_MINI_OBJECT_TYPE (obj, GST_TYPE_RTSP_TOKEN))
35 #define GST_RTSP_TOKEN_CAST(obj) ((GstRTSPToken*)(obj))
36 #define GST_RTSP_TOKEN(obj) (GST_RTSP_TOKEN_CAST(obj))
41 * An opaque object used for checking authorisations.
42 * It is generated after successfull authentication.
44 struct _GstRTSPToken {
45 GstMiniObject mini_object;
51 * @token: The token to refcount
53 * Increase the refcount of this token.
55 * Returns: (transfer full): @token (for convenience when doing assignments)
58 G_INLINE_FUNC GstRTSPToken * gst_rtsp_token_ref (GstRTSPToken * token);
61 static inline GstRTSPToken *
62 gst_rtsp_token_ref (GstRTSPToken * token)
64 return (GstRTSPToken *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (token));
68 * gst_rtsp_token_unref:
69 * @token: (transfer full): the token to refcount
71 * Decrease the refcount of an token, freeing it if the refcount reaches 0.
74 G_INLINE_FUNC void gst_rtsp_token_unref (GstRTSPToken * token);
78 gst_rtsp_token_unref (GstRTSPToken * token)
80 gst_mini_object_unref (GST_MINI_OBJECT_CAST (token));
84 GstRTSPToken * gst_rtsp_token_new (void);
86 const GstStructure * gst_rtsp_token_get_structure (GstRTSPToken *token);
87 GstStructure * gst_rtsp_token_writable_structure (GstRTSPToken *token);
89 const gchar * gst_rtsp_token_get_string (GstRTSPToken *token,
93 #endif /* __GST_RTSP_TOKEN_H__ */