avahi 0.6.30

avahi-client/publish.h

Go to the documentation of this file.
00001 #ifndef fooclientpublishhfoo
00002 #define fooclientpublishhfoo
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 
00032 #include <avahi-client/client.h>
00033 
00040 AVAHI_C_DECL_BEGIN
00041 
00043 typedef struct AvahiEntryGroup AvahiEntryGroup;
00044 
00046 typedef void (*AvahiEntryGroupCallback) (
00047     AvahiEntryGroup *g,
00048     AvahiEntryGroupState state ,
00049     void* userdata /* The arbitrary user data pointer originally passed to avahi_entry_group_new()*/);
00050 
00054 AvahiEntryGroup* avahi_entry_group_new(
00055     AvahiClient* c,
00056     AvahiEntryGroupCallback callback ,
00057     void *userdata );
00058 
00060 int avahi_entry_group_free (AvahiEntryGroup *);
00061 
00067 int avahi_entry_group_commit (AvahiEntryGroup*);
00068 
00070 int avahi_entry_group_reset (AvahiEntryGroup*);
00071 
00073 int avahi_entry_group_get_state (AvahiEntryGroup*);
00074 
00076 int avahi_entry_group_is_empty (AvahiEntryGroup*);
00077 
00079 AvahiClient* avahi_entry_group_get_client (AvahiEntryGroup*);
00080 
00086 int avahi_entry_group_add_service(
00087     AvahiEntryGroup *group,
00088     AvahiIfIndex interface ,
00089     AvahiProtocol protocol ,
00090     AvahiPublishFlags flags ,
00091     const char *name        ,
00092     const char *type        ,
00093     const char *domain      ,
00094     const char *host        ,
00095     uint16_t port           ,
00096     ...) AVAHI_GCC_SENTINEL;
00097 
00099 int avahi_entry_group_add_service_strlst(
00100     AvahiEntryGroup *group,
00101     AvahiIfIndex interface,
00102     AvahiProtocol protocol,
00103     AvahiPublishFlags flags,
00104     const char *name,
00105     const char *type,
00106     const char *domain,
00107     const char *host,
00108     uint16_t port,
00109     AvahiStringList *txt );
00110 
00112 int avahi_entry_group_add_service_subtype(
00113     AvahiEntryGroup *group,
00114     AvahiIfIndex interface ,
00115     AvahiProtocol protocol ,
00116     AvahiPublishFlags flags  ,
00117     const char *name         ,
00118     const char *type         ,
00119     const char *domain       ,
00120     const char *subtype );
00121 
00123 int avahi_entry_group_update_service_txt(
00124     AvahiEntryGroup *g,
00125     AvahiIfIndex interface   ,
00126     AvahiProtocol protocol   ,
00127     AvahiPublishFlags flags  ,
00128     const char *name         ,
00129     const char *type         ,
00130     const char *domain       ,
00131     ...) AVAHI_GCC_SENTINEL;
00132 
00134 int avahi_entry_group_update_service_txt_strlst(
00135     AvahiEntryGroup *g,
00136     AvahiIfIndex interface,
00137     AvahiProtocol protocol,
00138     AvahiPublishFlags flags,
00139     const char *name,
00140     const char *type,
00141     const char *domain,
00142     AvahiStringList *strlst);
00143 
00146 int avahi_entry_group_add_address(
00147     AvahiEntryGroup *group,
00148     AvahiIfIndex interface,
00149     AvahiProtocol protocol,
00150     AvahiPublishFlags flags,
00151     const char *name ,
00152     const AvahiAddress *a );
00156 int avahi_entry_group_add_record(
00157     AvahiEntryGroup *group,
00158     AvahiIfIndex interface,
00159     AvahiProtocol protocol,
00160     AvahiPublishFlags flags,
00161     const char *name,
00162     uint16_t clazz,
00163     uint16_t type,
00164     uint32_t ttl,
00165     const void *rdata,
00166     size_t size);
00167 
00170 AVAHI_C_DECL_END
00171 
00172 #endif