Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

Services Class Reference

MetaObject implementing the Services object type: make a service discovery system available through VOS. More...

#include <services.hh>

Inheritance diagram for Services:

MetaObject LocalServices RemoteServices List of all members.

Public Member Functions

Static Public Member Functions

Protected Attributes

Static Protected Attributes


Detailed Description

MetaObject implementing the Services object type: make a service discovery system available through VOS.

A services object contains a list of hypercards to services. It is intended to be used as a registry of interesting VOS application running on a host, such as virtual worlds, GUI clients, chat clients, mp3 jukeboxes, print servers, etc to make it easy to discover these services.

The LocalServices object will typically be used by a service list daemon to hold a list of services for one host. When queried, the daemon will search its local list as well as perform a broadcast query to the local network, or into some other service discovery system such as SSDP or MDNS. An application searching for services can simply connect to this default Services for its local host (the default URL is vop://localhost:4231/services) and perform the query via the query() method in the RemoteServices interface. An application wishing to register a service does the same, using the registerService() method. As a shortcut, the static method registerServiceWithDefault() can be used as well.

The hypercards in a services list will have, as co-types, a list of the types of the objects that the hypercard links to prefixed with "linktype=". For example, a hypercard in a services directory points to a A3DL virtual world. The hypercard itself will have as types both "misc:hypercard" and "linktype=a3dl:world". Note that the latter is a perfectly legal type! This enables the user to do searches on a particular type string to look for particular services, but doesn't actually cause an application to try to load the hypercard as that type.

Note:
This metaobject uses Hypercard and Property, so be sure to register those metaobject extenders as well.

Definition at line 74 of file services.hh.


Constructor & Destructor Documentation

Services::Services MetaObject superobject  ) 
 

Constructor.

Definition at line 39 of file services.cc.

Services::~Services  )  [virtual]
 

Destructor.

Definition at line 46 of file services.cc.


Member Function Documentation

virtual void Services::endQuery int  q  )  [pure virtual]
 

Implemented in LocalServices, and RemoteServices.

Services * Services::getDefaultServicesDir  )  [static]
 

Exceptions:
NoSuchObjectError (or possibly other exception) if services directory cannot be accessed

Definition at line 57 of file services.cc.

Referenced by registerServiceWithDefault().

PropertyAccessControl * Services::getPropertyAccessControl  )  [virtual]
 

Get default access control policy.

Definition at line 53 of file services.cc.

const string Services::getType  )  [virtual]
 

Return type string ("misc:services").

Definition at line 196 of file services.cc.

virtual int Services::query const std::string &  typepattern,
const std::string &  titlepattern,
const std::string &  descpattern,
const std::string &  urlpattern,
LSD::ServiceAdvertismentListener cb
[pure virtual]
 

Implemented in LocalServices, and RemoteServices.

void Services::registerExtenders  )  [static]
 

Register Extenders.

Definition at line 201 of file services.cc.

void Services::registerService Vobject *  service,
const std::string &  title,
const std::string &  desc = ""
[virtual]
 

Definition at line 83 of file services.cc.

void Services::registerServiceWithDefault Vobject *  service,
const std::string &  title,
const std::string &  desc = ""
[static]
 

Definition at line 77 of file services.cc.

void Services::setDefaultServiceDir const std::string &  url  )  [static]
 

Definition at line 72 of file services.cc.

void Services::setPropertyAccessControl PropertyAccessControl ac  )  [virtual]
 

Set default access control policy.

Definition at line 50 of file services.cc.


Member Data Documentation

PropertyAccessControl* Services::accessControl [protected]
 

Definition at line 79 of file services.hh.

Referenced by getPropertyAccessControl(), LocalServices::initialize(), LocalServices::LocalServices(), Services(), and setPropertyAccessControl().

Services * Services::defaultServiceDir = 0 [static, protected]
 

Definition at line 34 of file services.cc.

Referenced by getDefaultServicesDir().

std::map<int, LSD::ServiceAdvertismentListener*> Services::queries [protected]
 

Definition at line 82 of file services.hh.

Referenced by RemoteServices::endQuery(), RemoteServices::handleAdvertisement(), LocalServices::handleEndQuery(), LocalServices::handleQuery(), ServiceListenerSiteWrapper::notifyObjectExcise(), and RemoteServices::query().

string Services::serviceDirURL [static, protected]
 

Referenced by getDefaultServicesDir(), and setDefaultServiceDir().


The documentation for this class was generated from the following files:
Generated on Tue Aug 12 03:55:57 2003 for Interreality Project - VOS by doxygen 1.3.2