X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fdomain.h;h=26f4b73832a1602569d49cae1a4624506034d100;hb=d322a943be5387a539f8f3ea3a19a7e2ed5a55a2;hp=bcd036e4a9e143b9d9999d4b317872c09839e973;hpb=d1dd07145bb3db5c6fd77c55aea762eb79ab3b5c;p=catta diff --git a/avahi-common/domain.h b/avahi-common/domain.h index bcd036e..26f4b73 100644 --- a/avahi-common/domain.h +++ b/avahi-common/domain.h @@ -75,8 +75,21 @@ char *avahi_unescape_label(const char **name, char *dest, size_t size); /** Escape the domain name in *src and write it to *ret_name */ char *avahi_escape_label(const char* src, size_t src_length, char **ret_name, size_t *ret_size); -/** Return 1 when the specified string contains a valid service type, 0 otherwise */ -int avahi_is_valid_service_type(const char *t); +/** Return 1 when the specified string contains a valid generic + * service type (i.e. a series of words starting with "_"), 0 + * otherwise */ +int avahi_is_valid_service_type_generic(const char *t); + +/** Return 1 when the specified string contains a valid strict service + * type (i.e. consisting of only two words, the latter being either + * _udp or _tcp), 0 otherwise */ +int avahi_is_valid_service_type_strict(const char *t); + +/** Return 1 when the specified string contains a valid service subtype, 0 otherwise */ +int avahi_is_valid_service_subtype(const char *t); + +/** Return a pointer to the type section of a subtype i.e. _foo._sub._bar._tcp => _bar._tcp */ +const char *avahi_get_type_from_subtype(const char *t); /** Return 1 when the specified string contains a valid domain name, 0 otherwise */ int avahi_is_valid_domain_name(const char *t);