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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, 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"
29 #include "rtsp-media-mapping.h"
30 #include "rtsp-session-pool.h"
34 #define GST_TYPE_RTSP_AUTH (gst_rtsp_auth_get_type ())
35 #define GST_IS_RTSP_AUTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_AUTH))
36 #define GST_IS_RTSP_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_AUTH))
37 #define GST_RTSP_AUTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_AUTH, GstRTSPAuthClass))
38 #define GST_RTSP_AUTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_AUTH, GstRTSPAuth))
39 #define GST_RTSP_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_AUTH, GstRTSPAuthClass))
40 #define GST_RTSP_AUTH_CAST(obj) ((GstRTSPAuth*)(obj))
41 #define GST_RTSP_AUTH_CLASS_CAST(klass) ((GstRTSPAuthClass*)(klass))
46 * The authentication structure.
53 GstRTSPMethod methods;
56 struct _GstRTSPAuthClass {
57 GObjectClass parent_class;
59 gboolean (*setup_auth) (GstRTSPAuth *auth, GstRTSPClient * client, GstRTSPClientState *state);
60 gboolean (*check_method) (GstRTSPAuth *auth, GstRTSPClient * client, GstRTSPClientState *state);
63 GType gst_rtsp_auth_get_type (void);
65 GstRTSPAuth * gst_rtsp_auth_new (void);
67 void gst_rtsp_auth_set_basic (GstRTSPAuth *auth, const gchar * basic);
69 gboolean gst_rtsp_auth_setup_auth (GstRTSPAuth *auth, GstRTSPClient * client,
70 GstRTSPClientState *state);
71 gboolean gst_rtsp_auth_check_method (GstRTSPAuth *auth, GstRTSPClient * client,
72 GstRTSPClientState *state);
74 gchar * gst_rtsp_auth_make_basic (const gchar * user, const gchar * pass);
78 #endif /* __GST_RTSP_AUTH_H__ */