Home | History | Annotate | Download | only in avahi-gobject
      1 /*
      2  * ga-service-browser.h - Header for GaServiceBrowser
      3  * Copyright (C) 2006-2007 Collabora Ltd.
      4  *
      5  * This library is free software; you can redistribute it and/or
      6  * modify it under the terms of the GNU Lesser General Public
      7  * License as published by the Free Software Foundation; either
      8  * version 2.1 of the License, or (at your option) any later version.
      9  *
     10  * This library is distributed in the hope that it will be useful,
     11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13  * Lesser General Public License for more details.
     14  *
     15  * You should have received a copy of the GNU Lesser General Public
     16  * License along with this library; if not, write to the Free Software
     17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     18  */
     19 
     20 #ifndef __GA_SERVICE_BROWSER_H__
     21 #define __GA_SERVICE_BROWSER_H__
     22 
     23 #include <glib-object.h>
     24 #include <avahi-client/lookup.h>
     25 #include <avahi-common/defs.h>
     26 #include "ga-client.h"
     27 #include "ga-enums.h"
     28 
     29 G_BEGIN_DECLS
     30 
     31 typedef struct _GaServiceBrowser GaServiceBrowser;
     32 typedef struct _GaServiceBrowserClass GaServiceBrowserClass;
     33 
     34 struct _GaServiceBrowserClass {
     35     GObjectClass parent_class;
     36 };
     37 
     38 struct _GaServiceBrowser {
     39     GObject parent;
     40 };
     41 
     42 GType ga_service_browser_get_type(void);
     43 
     44 /* TYPE MACROS */
     45 #define GA_TYPE_SERVICE_BROWSER \
     46   (ga_service_browser_get_type())
     47 #define GA_SERVICE_BROWSER(obj) \
     48   (G_TYPE_CHECK_INSTANCE_CAST((obj), GA_TYPE_SERVICE_BROWSER, GaServiceBrowser))
     49 #define GA_SERVICE_BROWSER_CLASS(klass) \
     50   (G_TYPE_CHECK_CLASS_CAST((klass), GA_TYPE_SERVICE_BROWSER, GaServiceBrowserClass))
     51 #define IS_GA_SERVICE_BROWSER(obj) \
     52   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GA_TYPE_SERVICE_BROWSER))
     53 #define IS_GA_SERVICE_BROWSER_CLASS(klass) \
     54   (G_TYPE_CHECK_CLASS_TYPE((klass), GA_TYPE_SERVICE_BROWSER))
     55 #define GA_SERVICE_BROWSER_GET_CLASS(obj) \
     56   (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_SERVICE_BROWSER, GaServiceBrowserClass))
     57 
     58 GaServiceBrowser *ga_service_browser_new(const gchar * type);
     59 
     60 GaServiceBrowser *ga_service_browser_new_full(AvahiIfIndex interface,
     61                                               AvahiProtocol protocol,
     62                                               const gchar * type, gchar * domain,
     63                                               GaLookupFlags flags);
     64 
     65 gboolean
     66 ga_service_browser_attach(GaServiceBrowser * browser,
     67                           GaClient * client, GError ** error);
     68 
     69 
     70 G_END_DECLS
     71 #endif /* #ifndef __GA_SERVICE_BROWSER_H__ */
     72