]> git.meshlink.io Git - catta/blobdiff - avahi-core/publish.h
forgot to pull the publish_no_reverse change to the example.
[catta] / avahi-core / publish.h
index a10a5a89098f586c552d7fed0745c87e557f6f9b..90797de57d199d0f0f3a010f20167395848bbb49 100644 (file)
@@ -1,21 +1,19 @@
 #ifndef foopublishhfoo
 #define foopublishhfoo
 
-/* $Id$ */
-
 /***
   This file is part of avahi.
+
   avahi is free software; you can redistribute it and/or modify it
   under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
   License, or (at your option) any later version.
+
   avahi is distributed in the hope that it will be useful, but WITHOUT
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
   or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
   Public License for more details.
+
   You should have received a copy of the GNU Lesser General Public
   License along with avahi; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  * service using an embedded mDNS stack. It behaves like a network
  * printer registering both an IPP and a BSD LPR service. */
 
-#include <avahi-common/cdecl.h>
-
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-AVAHI_C_DECL_BEGIN
-#endif
-
 /** A group of locally registered DNS RRs */
 typedef struct AvahiSEntryGroup AvahiSEntryGroup;
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-AVAHI_C_DECL_END
-#endif
-
-#include "core.h"
+#include <avahi-common/cdecl.h>
+#include <avahi-core/core.h>
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_BEGIN
-#endif
 
 /** Prototype for callback functions which are called whenever the state of an AvahiSEntryGroup object changes */
 typedef void (*AvahiSEntryGroupCallback) (AvahiServer *s, AvahiSEntryGroup *g, AvahiEntryGroupState state, void* userdata);
@@ -94,7 +81,7 @@ int avahi_server_add(
     AvahiProtocol protocol,   /**< A protocol family to attach this record to. One of the AVAHI_PROTO_xxx constants. Use AVAHI_PROTO_UNSPEC to make this record available on all protocols (wich means on both IPv4 and IPv6). */
     AvahiPublishFlags flags,    /**< Special flags for this record */
     AvahiRecord *r            /**< The record to add. This function increases the reference counter of this object. */);
-    
+
 /** Add an IP address mapping to the server. This will add both the
  * host-name-to-address and the reverse mapping to the server. See
  * avahi_server_add() for more information. If adding one of the RRs
@@ -125,25 +112,11 @@ int avahi_server_add_service(
     AvahiPublishFlags flags,
     const char *name,         /**< Service name, e.g. "Lennart's Files" */
     const char *type,         /**< DNS-SD type, e.g. "_http._tcp" */
-    const char *domain,       
+    const char *domain,
     const char *host,         /**< Host name where this servcie resides, or NULL if on the local host */
     uint16_t port,              /**< Port number of the service */
     ...  /**< Text records, terminated by NULL */) AVAHI_GCC_SENTINEL;
 
-/** Mostly identical to avahi_server_add_service(), but takes an va_list for the TXT records. */
-int avahi_server_add_service_va(
-    AvahiServer *s,
-    AvahiSEntryGroup *g,
-    AvahiIfIndex interface,
-    AvahiProtocol protocol,
-    AvahiPublishFlags flags,
-    const char *name,
-    const char *type,
-    const char *domain,
-    const char *host,
-    uint16_t port,
-    va_list va);
-
 /** Mostly identical to avahi_server_add_service(), but takes an AvahiStringList object for the TXT records.  The AvahiStringList object is copied. */
 int avahi_server_add_service_strlst(
     AvahiServer *s,
@@ -177,23 +150,11 @@ int avahi_server_update_service_txt_strlst(
     AvahiIfIndex interface,
     AvahiProtocol protocol,
     AvahiPublishFlags flags,
-    const char *name,     
-    const char *type,     
-    const char *domain,   
+    const char *name,
+    const char *type,
+    const char *domain,
     AvahiStringList *strlst);
 
-/** Update the TXT record for a service with the NULL terminated list of strings of the va_list. */
-int avahi_server_update_service_txt_va(
-    AvahiServer *s,
-    AvahiSEntryGroup *g,
-    AvahiIfIndex interface,
-    AvahiProtocol protocol,
-    AvahiPublishFlags flags,
-    const char *name,     
-    const char *type,     
-    const char *domain,   
-    va_list va);
-
 /** Update the TXT record for a service with the NULL termonate list of strings */
 int avahi_server_update_service_txt(
     AvahiServer *s,
@@ -201,49 +162,14 @@ int avahi_server_update_service_txt(
     AvahiIfIndex interface,
     AvahiProtocol protocol,
     AvahiPublishFlags flags,
-    const char *name,     
-    const char *type,     
-    const char *domain,   
-    ...) AVAHI_GCC_SENTINEL;
-
-/** The type of DNS server */
-typedef enum {
-    AVAHI_DNS_SERVER_RESOLVE,         /**< Unicast DNS servers for normal resolves (_domain._udp)*/
-    AVAHI_DNS_SERVER_UPDATE,           /**< Unicast DNS servers for updates (_dns-update._udp)*/
-    AVAHI_DNS_SERVER_MAX
-} AvahiDNSServerType;
-
-/** Publish the specified unicast DNS server address via mDNS. You may
- * browse for records create this way wit
- * avahi_s_dns_server_browser_new(). */
-int avahi_server_add_dns_server_address(
-    AvahiServer *s,
-    AvahiSEntryGroup *g,
-    AvahiIfIndex interface,
-    AvahiProtocol protocol,
-    AvahiPublishFlags flags,
-    const char *domain,
-    AvahiDNSServerType type,
-    const AvahiAddress *address,
-    uint16_t port /** should be 53 */);
-
-/** Similar to avahi_server_add_dns_server_address(), but specify a
-host name instead of an address. The specified host name should be
-resolvable via mDNS */
-int avahi_server_add_dns_server_name(
-    AvahiServer *s,
-    AvahiSEntryGroup *g,
-    AvahiIfIndex interface,
-    AvahiProtocol protocol,
-    AvahiPublishFlags flags,
-    const char *domain,
-    AvahiDNSServerType type,
     const char *name,
-    uint16_t port /** should be 53 */);
+    const char *type,
+    const char *domain,
+    ...) AVAHI_GCC_SENTINEL;
 
+/** Check if there is a service locally defined and return the entry group it is attached to. Returns NULL if the service isn't local*/
+int avahi_server_get_group_of_service(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name, const char *type, const char *domain, AvahiSEntryGroup** ret_group);
 
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
 AVAHI_C_DECL_END
-#endif
 
 #endif