Update gupnp to 0.20.5 (fdeb6f9f)
[profile/ivi/GUPnP.git] / libgupnp / gupnp-context-manager.h
1 /*
2  * Copyright (C) 2009 Nokia Corporation.
3  * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd.
4  *
5  * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
6  *         Jorn Baayen <jorn@openedhand.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23
24 #ifndef __GUPNP_CONTEXT_MANAGER_H__
25 #define __GUPNP_CONTEXT_MANAGER_H__
26
27 #include <glib.h>
28 #include "gupnp.h"
29 #include "gupnp-white-list.h"
30
31 G_BEGIN_DECLS
32
33 GType
34 gupnp_context_manager_get_type (void) G_GNUC_CONST;
35
36 #define GUPNP_TYPE_CONTEXT_MANAGER \
37                 (gupnp_context_manager_get_type ())
38 #define GUPNP_CONTEXT_MANAGER(obj) \
39                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40                  GUPNP_TYPE_CONTEXT_MANAGER, \
41                  GUPnPContextManager))
42 #define GUPNP_CONTEXT_MANAGER_CLASS(obj) \
43                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
44                  GUPNP_TYPE_CONTEXT_MANAGER, \
45                  GUPnPContextManagerClass))
46 #define GUPNP_IS_CONTEXT_MANAGER(obj) \
47                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
48                  GUPNP_TYPE_CONTEXT_MANAGER))
49 #define GUPNP_IS_CONTEXT_MANAGER_CLASS(obj) \
50                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
51                  GUPNP_TYPE_CONTEXT_MANAGER))
52 #define GUPNP_CONTEXT_MANAGER_GET_CLASS(obj) \
53                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
54                  GUPNP_TYPE_CONTEXT_MANAGER, \
55                  GUPnPContextManagerClass))
56
57 typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate;
58 typedef struct _GUPnPContextManager GUPnPContextManager;
59 typedef struct _GUPnPContextManagerClass GUPnPContextManagerClass;
60
61 /**
62  * GUPnPContextManager:
63  *
64  * This struct contains private data only, and should be accessed using the
65  * functions below.
66  */
67 struct _GUPnPContextManager {
68         GObject parent;
69
70         GUPnPContextManagerPrivate *priv;
71 };
72
73 struct _GUPnPContextManagerClass {
74         GObjectClass parent_class;
75
76         /* future padding */
77         void (* _gupnp_reserved1) (void);
78         void (* _gupnp_reserved2) (void);
79         void (* _gupnp_reserved3) (void);
80         void (* _gupnp_reserved4) (void);
81 };
82
83
84 #ifndef GUPNP_DISABLE_DEPRECATED
85 GUPnPContextManager *
86 gupnp_context_manager_new              (GMainContext *main_context,
87                                         guint         port);
88 #endif
89
90 GUPnPContextManager *
91 gupnp_context_manager_create           (guint port);
92
93 void
94 gupnp_context_manager_rescan_control_points
95                                        (GUPnPContextManager *manager);
96
97 void
98 gupnp_context_manager_manage_control_point
99                                        (GUPnPContextManager     *manager,
100                                         GUPnPControlPoint       *control_point);
101
102 void
103 gupnp_context_manager_manage_root_device
104                                        (GUPnPContextManager     *manager,
105                                         GUPnPRootDevice         *root_device);
106
107 guint
108 gupnp_context_manager_get_port         (GUPnPContextManager *manager);
109
110 GUPnPWhiteList *
111 gupnp_context_manager_get_white_list   (GUPnPContextManager *manager);
112
113 G_END_DECLS
114
115 #endif /* __GUPNP_CONTEXT_MANAGER_H__ */