1 #ifndef foointernalhfoo
2 #define foointernalhfoo
7 This file is part of avahi.
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.
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.
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
25 #include <dbus/dbus.h>
32 const AvahiPoll *poll_api;
35 AvahiClientState state;
36 AvahiClientFlags flags;
38 /* Cache for some seldom changing server data */
39 char *version_string, *host_name, *host_name_fqdn, *domain_name;
40 uint32_t local_service_cookie;
41 int local_service_cookie_valid;
43 AvahiClientCallback callback;
46 AVAHI_LLIST_HEAD(AvahiEntryGroup, groups);
47 AVAHI_LLIST_HEAD(AvahiDomainBrowser, domain_browsers);
48 AVAHI_LLIST_HEAD(AvahiServiceBrowser, service_browsers);
49 AVAHI_LLIST_HEAD(AvahiServiceTypeBrowser, service_type_browsers);
50 AVAHI_LLIST_HEAD(AvahiServiceResolver, service_resolvers);
51 AVAHI_LLIST_HEAD(AvahiHostNameResolver, host_name_resolvers);
52 AVAHI_LLIST_HEAD(AvahiAddressResolver, address_resolvers);
53 AVAHI_LLIST_HEAD(AvahiRecordBrowser, record_browsers);
56 struct AvahiEntryGroup {
58 AvahiEntryGroupState state;
60 AvahiEntryGroupCallback callback;
62 AVAHI_LLIST_FIELDS(AvahiEntryGroup, groups);
65 struct AvahiDomainBrowser {
70 AvahiDomainBrowserCallback callback;
72 AVAHI_LLIST_FIELDS(AvahiDomainBrowser, domain_browsers);
74 AvahiIfIndex interface;
75 AvahiProtocol protocol;
77 AvahiTimeout *defer_timeout;
79 AvahiStringList *static_browse_domains;
82 struct AvahiServiceBrowser {
85 AvahiServiceBrowserCallback callback;
87 AVAHI_LLIST_FIELDS(AvahiServiceBrowser, service_browsers);
90 AvahiIfIndex interface;
91 AvahiProtocol protocol;
94 struct AvahiServiceTypeBrowser {
97 AvahiServiceTypeBrowserCallback callback;
99 AVAHI_LLIST_FIELDS(AvahiServiceTypeBrowser, service_type_browsers);
102 AvahiIfIndex interface;
103 AvahiProtocol protocol;
106 struct AvahiServiceResolver {
109 AvahiServiceResolverCallback callback;
111 AVAHI_LLIST_FIELDS(AvahiServiceResolver, service_resolvers);
113 char *name, *type, *domain;
114 AvahiIfIndex interface;
115 AvahiProtocol protocol;
118 struct AvahiHostNameResolver {
121 AvahiHostNameResolverCallback callback;
123 AVAHI_LLIST_FIELDS(AvahiHostNameResolver, host_name_resolvers);
126 AvahiIfIndex interface;
127 AvahiProtocol protocol;
130 struct AvahiAddressResolver {
133 AvahiAddressResolverCallback callback;
135 AVAHI_LLIST_FIELDS(AvahiAddressResolver, address_resolvers);
137 AvahiAddress address;
138 AvahiIfIndex interface;
139 AvahiProtocol protocol;
142 struct AvahiRecordBrowser {
145 AvahiRecordBrowserCallback callback;
147 AVAHI_LLIST_FIELDS(AvahiRecordBrowser, record_browsers);
150 uint16_t clazz, type;
151 AvahiIfIndex interface;
152 AvahiProtocol protocol;
155 int avahi_client_set_errno (AvahiClient *client, int error);
156 int avahi_client_set_dbus_error(AvahiClient *client, DBusError *error);
158 void avahi_entry_group_set_state(AvahiEntryGroup *group, AvahiEntryGroupState state);
160 DBusHandlerResult avahi_domain_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
161 DBusHandlerResult avahi_service_type_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
162 DBusHandlerResult avahi_service_browser_event (AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
163 DBusHandlerResult avahi_record_browser_event(AvahiClient *client, AvahiBrowserEvent event, DBusMessage *message);
165 DBusHandlerResult avahi_service_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
166 DBusHandlerResult avahi_host_name_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
167 DBusHandlerResult avahi_address_resolver_event (AvahiClient *client, AvahiResolverEvent event, DBusMessage *message);
169 int avahi_client_simple_method_call(AvahiClient *client, const char *path, const char *interface, const char *method);
171 int avahi_client_is_connected(AvahiClient *client);