fawkes::AvahiResolverHandler Class Reference
[Fawkes Network Communication]

Avahi resolver handler interface. More...

#include <netcomm/dns-sd/avahi_resolver_handler.h>

List of all members.

Public Member Functions

virtual ~AvahiResolverHandler ()
 Virtual empty destructor.
virtual void resolved_name (char *name, struct sockaddr *addr, socklen_t addrlen)=0
 Name has been successfully resolved.
virtual void resolved_address (struct sockaddr_in *addr, socklen_t addrlen, char *name)=0
 Address has been successfully resolved.
virtual void name_resolution_failed (char *name)=0
 Name resolution failed.
virtual void address_resolution_failed (struct sockaddr_in *addr, socklen_t addrlen)=0
 Address resolution failed.


Detailed Description

Avahi resolver handler interface.

This interface has to be implemented to make use of the threaded Avahi lookup of names and addresses. After you have ordered a lookup this handler is called with the result.

Author:
Tim Niemueller

Definition at line 31 of file avahi_resolver_handler.h.


Constructor & Destructor Documentation

fawkes::AvahiResolverHandler::~AvahiResolverHandler (  )  [virtual]

Virtual empty destructor.

Definition at line 78 of file avahi_resolver_handler.cpp.


Member Function Documentation

void fawkes::AvahiResolverHandler::address_resolution_failed ( struct sockaddr_in *  addr,
socklen_t  addrlen 
) [pure virtual]

Address resolution failed.

The given address could not be resolved. Note that the parameter addr is given to the handler's ownership. This means especially that the handler is responsible for freeing the memory with free() after it is done with the variable.

Parameters:
addr address whose lookup failed
addrlen length of address

void fawkes::AvahiResolverHandler::name_resolution_failed ( char *  name  )  [pure virtual]

Name resolution failed.

The given hostname could not be resolved. Note that the parameter name is given to the handler's ownership. This means especially that the handler is responsible for freeing the memory with free() after it is done with the variable.

Parameters:
name name whose lookup failed

void fawkes::AvahiResolverHandler::resolved_address ( struct sockaddr_in *  addr,
socklen_t  addrlen,
char *  name 
) [pure virtual]

Address has been successfully resolved.

The ordered name lookup was successful for the given address resulting in the given name. Note that all of the parameters are given to the handler's ownership, that means especially that the handler is responsible for freeing the associated memory after it is done with the result using free() on name and addr.

Parameters:
name the resulting hostname
addr addr record, currently always of type struct sockaddr_in (only IPv4)
addrlen length of addr in bytes

void fawkes::AvahiResolverHandler::resolved_name ( char *  name,
struct sockaddr *  addr,
socklen_t  addrlen 
) [pure virtual]

Name has been successfully resolved.

The ordered name lookup was successful for the given name resulting in the given addr of addrlen bytes length. Note that all of the parameters are given to the handler's ownership, that means especially that the handler is responsible for freeing the associated memory after it is done with the result using free() on name and addr.

Parameters:
name name that was resolved
addr resulting addr record, currently always of type struct sockaddr_in (only IPv4)
addrlen length of addr in bytes


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:31:40 2011 for Fawkes API by  doxygen 1.4.7