]> git.meshlink.io Git - catta/blobdiff - avahi-core/internal.h
remove the NotFound event, as it is not used anymore
[catta] / avahi-core / internal.h
index 47a9c8465ad2a43e80c1a6e4b4acb7b9e4ce5c84..813eacd6d2edee6fd1e00d5cdd4404882772435f 100644 (file)
@@ -41,7 +41,7 @@ typedef struct AvahiEntry AvahiEntry;
 #include "multicast-lookup.h"
 #include "dns-srv-rr.h"
 
-#define AVAHI_MAX_LEGACY_UNICAST_REFLECT_SLOTS 100
+#define AVAHI_LEGACY_UNICAST_REFLECT_SLOTS_MAX 100
 
 #define AVAHI_FLAGS_VALID(flags, max) (!((flags) & ~(max)))
 
@@ -180,6 +180,9 @@ void avahi_server_decrease_host_rr_pending(AvahiServer *s);
 
 int avahi_server_set_errno(AvahiServer *s, int error);
 
+int avahi_server_is_service_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, const char *name);
+int avahi_server_is_record_local(AvahiServer *s, AvahiIfIndex interface, AvahiProtocol protocol, AvahiRecord *record);
+
 int avahi_server_add_ptr(
     AvahiServer *s,
     AvahiSEntryGroup *g,
@@ -191,6 +194,11 @@ int avahi_server_add_ptr(
     const char *dest);
 
 
+#define AVAHI_CHECK_VALIDITY(server, expression, error) { \
+        if (!(expression)) \
+            return avahi_server_set_errno((server), (error)); \
+}
+
 #define AVAHI_CHECK_VALIDITY_RETURN_NULL(server, expression, error) { \
         if (!(expression)) { \
             avahi_server_set_errno((server), (error)); \
@@ -205,4 +213,14 @@ int avahi_server_add_ptr(
     } \
 }
 
+#define AVAHI_ASSERT_TRUE(expression) { \
+    int __tmp = !!(expression); \
+    assert(__tmp); \
+}
+
+#define AVAHI_ASSERT_SUCCESS(expression) { \
+    int __tmp = (expression); \
+    assert(__tmp == 0); \
+}
+
 #endif