dtn::DTNScheme Class Reference

#include <DTNScheme.h>

Inheritance diagram for dtn::DTNScheme:

dtn::Scheme List of all members.

Detailed Description

This class implements the one default scheme as specified in the bundle protocol.

SSPs for this scheme take the canonical forms:

dtn://<router identifier>="">[/<application tag>="">] dtn:none

Where "router identifier" is a DNS-style "hostname" string, however not necessarily a valid internet hostname, and "application tag" is any string of URI-valid characters.

The special endpoint identifier "dtn:none" is used to represent the null endpoint.

This implementation also supports limited wildcard matching for endpoint patterns.

Definition at line 44 of file DTNScheme.h.

Public Member Functions

virtual bool validate (const std::string &ssp, bool is_pattern=false)
 Validate that the given ssp is legitimate for this scheme.
virtual bool match (const EndpointIDPattern &pattern, const EndpointID &eid)
 Match the given ssp with the given pattern.
virtual bool append_service_tag (std::string *ssp, const char *tag)
 Append the given service tag to the ssp in a scheme-specific manner.

Private Member Functions

 DTNScheme ()

Friends

class oasys::Singleton< DTNScheme >


Constructor & Destructor Documentation

dtn::DTNScheme::DTNScheme (  )  [inline, private]

Definition at line 73 of file DTNScheme.h.


Member Function Documentation

bool dtn::DTNScheme::validate ( const std::string &  ssp,
bool  is_pattern = false 
) [virtual]

Validate that the given ssp is legitimate for this scheme.

If the 'is_pattern' paraemeter is true, then the ssp is being validated as an EndpointIDPattern.

Returns:
true if valid

Implements dtn::Scheme.

Definition at line 38 of file DTNScheme.cc.

References oasys::URL::host_, log_debug_p, and oasys::URL::valid().

bool dtn::DTNScheme::match ( const EndpointIDPattern pattern,
const EndpointID eid 
) [virtual]

Match the given ssp with the given pattern.

Returns:
true if it matches

Implements dtn::Scheme.

Definition at line 84 of file DTNScheme.cc.

References ASSERT, dtn::EndpointID::c_str(), dtn::EndpointID::known_scheme(), log_debug_p, log_warn_p, pattern(), dtn::EndpointID::scheme(), dtn::EndpointID::ssp(), and dtn::EndpointID::str().

bool dtn::DTNScheme::append_service_tag ( std::string *  ssp,
const char *  tag 
) [virtual]

Append the given service tag to the ssp in a scheme-specific manner.

Returns:
true if this scheme is capable of service tags and the tag is a legal one, false otherwise.

Reimplemented from dtn::Scheme.

Definition at line 188 of file DTNScheme.cc.


Friends And Related Function Documentation

friend class oasys::Singleton< DTNScheme > [friend]

Definition at line 72 of file DTNScheme.h.


The documentation for this class was generated from the following files:
Generated on Thu Jun 7 12:54:33 2007 for DTN Reference Implementation by  doxygen 1.5.1