[gssdp] Update gssdp version from 0.8.2 to 0.14.4
[platform/upstream/gssdp.git] / libgssdp / gssdp-resource-browser.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_BROWSER_H__
23 #define __GSSDP_RESOURCE_BROWSER_H__
24
25 #include "gssdp-client.h"
26
27 G_BEGIN_DECLS
28
29 GType
30 gssdp_resource_browser_get_type (void) G_GNUC_CONST;
31
32 #define GSSDP_TYPE_RESOURCE_BROWSER \
33                 (gssdp_resource_browser_get_type ())
34 #define GSSDP_RESOURCE_BROWSER(obj) \
35                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
36                  GSSDP_TYPE_RESOURCE_BROWSER, \
37                  GSSDPResourceBrowser))
38 #define GSSDP_RESOURCE_BROWSER_CLASS(klass) \
39                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
40                  GSSDP_TYPE_RESOURCE_BROWSER, \
41                  GSSDPResourceBrowserClass))
42 #define GSSDP_IS_RESOURCE_BROWSER(obj) \
43                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
44                  GSSDP_TYPE_RESOURCE_BROWSER))
45 #define GSSDP_IS_RESOURCE_BROWSER_CLASS(klass) \
46                 (G_TYPE_CHECK_CLASS_TYPE ((klass), \
47                  GSSDP_TYPE_RESOURCE_BROWSER))
48 #define GSSDP_RESOURCE_BROWSER_GET_CLASS(obj) \
49                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50                  GSSDP_TYPE_RESOURCE_BROWSER, \
51                  GSSDPResourceBrowserClass))
52
53 typedef struct _GSSDPResourceBrowserPrivate GSSDPResourceBrowserPrivate;
54 typedef struct _GSSDPResourceBrowser GSSDPResourceBrowser;
55 typedef struct _GSSDPResourceBrowserClass GSSDPResourceBrowserClass;
56
57 struct _GSSDPResourceBrowser {
58         GObject parent;
59
60         GSSDPResourceBrowserPrivate *priv;
61 };
62
63 struct _GSSDPResourceBrowserClass {
64         GObjectClass parent_class;
65
66         /* signals */
67         void (* resource_available)   (GSSDPResourceBrowser *resource_browser,
68                                        const char           *usn,
69                                        const GList          *locations);
70         
71         void (* resource_unavailable) (GSSDPResourceBrowser *resource_browser,
72                                        const char           *usn);
73
74         /* future padding */
75         void (* _gssdp_reserved1) (void);
76         void (* _gssdp_reserved2) (void);
77         void (* _gssdp_reserved3) (void);
78         void (* _gssdp_reserved4) (void);
79 };
80
81 /**
82  * GSSDP_ALL_RESOURCES:
83  *
84  * SSDP search target for finding all possible resources.
85  **/
86 #define GSSDP_ALL_RESOURCES "ssdp:all"
87
88 GSSDPResourceBrowser *
89 gssdp_resource_browser_new        (GSSDPClient          *client,
90                                    const char           *target);
91
92 GSSDPClient *
93 gssdp_resource_browser_get_client (GSSDPResourceBrowser *resource_browser);
94
95 void
96 gssdp_resource_browser_set_target (GSSDPResourceBrowser *resource_browser,
97                                    const char           *target);
98
99 const char *
100 gssdp_resource_browser_get_target (GSSDPResourceBrowser *resource_browser);
101
102 void
103 gssdp_resource_browser_set_mx     (GSSDPResourceBrowser *resource_browser,
104                                    gushort               mx);
105
106 gushort
107 gssdp_resource_browser_get_mx     (GSSDPResourceBrowser *resource_browser);
108
109 void
110 gssdp_resource_browser_set_active (GSSDPResourceBrowser *resource_browser,
111                                    gboolean              active);
112
113 gboolean
114 gssdp_resource_browser_get_active (GSSDPResourceBrowser *resource_browser);
115
116 gboolean
117 gssdp_resource_browser_rescan     (GSSDPResourceBrowser *resource_browser);
118
119 G_END_DECLS
120
121 #endif /* __GSSDP_RESOURCE_BROWSER_H__ */