tizen 2.3.1 release
[external/gupnp.git] / libgupnp / gupnp-context-manager.h
1 /*
2  * Copyright (C) 2009 Nokia Corporation, all rights reserved.
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., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, 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
30 G_BEGIN_DECLS
31
32 GType
33 gupnp_context_manager_get_type (void) G_GNUC_CONST;
34
35 #define GUPNP_TYPE_CONTEXT_MANAGER \
36                 (gupnp_context_manager_get_type ())
37 #define GUPNP_CONTEXT_MANAGER(obj) \
38                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
39                  GUPNP_TYPE_CONTEXT_MANAGER, \
40                  GUPnPContextManager))
41 #define GUPNP_CONTEXT_MANAGER_CLASS(obj) \
42                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
43                  GUPNP_TYPE_CONTEXT_MANAGER, \
44                  GUPnPContextManagerClass))
45 #define GUPNP_IS_CONTEXT_MANAGER(obj) \
46                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
47                  GUPNP_TYPE_CONTEXT_MANAGER))
48 #define GUPNP_IS_CONTEXT_MANAGER_CLASS(obj) \
49                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
50                  GUPNP_TYPE_CONTEXT_MANAGER))
51 #define GUPNP_CONTEXT_MANAGER_GET_CLASS(obj) \
52                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
53                  GUPNP_TYPE_CONTEXT_MANAGER, \
54                  GUPnPContextManagerClass))
55
56 typedef struct _GUPnPContextManagerPrivate GUPnPContextManagerPrivate;
57
58 /**
59  * GUPnPContextManager:
60  *
61  * This struct contains private data only, and should be accessed using the
62  * functions below.
63  */
64 typedef struct {
65         GObject parent;
66
67         GUPnPContextManagerPrivate *priv;
68 } GUPnPContextManager;
69
70 typedef struct {
71         GObjectClass parent_class;
72
73         /* future padding */
74         void (* _gupnp_reserved1) (void);
75         void (* _gupnp_reserved2) (void);
76         void (* _gupnp_reserved3) (void);
77         void (* _gupnp_reserved4) (void);
78 } GUPnPContextManagerClass;
79
80 GUPnPContextManager *
81 gupnp_context_manager_new              (GMainContext *main_context,
82                                         guint         port);
83
84 void
85 gupnp_context_manager_manage_control_point
86                                        (GUPnPContextManager     *manager,
87                                         GUPnPControlPoint       *control_point);
88
89 void
90 gupnp_context_manager_manage_root_device
91                                        (GUPnPContextManager     *manager,
92                                         GUPnPRootDevice         *root_device);
93
94 G_END_DECLS
95
96 #endif /* __GUPNP_CONTEXT_MANAGER_H__ */