Fix the lib path
[external/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., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, 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
55 typedef struct {
56         GObject parent;
57
58         GSSDPResourceBrowserPrivate *priv;
59 } GSSDPResourceBrowser;
60
61 typedef struct {
62         GObjectClass parent_class;
63
64         /* signals */
65         void (* resource_available)   (GSSDPResourceBrowser *resource_browser,
66                                        const char           *usn,
67                                        const GList          *locations);
68         
69         void (* resource_unavailable) (GSSDPResourceBrowser *resource_browser,
70                                        const char           *usn);
71
72         /* future padding */
73         void (* _gssdp_reserved1) (void);
74         void (* _gssdp_reserved2) (void);
75         void (* _gssdp_reserved3) (void);
76         void (* _gssdp_reserved4) (void);
77 } GSSDPResourceBrowserClass;
78
79 /**
80  * GSSDP_ALL_RESOURCES
81  *
82  * SSDP search target for finding all possible resources.
83  **/
84 #define GSSDP_ALL_RESOURCES "ssdp:all"
85
86 GSSDPResourceBrowser *
87 gssdp_resource_browser_new        (GSSDPClient          *client,
88                                    const char           *target);
89
90 GSSDPClient *
91 gssdp_resource_browser_get_client (GSSDPResourceBrowser *resource_browser);
92
93 void
94 gssdp_resource_browser_set_target (GSSDPResourceBrowser *resource_browser,
95                                    const char           *target);
96
97 const char *
98 gssdp_resource_browser_get_target (GSSDPResourceBrowser *resource_browser);
99
100 void
101 gssdp_resource_browser_set_mx     (GSSDPResourceBrowser *resource_browser,
102                                    gushort               mx);
103
104 gushort
105 gssdp_resource_browser_get_mx     (GSSDPResourceBrowser *resource_browser);
106
107 void
108 gssdp_resource_browser_set_active (GSSDPResourceBrowser *resource_browser,
109                                    gboolean              active);
110
111 gboolean
112 gssdp_resource_browser_get_active (GSSDPResourceBrowser *resource_browser);
113
114 G_END_DECLS
115
116 #endif /* __GSSDP_RESOURCE_BROWSER_H__ */