avahi 0.6.30

avahi-gobject/ga-service-resolver.h

Go to the documentation of this file.
00001 /*
00002  * ga-service-resolver.h - Header for GaServiceResolver
00003  * Copyright (C) 2006-2007 Collabora Ltd.
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  */
00019 
00020 #ifndef __GA_SERVICE_RESOLVER_H__
00021 #define __GA_SERVICE_RESOLVER_H__
00022 
00023 
00024 #include <avahi-common/address.h>
00025 
00026 #include <glib-object.h>
00027 #include "ga-client.h"
00028 #include "ga-enums.h"
00029 
00030 G_BEGIN_DECLS
00031 
00032 typedef struct _GaServiceResolver GaServiceResolver;
00033 typedef struct _GaServiceResolverClass GaServiceResolverClass;
00034 
00035 struct _GaServiceResolverClass {
00036     GObjectClass parent_class;
00037 };
00038 
00039 struct _GaServiceResolver {
00040     GObject parent;
00041 };
00042 
00043 GType ga_service_resolver_get_type(void);
00044 
00045 /* TYPE MACROS */
00046 #define GA_TYPE_SERVICE_RESOLVER \
00047   (ga_service_resolver_get_type())
00048 #define GA_SERVICE_RESOLVER(obj) \
00049   (G_TYPE_CHECK_INSTANCE_CAST((obj), GA_TYPE_SERVICE_RESOLVER, GaServiceResolver))
00050 #define GA_SERVICE_RESOLVER_CLASS(klass) \
00051   (G_TYPE_CHECK_CLASS_CAST((klass), GA_TYPE_SERVICE_RESOLVER, GaServiceResolverClass))
00052 #define IS_GA_SERVICE_RESOLVER(obj) \
00053   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GA_TYPE_SERVICE_RESOLVER))
00054 #define IS_GA_SERVICE_RESOLVER_CLASS(klass) \
00055   (G_TYPE_CHECK_CLASS_TYPE((klass), GA_TYPE_SERVICE_RESOLVER))
00056 #define GA_SERVICE_RESOLVER_GET_CLASS(obj) \
00057   (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_SERVICE_RESOLVER, GaServiceResolverClass))
00058 
00059 GaServiceResolver *ga_service_resolver_new(AvahiIfIndex interface,
00060                                            AvahiProtocol protocol,
00061                                            const gchar * name,
00062                                            const gchar * type,
00063                                            const gchar * domain,
00064                                            AvahiProtocol address_protocol,
00065                                            GaLookupFlags flags);
00066 
00067 gboolean
00068 ga_service_resolver_attach(GaServiceResolver * resolver,
00069                            GaClient * client, GError ** error);
00070 
00071 gboolean
00072 ga_service_resolver_get_address(GaServiceResolver * resolver,
00073                                 AvahiAddress * address, uint16_t * port);
00074 G_END_DECLS
00075 #endif /* #ifndef __GA_SERVICE_RESOLVER_H__ */