Main Page | Namespace List | Class List | File List | Class Members | Related Pages

dnssd::Service Class Reference

Models a service and its ressources. More...

#include <Service.h>

List of all members.

Public Member Functions

 Service (int aIface, std::string &aSrvType, std::string &aRegistrationType, std::string &aDomain, std::string &aName, std::string &aHost, int aPort, std::map< std::string, std::string > &aResources)
int stop ()
 Stops publishing this service.
void setResource (const std::string &aName, const std::string &aValue)
std::map< std::string, std::string > getResources ()
 Get copy of resource map for this service.
void setResources (std::map< std::string, std::string > aResources)
std::string & getResource (const std::string &aName)
int removeResource (const std::string &aName)
int getIface ()
 Get network interface in which is this service.
std::string getServiceType ()
 Get service type of this service.
std::string getRegistrationType ()
 Get transport type for this service {kTCP, kUDP}.
std::string getDomain ()
 Get domain on which is this service.
std::string getName ()
 Get service name.
int getPort ()
 Get port on which service listens to.
std::string getHostname ()
 Get name of host for this service.
std::string getNodeName ()
 Get node name for this service.
void addServiceChangeListener (const ServiceChangeListener *aListener)
void removeServiceChangeListener (const ServiceChangeListener *aListener)
std::string toString ()
 Returns string representation of this service.

Static Public Attributes

static const std::string kTCP
 TCP transport type.
static const std::string kUDP
 UDP transport type.
static const std::string kLOCAL
 Default domain.
static const std::string kSEPARATOR
 Domain record separator.


Detailed Description

Models a service and its ressources.

Author:
Cedric Chantepie


Member Function Documentation

dnssd::Service::getHostname  ) 
 

Get name of host for this service.

Returns:
Service host name

dnssd::Service::getIface  ) 
 

Get network interface in which is this service.

Returns:
Iface index, -1 for the default one.

dnssd::Service::getNodeName  ) 
 

Get node name for this service.

Returns:
Node name for this service.

dnssd::Service::getPort  ) 
 

Get port on which service listens to.

Returns:
Service port

dnssd::Service::getResources  ) 
 

Get copy of resource map for this service.

Returns:
Resource map copy.

dnssd::Service::stop  ) 
 

Stops publishing this service.

Returns:
code (exception ?)
Todo:
start To restart publishing

dnssd::Service::toString  ) 
 

Returns string representation of this service.

Returns:
String description of service.


The documentation for this class was generated from the following file:
Generated on Fri May 19 23:27:33 2006 for Tiny DNSSD by  doxygen 1.4.4