avahi  0.7
publish.h
Go to the documentation of this file.
1 #ifndef fooclientpublishhfoo
2 #define fooclientpublishhfoo
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 
32 #include <avahi-client/client.h>
33 
40 AVAHI_C_DECL_BEGIN
41 
44 
46 typedef void (*AvahiEntryGroupCallback) (
47  AvahiEntryGroup *g,
48  AvahiEntryGroupState state ,
49  void* userdata /* The arbitrary user data pointer originally passed to avahi_entry_group_new()*/);
50 
55  AvahiClient* c,
56  AvahiEntryGroupCallback callback ,
57  void *userdata );
58 
61 
68 
71 
74 
77 
80 
87  AvahiEntryGroup *group,
88  AvahiIfIndex interface ,
89  AvahiProtocol protocol ,
90  AvahiPublishFlags flags ,
91  const char *name ,
92  const char *type ,
93  const char *domain ,
94  const char *host ,
95  uint16_t port ,
96  ...) AVAHI_GCC_SENTINEL;
97 
100  AvahiEntryGroup *group,
101  AvahiIfIndex interface,
102  AvahiProtocol protocol,
103  AvahiPublishFlags flags,
104  const char *name,
105  const char *type,
106  const char *domain,
107  const char *host,
108  uint16_t port,
109  AvahiStringList *txt );
110 
113  AvahiEntryGroup *group,
114  AvahiIfIndex interface ,
115  AvahiProtocol protocol ,
116  AvahiPublishFlags flags ,
117  const char *name ,
118  const char *type ,
119  const char *domain ,
120  const char *subtype );
121 
124  AvahiEntryGroup *g,
125  AvahiIfIndex interface ,
126  AvahiProtocol protocol ,
127  AvahiPublishFlags flags ,
128  const char *name ,
129  const char *type ,
130  const char *domain ,
131  ...) AVAHI_GCC_SENTINEL;
132 
135  AvahiEntryGroup *g,
136  AvahiIfIndex interface,
137  AvahiProtocol protocol,
138  AvahiPublishFlags flags,
139  const char *name,
140  const char *type,
141  const char *domain,
142  AvahiStringList *strlst);
143 
146 int avahi_entry_group_add_address(
147  AvahiEntryGroup *group,
148  AvahiIfIndex interface,
149  AvahiProtocol protocol,
150  AvahiPublishFlags flags,
151  const char *name ,
152  const AvahiAddress *a );
157  AvahiEntryGroup *group,
158  AvahiIfIndex interface,
159  AvahiProtocol protocol,
160  AvahiPublishFlags flags,
161  const char *name,
162  uint16_t clazz,
163  uint16_t type,
164  uint32_t ttl,
165  const void *rdata,
166  size_t size);
167 
170 AVAHI_C_DECL_END
171 
172 #endif
AvahiEntryGroup * avahi_entry_group_new(AvahiClient *c, AvahiEntryGroupCallback callback, void *userdata)
Create a new AvahiEntryGroup object.
int avahi_entry_group_commit(AvahiEntryGroup *)
Commit an AvahiEntryGroup.
struct AvahiClient AvahiClient
A connection context.
Definition: client.h:37
void(* AvahiEntryGroupCallback)(AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata)
The function prototype for the callback of an AvahiEntryGroup.
Definition: publish.h:46
int avahi_entry_group_add_record(AvahiEntryGroup *group, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, uint16_t clazz, uint16_t type, uint32_t ttl, const void *rdata, size_t size)
Add an arbitrary record.
int AvahiIfIndex
Numeric network interface index.
Definition: address.h:36
Protocol (address family) independent address structure.
Definition: address.h:70
Implementation of a data type to store lists of strings.
Simplistic main loop abstraction.
int avahi_entry_group_add_service_strlst(AvahiEntryGroup *group, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, const char *type, const char *domain, const char *host, uint16_t port, AvahiStringList *txt)
Add a service, takes an AvahiStringList for TXT records.
int avahi_entry_group_get_state(AvahiEntryGroup *)
Get an AvahiEntryGroup&#39;s state.
struct AvahiEntryGroup AvahiEntryGroup
An entry group object.
Definition: publish.h:43
int AvahiProtocol
Protocol family specification, takes the values AVAHI_PROTO_INET, AVAHI_PROTO_INET6, AVAHI_PROTO_UNSPEC.
Definition: address.h:33
Some common definitions.
int avahi_entry_group_update_service_txt(AvahiEntryGroup *g, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, const char *type, const char *domain,...) AVAHI_GCC_SENTINEL
Update a TXT record for an existing service.
int avahi_entry_group_add_service(AvahiEntryGroup *group, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, const char *type, const char *domain, const char *host, uint16_t port,...) AVAHI_GCC_SENTINEL
Add a service.
AvahiEntryGroupState
States of an entry group object.
Definition: defs.h:230
AvahiClient * avahi_entry_group_get_client(AvahiEntryGroup *)
Get an AvahiEntryGroup&#39;s owning client instance.
int avahi_entry_group_free(AvahiEntryGroup *)
Clean up and free an AvahiEntryGroup object.
Definitions and functions to manipulate IP addresses.
AvahiPublishFlags
Some flags for publishing functions.
Definition: defs.h:243
Linked list of strings that can contain any number of binary characters, including NUL bytes...
Definition: strlst.h:40
int avahi_entry_group_add_service_subtype(AvahiEntryGroup *group, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, const char *type, const char *domain, const char *subtype)
Add a subtype for a service.
int avahi_entry_group_is_empty(AvahiEntryGroup *)
Check if an AvahiEntryGroup is empty.
int avahi_entry_group_update_service_txt_strlst(AvahiEntryGroup *g, AvahiIfIndex interface, AvahiProtocol protocol, AvahiPublishFlags flags, const char *name, const char *type, const char *domain, AvahiStringList *strlst)
Update a TXT record for an existing service.
Definitions and functions for the client API over D-Bus.
int avahi_entry_group_reset(AvahiEntryGroup *)
Reset an AvahiEntryGroup.