2 * ga-service-resolver.h - Header for GaServiceResolver
3 * Copyright (C) 2006-2007 Collabora Ltd.
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.
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.
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
20 #ifndef __GA_SERVICE_RESOLVER_H__
21 #define __GA_SERVICE_RESOLVER_H__
24 #include <avahi-common/address.h>
26 #include <glib-object.h>
27 #include "ga-client.h"
32 typedef struct _GaServiceResolver GaServiceResolver;
33 typedef struct _GaServiceResolverClass GaServiceResolverClass;
35 struct _GaServiceResolverClass {
36 GObjectClass parent_class;
39 struct _GaServiceResolver {
43 GType ga_service_resolver_get_type(void);
46 #define GA_TYPE_SERVICE_RESOLVER \
47 (ga_service_resolver_get_type())
48 #define GA_SERVICE_RESOLVER(obj) \
49 (G_TYPE_CHECK_INSTANCE_CAST((obj), GA_TYPE_SERVICE_RESOLVER, GaServiceResolver))
50 #define GA_SERVICE_RESOLVER_CLASS(klass) \
51 (G_TYPE_CHECK_CLASS_CAST((klass), GA_TYPE_SERVICE_RESOLVER, GaServiceResolverClass))
52 #define IS_GA_SERVICE_RESOLVER(obj) \
53 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GA_TYPE_SERVICE_RESOLVER))
54 #define IS_GA_SERVICE_RESOLVER_CLASS(klass) \
55 (G_TYPE_CHECK_CLASS_TYPE((klass), GA_TYPE_SERVICE_RESOLVER))
56 #define GA_SERVICE_RESOLVER_GET_CLASS(obj) \
57 (G_TYPE_INSTANCE_GET_CLASS ((obj), GA_TYPE_SERVICE_RESOLVER, GaServiceResolverClass))
59 GaServiceResolver *ga_service_resolver_new(AvahiIfIndex interface,
60 AvahiProtocol protocol,
64 AvahiProtocol address_protocol,
68 ga_service_resolver_attach(GaServiceResolver * resolver,
69 GaClient * client, GError ** error);
72 ga_service_resolver_get_address(GaServiceResolver * resolver,
73 AvahiAddress * address, uint16_t * port);
75 #endif /* #ifndef __GA_SERVICE_RESOLVER_H__ */