1 #ifndef foointernalhfoo
2 #define foointernalhfoo
5 This file is part of avahi.
7 avahi is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Lesser General Public License as
9 published by the Free Software Foundation; either version 2.1 of the
10 License, or (at your option) any later version.
12 avahi is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15 Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with avahi; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
23 #include <dbus/dbus.h>
30 const AvahiPoll *poll_api;
33 AvahiClientState state;
34 AvahiClientFlags flags;
36 /* Cache for some seldom changing server data */
37 char *version_string, *host_name, *host_name_fqdn, *domain_name;
38 uint32_t local_service_cookie;
39 int local_service_cookie_valid;
41 AvahiClientCallback callback;
44 AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
45 AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers);
46 AVAHI_LLIST_HEAD(AvahiServiceBrowser, service_browsers);
47 AVAHI_LLIST_HEAD(AvahiServiceTypeBrowser, service_type_browsers);
48 AVAHI_LLIST_HEAD(AvahiServiceResolver, service_resolvers);
49 AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers);
50 AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers);
51 AVAHI_LLIST_HEAD(AvahiRecordBrowser, record_browsers);
54 struct AvahiEntryGroup {
56 AvahiEntryGroupState state;
59 AvahiEntryGroupCallback callback;
61 AVAHI_LLIST_FIELDS(AvahiEntryGroup, groups);
64 struct AvahiDomainBrowser {
69 AvahiDomainBrowserCallback callback;
71 AVAHI_LLIST_FIELDS(AvahiDomainBrowser, domain_browsers);
73 AvahiIfIndex interface;
74 AvahiProtocol protocol;
76 AvahiTimeout *defer_timeout;
78 AvahiStringList *static_browse_domains;
81 struct AvahiServiceBrowser {
84 AvahiServiceBrowserCallback callback;
86 AVAHI_LLIST_FIELDS(AvahiServiceBrowser, service_browsers);
89 AvahiIfIndex interface;
90 AvahiProtocol protocol;
93 struct AvahiServiceTypeBrowser {
96 AvahiServiceTypeBrowserCallback callback;
98 AVAHI_LLIST_FIELDS(AvahiServiceTypeBrowser, service_type_browsers);
101 AvahiIfIndex interface;
102 AvahiProtocol protocol;
105 struct AvahiServiceResolver {
108 AvahiServiceResolverCallback callback;
110 AVAHI_LLIST_FIELDS(AvahiServiceResolver, service_resolvers);
112 char *name, *type, *domain;
113 AvahiIfIndex interface;
114 AvahiProtocol protocol;
117 struct AvahiHostNameResolver {
120 AvahiHostNameResolverCallback callback;
122 AVAHI_LLIST_FIELDS(AvahiHostNameResolver, host_name_resolvers);
125 AvahiIfIndex interface;
126 AvahiProtocol protocol;
129 struct AvahiAddressResolver {
132 AvahiAddressResolverCallback callback;
134 AVAHI_LLIST_FIELDS(AvahiAddressResolver, address_resolvers);
136 AvahiAddress address;
137 AvahiIfIndex interface;
138 AvahiProtocol protocol;
141 struct AvahiRecordBrowser {
144 AvahiRecordBrowserCallback callback;
146 AVAHI_LLIST_FIELDS(AvahiRecordBrowser, record_browsers);
149 uint16_t clazz, type;
150 AvahiIfIndex interface;
151 AvahiProtocol protocol;
154 int avahi_client_set_errno (AvahiClient *client, int error);
155 int avahi_client_set_dbus_error(AvahiClient *client, DBusError *error);
157 void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState state);
159 DBusHandlerResult avahi_domain_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
160 DBusHandlerResult avahi_service_type_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
161 DBusHandlerResult avahi_service_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
162 DBusHandlerResult avahi_record_browser_event(AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
164 DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
165 DBusHandlerResult avahi_host_name_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
166 DBusHandlerResult avahi_address_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
168 int avahi_client_simple_method_call(AvahiClient *client, const char *path, const char *interface, const char *method);
170 int avahi_client_is_connected(AvahiClient *client);