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_AUTH_H__
23 #define __GST_RTSP_AUTH_H__
25 typedef struct _GstRTSPAuth GstRTSPAuth;
26 typedef struct _GstRTSPAuthClass GstRTSPAuthClass;
28 #include "rtsp-client.h"
32 #define GST_TYPE_RTSP_AUTH (gst_rtsp_auth_get_type ())
33 #define GST_IS_RTSP_AUTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_AUTH))
34 #define GST_IS_RTSP_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_AUTH))
35 #define GST_RTSP_AUTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_AUTH, GstRTSPAuthClass))
36 #define GST_RTSP_AUTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_AUTH, GstRTSPAuth))
37 #define GST_RTSP_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_AUTH, GstRTSPAuthClass))
38 #define GST_RTSP_AUTH_CAST(obj) ((GstRTSPAuth*)(obj))
39 #define GST_RTSP_AUTH_CLASS_CAST(klass) ((GstRTSPAuthClass*)(klass))
44 * The authentication structure.
52 GstRTSPMethod methods;
55 struct _GstRTSPAuthClass {
56 GObjectClass parent_class;
58 gboolean (*setup_auth) (GstRTSPAuth *auth, GstRTSPClient * client,
59 GQuark hint, GstRTSPClientState *state);
60 gboolean (*check_method) (GstRTSPAuth *auth, GstRTSPClient * client,
61 GQuark hint, GstRTSPClientState *state);
64 GType gst_rtsp_auth_get_type (void);
66 GstRTSPAuth * gst_rtsp_auth_new (void);
68 void gst_rtsp_auth_set_basic (GstRTSPAuth *auth, const gchar * basic);
70 gboolean gst_rtsp_auth_setup_auth (GstRTSPAuth *auth, GstRTSPClient * client,
71 GQuark hint, GstRTSPClientState *state);
72 gboolean gst_rtsp_auth_check (GstRTSPAuth *auth, GstRTSPClient * client,
73 GQuark hint, GstRTSPClientState *state);
75 gchar * gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass);
79 #endif /* __GST_RTSP_AUTH_H__ */