]> git.meshlink.io Git - catta/blobdiff - avahi-client/publish.h
* Modify the local conflict detection to allow multiple identical
[catta] / avahi-client / publish.h
index 9deccf17a06188d92da2dfaffdb4971716b842ce..1e40b18eff439026c76eb3a2a36947c1954dbd0f 100644 (file)
@@ -41,7 +41,7 @@
 
 AVAHI_C_DECL_BEGIN
 
-/** \struct AvahiEntryGroup An entry group object */
+/** An entry group object */
 typedef struct AvahiEntryGroup AvahiEntryGroup;
 
 /** The function prototype for the callback of an AvahiEntryGroup */
@@ -50,15 +50,21 @@ typedef void (*AvahiEntryGroupCallback) (
     AvahiEntryGroupState state /**< The new state of the entry group */,
     void* userdata /* The arbitrary user data pointer originally passed to avahi_entry_group_new()*/);
 
+/** @{ \name Construction and destruction */
+
 /** Create a new AvahiEntryGroup object */
 AvahiEntryGroup* avahi_entry_group_new(
     AvahiClient* c,
-    AvahiEntryGroupCallback callback /**< This callback is called whenever the state of this entry group changes. May not be NULL. */,
+    AvahiEntryGroupCallback callback /**< This callback is called whenever the state of this entry group changes. May not be NULL. Please note that this function is called for the first time from within the avahi_entry_group_new() context! Thus, in the callback you should not make use of global variables that are initialized only after your call to avahi_entry_group_new(). A common mistake is to store the AvahiEntryGroup pointer returned by avahi_entry_group_new() in a global variable and assume that this global variable already contains the valid pointer when the callback is called for the first time. A work-around for this is to always use the AvahiEntryGroup pointer passed to the callback function instead of the global pointer. */,
     void *userdata /**< This arbitrary user data pointer will be passed to the callback functon */);
 
 /** Clean up and free an AvahiEntryGroup object */
 int avahi_entry_group_free (AvahiEntryGroup *);
 
+/** @} */
+
+/** @{ \name State */
+
 /** Commit an AvahiEntryGroup. The entries in the entry group are now registered on the network. Commiting empty entry groups is considered an error. */
 int avahi_entry_group_commit (AvahiEntryGroup*);
 
@@ -74,6 +80,10 @@ int avahi_entry_group_is_empty (AvahiEntryGroup*);
 /** Get an AvahiEntryGroup's owning client instance */
 AvahiClient* avahi_entry_group_get_client (AvahiEntryGroup*);
 
+/** @} */
+
+/** @{ \name Adding and updating entries */
+
 /** Add a service. Takes a variable NULL terminated list of TXT record strings as last arguments. Please note that this service is not announced on the network before avahi_entry_group_commit() is called. */
 int avahi_entry_group_add_service(
     AvahiEntryGroup *group,
@@ -133,6 +143,7 @@ int avahi_entry_group_update_service_txt_strlst(
     const char *domain,   
     AvahiStringList *strlst);
 
+/** \cond fulldocs */
 /** Add a host/address pair */
 int avahi_entry_group_add_address(
     AvahiEntryGroup *group,
@@ -141,6 +152,7 @@ int avahi_entry_group_add_address(
     AvahiPublishFlags flags,
     const char *name /**< The FDQN of the new hostname to register */,
     const AvahiAddress *a /**< The address this host name shall map to */);
+/** \endcond */
 
 /** Add an arbitrary record. I hope you know what you do. */
 int avahi_entry_group_add_record(
@@ -155,6 +167,8 @@ int avahi_entry_group_add_record(
     const void *rdata,
     size_t size);
 
+/** @} */
+
 AVAHI_C_DECL_END
 
 #endif