Update gupnp to 0.20.5 (fdeb6f9f)
[profile/ivi/GUPnP.git] / libgupnp / gupnp-white-list.h
1 /*
2  * Copyright (C) 2013 Intel Corporation.
3  *
4  * Author: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GUPNP_WHITE_LIST_H__
23 #define __GUPNP_WHITE_LIST_H__
24
25 #include <glib.h>
26 #include "gupnp-context.h"
27
28 G_BEGIN_DECLS
29
30 GType
31 gupnp_white_list_get_type (void) G_GNUC_CONST;
32
33 #define GUPNP_TYPE_WHITE_LIST \
34                 (gupnp_white_list_get_type ())
35 #define GUPNP_WHITE_LIST(obj) \
36                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
37                  GUPNP_TYPE_WHITE_LIST, \
38                  GUPnPWhiteList))
39 #define GUPNP_WHITE_LIST_CLASS(obj) \
40                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
41                  GUPNP_TYPE_WHITE_LIST, \
42                  GUPnPWhiteListClass))
43 #define GUPNP_IS_WHITE_LIST(obj) \
44                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
45                  GUPNP_TYPE_WHITE_LIST))
46 #define GUPNP_IS_WHITE_LIST_CLASS(obj) \
47                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
48                  GUPNP_TYPE_WHITE_LIST))
49 #define GUPNP_WHITE_LIST_GET_CLASS(obj) \
50                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
51                  GUPNP_TYPE_WHITE_LIST, \
52                  GUPnPWhiteListClass))
53
54 typedef struct _GUPnPWhiteListPrivate GUPnPWhiteListPrivate;
55 typedef struct _GUPnPWhiteList GUPnPWhiteList;
56 typedef struct _GUPnPWhiteListClass GUPnPWhiteListClass;
57
58 /**
59  * GUPnPWhiteList:
60  *
61  * This struct contains private data only, and should be accessed using the
62  * functions below.
63  */
64 struct _GUPnPWhiteList {
65         GObject parent;
66
67         GUPnPWhiteListPrivate *priv;
68 };
69
70 struct _GUPnPWhiteListClass {
71         GObjectClass parent_class;
72 };
73
74 GUPnPWhiteList *
75 gupnp_white_list_new            (void);
76
77 void
78 gupnp_white_list_set_enabled    (GUPnPWhiteList *white_list,
79                                  gboolean enable);
80
81 gboolean
82 gupnp_white_list_get_enabled     (GUPnPWhiteList *white_list);
83
84 gboolean
85 gupnp_white_list_is_empty       (GUPnPWhiteList *white_list);
86
87 gboolean
88 gupnp_white_list_add_entry      (GUPnPWhiteList *white_list,
89                                  gchar* entry);
90
91 gboolean
92 gupnp_white_list_remove_entry   (GUPnPWhiteList *white_list,
93                                  gchar* entry);
94
95 GList *
96 gupnp_white_list_get_entries    (GUPnPWhiteList *white_list);
97
98 void
99 gupnp_white_list_clear          (GUPnPWhiteList *white_list);
100
101 gboolean
102 gupnp_white_list_check_context  (GUPnPWhiteList *white_list,
103                                  GUPnPContext *context);
104
105 G_END_DECLS
106
107 #endif /* __GUPNP_WHITE_LIST_H__ */