Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::AvahiResolverHandler Class Referenceabstract

Avahi resolver handler interface. More...

#include <>>

Public Member Functions

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

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
addraddress whose lookup failed
addrlenlength 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
namename 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
namethe resulting hostname
addraddr record, currently always of type struct sockaddr_in (only IPv4)
addrlenlength 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
namename that was resolved
addrresulting addr record, currently always of type struct sockaddr_in (only IPv4)
addrlenlength of addr in bytes

The documentation for this class was generated from the following files: