Home | History | Annotate | Download | only in avahi-gobject
      1 /*
      2  * ga-record-browser.h - Header for GaRecordBrowser
      3  * Copyright (C) 2007 Collabora Ltd.
      4  * @author Sjoerd Simons <sjoerd (at) luon.net>
      5  *
      6  * This library is free software; you can redistribute it and/or
      7  * modify it under the terms of the GNU Lesser General Public
      8  * License as published by the Free Software Foundation; either
      9  * version 2.1 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  * Lesser General Public License for more details.
     15  *
     16  * You should have received a copy of the GNU Lesser General Public
     17  * License along with this library; if not, write to the Free Software
     18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     19  */
     20 
     21 #ifndef __GA_RECORD_BROWSER_H__
     22 #define __GA_RECORD_BROWSER_H__
     23 
     24 #include <glib-object.h>
     25 #include <avahi-client/lookup.h>
     26 #include <avahi-common/defs.h>
     27 #include "ga-client.h"
     28 #include "ga-enums.h"
     29 
     30 G_BEGIN_DECLS
     31 
     32 typedef struct _GaRecordBrowser GaRecordBrowser;
     33 typedef struct _GaRecordBrowserClass GaRecordBrowserClass;
     34 
     35 struct _GaRecordBrowserClass {
     36     GObjectClass parent_class;
     37 };
     38 
     39 struct _GaRecordBrowser {
     40     GObject parent;
     41 };
     42 
     43 GType ga_record_browser_get_type(void);
     44 
     45 /* TYPE MACROS */
     46 #define GA_TYPE_RECORD_BROWSER \
     47   (ga_record_browser_get_type())
     48 #define GA_RECORD_BROWSER(obj) \
     49   (G_TYPE_CHECK_INSTANCE_CAST((obj), GA_TYPE_RECORD_BROWSER, GaRecordBrowser))
     50 #define GA_RECORD_BROWSER_CLASS(klass) \
     51   (G_TYPE_CHECK_CLASS_CAST((klass), GA_TYPE_RECORD_BROWSER, GaRecordBrowserClass))
     52 #define IS_GA_RECORD_BROWSER(obj) \
     53   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GA_TYPE_RECORD_BROWSER))
     54 #define IS_GA_RECORD_BROWSER_CLASS(klass) \
     55   (G_TYPE_CHECK_CLASS_TYPE((klass), GA_TYPE_RECORD_BROWSER))
     56 #define GA_RECORD_BROWSER_GET_CLASS(obj) \
     57   (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_RECORD_BROWSER, GaRecordBrowserClass))
     58 
     59 GaRecordBrowser *ga_record_browser_new(const gchar * name, guint16 type);
     60 
     61 GaRecordBrowser *ga_record_browser_new_full(AvahiIfIndex interface,
     62                                             AvahiProtocol protocol,
     63                                             const gchar * name,
     64                                             guint16 clazz,
     65                                             guint16 type,
     66                                             GaLookupFlags flags);
     67 
     68 gboolean
     69 ga_record_browser_attach(GaRecordBrowser * browser,
     70                          GaClient * client, GError ** error);
     71 
     72 
     73 G_END_DECLS
     74 #endif /* #ifndef __GA_RECORD_BROWSER_H__ */
     75