1#ifndef foorrutilhfoo
2#define foorrutilhfoo
3
4/* $Id$ */
5
6/***
7  This file is part of avahi.
8
9  avahi is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Lesser General Public License as
11  published by the Free Software Foundation; either version 2.1 of the
12  License, or (at your option) any later version.
13
14  avahi is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
17  Public License for more details.
18
19  You should have received a copy of the GNU Lesser General Public
20  License along with avahi; if not, write to the Free Software
21  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22  USA.
23***/
24
25#include "rr.h"
26
27AVAHI_C_DECL_BEGIN
28
29/** Creaze new AvahiKey object based on an existing key but replaceing the type by CNAME */
30AvahiKey *avahi_key_new_cname(AvahiKey *key);
31
32/** Match a key to a key pattern. The pattern has a type of
33AVAHI_DNS_CLASS_ANY, the classes are taken to be equal. Same for the
34type. If the pattern has neither class nor type with ANY constants,
35this function is identical to avahi_key_equal(). In contrast to
36avahi_equal() this function is not commutative. */
37int avahi_key_pattern_match(const AvahiKey *pattern, const AvahiKey *k);
38
39/** Check whether a key is a pattern key, i.e. the class/type has a
40 * value of AVAHI_DNS_CLASS_ANY/AVAHI_DNS_TYPE_ANY */
41int avahi_key_is_pattern(const AvahiKey *k);
42
43/** Returns a maximum estimate for the space that is needed to store
44 * this key in a DNS packet. */
45size_t avahi_key_get_estimate_size(AvahiKey *k);
46
47/** Returns a maximum estimate for the space that is needed to store
48 * the record in a DNS packet. */
49size_t avahi_record_get_estimate_size(AvahiRecord *r);
50
51/** Do a mDNS spec conforming lexicographical comparison of the two
52 * records. Return a negative value if a < b, a positive if a > b,
53 * zero if equal. */
54int avahi_record_lexicographical_compare(AvahiRecord *a, AvahiRecord *b);
55
56/** Return 1 if the specified record is an mDNS goodbye record. i.e. TTL is zero. */
57int avahi_record_is_goodbye(AvahiRecord *r);
58
59/** Make a deep copy of an AvahiRecord object */
60AvahiRecord *avahi_record_copy(AvahiRecord *r);
61
62AVAHI_C_DECL_END
63
64#endif
65