Imported Upstream version 0.14.4
[platform/upstream/gssdp.git] / libgssdp / gssdp-resource-group.h
1 /* 
2  * Copyright (C) 2006, 2007 OpenedHand Ltd.
3  *
4  * Author: Jorn Baayen <jorn@openedhand.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library 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 __GSSDP_RESOURCE_GROUP_H__
23 #define __GSSDP_RESOURCE_GROUP_H__
24
25 #include "gssdp-client.h"
26
27 G_BEGIN_DECLS
28
29 GType
30 gssdp_resource_group_get_type (void) G_GNUC_CONST;
31
32 #define GSSDP_TYPE_RESOURCE_GROUP \
33                 (gssdp_resource_group_get_type ())
34 #define GSSDP_RESOURCE_GROUP(obj) \
35                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
36                  GSSDP_TYPE_RESOURCE_GROUP, \
37                  GSSDPResourceGroup))
38 #define GSSDP_RESOURCE_GROUP_CLASS(klass) \
39                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
40                  GSSDP_TYPE_RESOURCE_GROUP, \
41                  GSSDPResourceGroupClass))
42 #define GSSDP_IS_RESOURCE_GROUP(obj) \
43                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
44                  GSSDP_TYPE_RESOURCE_GROUP))
45 #define GSSDP_IS_RESOURCE_GROUP_CLASS(klass) \
46                 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
47                  GSSDP_TYPE_RESOURCE_GROUP))
48 #define GSSDP_RESOURCE_GROUP_GET_CLASS(obj) \
49                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50                  GSSDP_TYPE_RESOURCE_GROUP, \
51                  GSSDPResourceGroupClass))
52
53 typedef struct _GSSDPResourceGroupPrivate GSSDPResourceGroupPrivate;
54 typedef struct _GSSDPResourceGroup GSSDPResourceGroup;
55 typedef struct _GSSDPResourceGroupClass GSSDPResourceGroupClass;
56
57 struct _GSSDPResourceGroup {
58         GObject parent;
59
60         GSSDPResourceGroupPrivate *priv;
61 };
62
63 struct _GSSDPResourceGroupClass {
64         GObjectClass parent_class;
65
66         /* future padding */
67         void (* _gssdp_reserved1) (void);
68         void (* _gssdp_reserved2) (void);
69         void (* _gssdp_reserved3) (void);
70         void (* _gssdp_reserved4) (void);
71 };
72
73 GSSDPResourceGroup *
74 gssdp_resource_group_new                 (GSSDPClient        *client);
75
76 GSSDPClient *
77 gssdp_resource_group_get_client          (GSSDPResourceGroup *resource_group);
78
79 void
80 gssdp_resource_group_set_max_age         (GSSDPResourceGroup *resource_group,
81                                           guint               max_age);
82
83 guint
84 gssdp_resource_group_get_max_age         (GSSDPResourceGroup *resource_group);
85
86 void
87 gssdp_resource_group_set_available       (GSSDPResourceGroup *resource_group,
88                                           gboolean            available);
89
90 gboolean
91 gssdp_resource_group_get_available       (GSSDPResourceGroup *resource_group);
92
93 void
94 gssdp_resource_group_set_message_delay         (GSSDPResourceGroup *resource_group,
95                                                 guint               message_delay);
96
97 guint
98 gssdp_resource_group_get_message_delay         (GSSDPResourceGroup *resource_group);
99
100 guint
101 gssdp_resource_group_add_resource        (GSSDPResourceGroup *resource_group,
102                                           const char         *target,
103                                           const char         *usn,
104                                           GList              *locations);
105
106 guint
107 gssdp_resource_group_add_resource_simple (GSSDPResourceGroup *resource_group,
108                                           const char         *target,
109                                           const char         *usn,
110                                           const char         *location);
111
112 void
113 gssdp_resource_group_remove_resource     (GSSDPResourceGroup *resource_group,
114                                           guint               resource_id);
115
116 G_END_DECLS
117
118 #endif /* __GSSDP_RESOURCE_GROUP_H__ */