Fawkes API Fawkes Development Version
avahi_resolver_handler.cpp
1
2/***************************************************************************
3 * avahi_resolver_handler.cpp - Avahi name resolver
4 *
5 * Created: Tue Feb 19 09:40:51 2008
6 * Copyright 2006-2008 Tim Niemueller [www.niemueller.de]
7 *
8 ****************************************************************************/
9
10/* This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version. A runtime exception applies to
14 * this software (see LICENSE.GPL_WRE file mentioned below for details).
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Library General Public License for more details.
20 *
21 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22 */
23
24#include <netcomm/dns-sd/avahi_resolver_handler.h>
25
26namespace fawkes {
27
28/** @class AvahiResolverHandler <netcomm/dns-sd/avahi_resolver_handler.h>
29 * Avahi resolver handler interface.
30 * This interface has to be implemented to make use of the threaded
31 * Avahi lookup of names and addresses. After you have ordered a
32 * lookup this handler is called with the result.
33 *
34 * @ingroup NetComm
35 * @author Tim Niemueller
36 *
37 * @fn void AvahiResolverHandler::resolved_name(char *name, struct sockaddr *addr, socklen_t addrlen) = 0
38 * Name has been successfully resolved.
39 * The ordered name lookup was successful for the given name resulting in
40 * the given addr of addrlen bytes length.
41 * Note that all of the parameters are given to the handler's ownership, that means
42 * especially that the handler is responsible for freeing the associated memory
43 * after it is done with the result using free() on name and addr.
44 * @param name name that was resolved
45 * @param addr resulting addr record
46 * @param addrlen length of addr in bytes
47 *
48 * @fn void AvahiResolverHandler::resolved_address(struct sockaddr_in *addr, socklen_t addrlen, char *name) = 0
49 * Address has been successfully resolved.
50 * The ordered name lookup was successful for the given address resulting in
51 * the given name.
52 * Note that all of the parameters are given to the handler's ownership, that means
53 * especially that the handler is responsible for freeing the associated memory
54 * after it is done with the result using free() on name and addr.
55 * @param name the resulting hostname
56 * @param addr addr record
57 * @param addrlen length of addr in bytes
58 *
59 * @fn void AvahiResolverHandler::name_resolution_failed(char *name) = 0
60 * Name resolution failed.
61 * The given hostname could not be resolved.
62 * Note that the parameter name is given to the handler's ownership. This means
63 * especially that the handler is responsible for freeing the memory with free()
64 * after it is done with the variable.
65 * @param name name whose lookup failed
66 *
67 * @fn void AvahiResolverHandler::address_resolution_failed(struct sockaddr_in *addr, socklen_t addrlen) = 0
68 * Address resolution failed.
69 * The given address could not be resolved.
70 * Note that the parameter addr is given to the handler's ownership. This means
71 * especially that the handler is responsible for freeing the memory with free()
72 * after it is done with the variable.
73 * @param addr address whose lookup failed
74 * @param addrlen length of address
75 */
76
77/** Virtual empty destructor. */
79{
80}
81
82} // end namespace fawkes
virtual ~AvahiResolverHandler()
Virtual empty destructor.
Fawkes library namespace.