X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Futil.h;h=0d4fb4b95df3708e87fd4ae56f0d33ac92de4cfa;hb=9ad2a95c80ab0f9cf48d3f58e9a7ed6f06685c34;hp=68d367cebbb5b04b9cb5775066ec2786f09964cb;hpb=c5544522f6409095627dc3d1129560195ab4ec40;p=catta diff --git a/avahi-common/util.h b/avahi-common/util.h index 68d367c..0d4fb4b 100644 --- a/avahi-common/util.h +++ b/avahi-common/util.h @@ -24,20 +24,26 @@ #include +#include + +AVAHI_C_DECL_BEGIN + +typedef gint64 AvahiUsec; + gchar *avahi_normalize_name(const gchar *s); /* g_free() the result! */ gchar *avahi_get_host_name(void); /* g_free() the result! */ gint avahi_timeval_compare(const GTimeVal *a, const GTimeVal *b); -glong avahi_timeval_diff(const GTimeVal *a, const GTimeVal *b); +AvahiUsec avahi_timeval_diff(const GTimeVal *a, const GTimeVal *b); +GTimeVal* avahi_timeval_add(GTimeVal *a, AvahiUsec usec); + +AvahiUsec avahi_age(const GTimeVal *a); +GTimeVal *avahi_elapse_time(GTimeVal *tv, guint msec, guint jitter); gint avahi_set_cloexec(gint fd); gint avahi_set_nonblock(gint fd); gint avahi_wait_for_write(gint fd); -GTimeVal *avahi_elapse_time(GTimeVal *tv, guint msec, guint jitter); - -glong avahi_age(const GTimeVal *a); - gboolean avahi_domain_equal(const gchar *a, const gchar *b); gint avahi_binary_domain_cmp(const gchar *a, const gchar *b); @@ -54,4 +60,11 @@ guint avahi_domain_hash(const gchar *s); gchar *avahi_format_mac_address(const guint8* mac, guint size); +gboolean avahi_valid_service_type(const gchar *t); +gboolean avahi_valid_domain_name(const gchar *t); +gboolean avahi_valid_service_name(const gchar *t); +gboolean avahi_valid_host_name(const gchar *t); + +AVAHI_C_DECL_END + #endif