]> git.meshlink.io Git - catta/blob - avahi-client/internal.h
* Disable debug output of avahi-client
[catta] / avahi-client / internal.h
1 #ifndef foointernalhfoo
2 #define foointernalhfoo
3
4 /* $Id$ */
5
6 /***
7   This file is part of avahi.
8  
9   avahi is free software; you can redistribute it and/or modify it
10   under the terms of the GNU Lesser General Public License as
11   published by the Free Software Foundation; either version 2.1 of the
12   License, or (at your option) any later version.
13  
14   avahi is distributed in the hope that it will be useful, but WITHOUT
15   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17   Public License for more details.
18  
19   You should have received a copy of the GNU Lesser General Public
20   License along with avahi; if not, write to the Free Software
21   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22   USA.
23 ***/
24
25 #include <dbus/dbus.h>
26 #include "client.h"
27
28 struct AvahiClient {
29     const AvahiPoll *poll_api;
30     DBusConnection *bus;
31     int error;
32     AvahiClientState state;
33
34     /* Cache for some seldom changing server data */
35     char *version_string, *host_name, *host_name_fqdn, *domain_name;
36     
37     AvahiClientCallback callback;
38     void *userdata;
39     
40     AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
41     AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers);
42     AVAHI_LLIST_HEAD(AvahiServiceBrowser, service_browsers);
43     AVAHI_LLIST_HEAD(AvahiServiceTypeBrowser, service_type_browsers);
44     AVAHI_LLIST_HEAD(AvahiServiceResolver, service_resolvers);
45 };
46
47 struct AvahiEntryGroup {
48     char *path;
49     AvahiEntryGroupState state;
50     AvahiClient *client;
51     AvahiEntryGroupCallback callback;
52     void *userdata;
53     AVAHI_LLIST_FIELDS(AvahiEntryGroup, groups);
54 };
55
56 struct AvahiDomainBrowser {
57     char *path;
58     AvahiClient *client;
59     AvahiDomainBrowserCallback callback;
60     void *userdata;
61     AVAHI_LLIST_FIELDS(AvahiDomainBrowser, domain_browsers);
62 };
63
64 struct AvahiServiceBrowser {
65     char *path;
66     AvahiClient *client;
67     AvahiServiceBrowserCallback callback;
68     void *userdata;
69     AVAHI_LLIST_FIELDS(AvahiServiceBrowser, service_browsers);
70 };
71
72 struct AvahiServiceTypeBrowser {
73     char *path;
74     AvahiClient *client;
75     AvahiServiceTypeBrowserCallback callback;
76     void *userdata;
77     AVAHI_LLIST_FIELDS(AvahiServiceTypeBrowser, service_type_browsers);
78 };
79
80 struct AvahiServiceResolver {
81     DBusPendingCall *call;
82     AvahiClient *client;
83     AvahiServiceResolverCallback callback;
84     void *userdata;
85     AVAHI_LLIST_FIELDS(AvahiServiceResolver, service_resolvers);
86 };
87
88 int avahi_client_set_errno (AvahiClient *client, int error);
89 int avahi_client_set_dbus_error(AvahiClient *client, DBusError *error);
90
91 void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState state);
92
93 DBusHandlerResult avahi_domain_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
94
95 DBusHandlerResult avahi_service_type_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
96
97 DBusHandlerResult avahi_service_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
98
99 #endif