avahi  0.7
client.h
Go to the documentation of this file.
1 #ifndef fooclienthfoo
2 #define fooclienthfoo
3 
4 /***
5  This file is part of avahi.
6 
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.
11 
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.
16 
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
20  USA.
21 ***/
22 
23 #include <inttypes.h>
24 
25 #include <avahi-common/cdecl.h>
26 #include <avahi-common/address.h>
27 #include <avahi-common/strlst.h>
28 #include <avahi-common/defs.h>
29 #include <avahi-common/watch.h>
30 #include <avahi-common/gccmacro.h>
31 
34 AVAHI_C_DECL_BEGIN
35 
37 typedef struct AvahiClient AvahiClient;
38 
40 typedef enum {
47 
48 typedef enum {
52 
54 typedef void (*AvahiClientCallback) (
55  AvahiClient *s,
56  AvahiClientState state ,
57  void* userdata );
58 
63  const AvahiPoll *poll_api ,
64  AvahiClientFlags flags ,
65  AvahiClientCallback callback ,
66  void *userdata ,
67  int *error );
68 
72 void avahi_client_free(AvahiClient *client);
73 
80 
83 
85 int avahi_client_set_host_name(AvahiClient*, const char *name);
86 
89 
92 
95 
100 
105 uint32_t avahi_client_get_local_service_cookie(AvahiClient *client);
111 int avahi_nss_support(void);
112 
115 AVAHI_C_DECL_END
116 
117 #endif
Host RRs are being registered.
Definition: defs.h:223
struct AvahiClient AvahiClient
A connection context.
Definition: client.h:37
Don&#39;t read user configuration.
Definition: client.h:49
const char * avahi_client_get_host_name(AvahiClient *)
Get host name.
We&#39;re still connecting.
Definition: client.h:45
void(* AvahiClientCallback)(AvahiClient *s, AvahiClientState state, void *userdata)
The function prototype for the callback of an AvahiClient.
Definition: client.h:54
const char * avahi_client_get_domain_name(AvahiClient *)
Get domain name.
int avahi_nss_support(void)
Return 1 if gethostbyname() supports mDNS lookups, 0 otherwise.
Implementation of a data type to store lists of strings.
Simplistic main loop abstraction.
Server state: RUNNING.
Definition: client.h:42
Some common definitions.
AvahiClientState avahi_client_get_state(AvahiClient *client)
Get state.
AvahiClientState
States of a client object, a superset of AvahiServerState.
Definition: client.h:40
int avahi_client_set_host_name(AvahiClient *, const char *name)
Set host name.
Definitions and functions to manipulate IP addresses.
void avahi_client_free(AvahiClient *client)
Free a client instance.
AvahiClient * avahi_client_new(const AvahiPoll *poll_api, AvahiClientFlags flags, AvahiClientCallback callback, void *userdata, int *error)
Creates a new client instance.
Defines an abstracted event polling API.
Definition: watch.h:60
AvahiClientFlags
Definition: client.h:48
Some kind of error happened on the client side.
Definition: client.h:44
int avahi_client_errno(AvahiClient *)
Get the last error number.
There is a collision with a host RR.
Definition: defs.h:225
Server state: REGISTERING.
Definition: client.h:41
Don&#39;t fail if the daemon is not available when avahi_client_new() is called, instead enter AVAHI_CLIE...
Definition: client.h:50
Server state: COLLISION.
Definition: client.h:43
const char * avahi_client_get_version_string(AvahiClient *)
Get the version of the server.
const char * avahi_client_get_host_name_fqdn(AvahiClient *)
Get FQDN domain name.
All host RRs have been established.
Definition: defs.h:224