avahi 0.6.30

avahi-client/client.h

Go to the documentation of this file.
00001 #ifndef fooclienthfoo
00002 #define fooclienthfoo
00003 
00004 /***
00005   This file is part of avahi.
00006 
00007   avahi is free software; you can redistribute it and/or modify it
00008   under the terms of the GNU Lesser General Public License as
00009   published by the Free Software Foundation; either version 2.1 of the
00010   License, or (at your option) any later version.
00011 
00012   avahi is distributed in the hope that it will be useful, but WITHOUT
00013   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00014   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
00015   Public License for more details.
00016 
00017   You should have received a copy of the GNU Lesser General Public
00018   License along with avahi; if not, write to the Free Software
00019   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020   USA.
00021 ***/
00022 
00023 #include <inttypes.h>
00024 
00025 #include <avahi-common/cdecl.h>
00026 #include <avahi-common/address.h>
00027 #include <avahi-common/strlst.h>
00028 #include <avahi-common/defs.h>
00029 #include <avahi-common/watch.h>
00030 #include <avahi-common/gccmacro.h>
00031 
00034 AVAHI_C_DECL_BEGIN
00035 
00037 typedef struct AvahiClient AvahiClient;
00038 
00040 typedef enum {
00041     AVAHI_CLIENT_S_REGISTERING = AVAHI_SERVER_REGISTERING,  
00042     AVAHI_CLIENT_S_RUNNING = AVAHI_SERVER_RUNNING,          
00043     AVAHI_CLIENT_S_COLLISION = AVAHI_SERVER_COLLISION,      
00044     AVAHI_CLIENT_FAILURE = 100,                             
00045     AVAHI_CLIENT_CONNECTING = 101                           
00046 } AvahiClientState;
00047 
00048 typedef enum {
00049     AVAHI_CLIENT_IGNORE_USER_CONFIG = 1, 
00050     AVAHI_CLIENT_NO_FAIL = 2        
00051 } AvahiClientFlags;
00052 
00054 typedef void (*AvahiClientCallback) (
00055     AvahiClient *s,
00056     AvahiClientState state ,
00057     void* userdata );
00058 
00062 AvahiClient* avahi_client_new (
00063     const AvahiPoll *poll_api ,
00064     AvahiClientFlags flags ,
00065     AvahiClientCallback callback ,
00066     void *userdata ,
00067     int *error );
00068 
00072 void avahi_client_free(AvahiClient *client);
00073 
00079 const char* avahi_client_get_version_string (AvahiClient*);
00080 
00082 const char* avahi_client_get_host_name (AvahiClient*);
00083 
00085 int avahi_client_set_host_name(AvahiClient*, const char *name);
00086 
00088 const char* avahi_client_get_domain_name (AvahiClient*);
00089 
00091 const char* avahi_client_get_host_name_fqdn (AvahiClient*);
00092 
00094 AvahiClientState avahi_client_get_state(AvahiClient *client);
00095 
00099 int avahi_client_errno (AvahiClient*);
00100 
00105 uint32_t avahi_client_get_local_service_cookie(AvahiClient *client);
00111 int avahi_nss_support(void);
00112 
00115 AVAHI_C_DECL_END
00116 
00117 #endif