#include <DTNScheme.h>
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 pattern to the endpoint id in a scheme-specific manner. | |
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 > |
dtn::DTNScheme::DTNScheme | ( | ) | [inline, private] |
Definition at line 73 of file DTNScheme.h.
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.
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 pattern to the endpoint id in a scheme-specific manner.
Match the given ssp with the given pattern.
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, 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.
Reimplemented from dtn::Scheme.
Definition at line 188 of file DTNScheme.cc.
friend class oasys::Singleton< DTNScheme > [friend] |
Definition at line 72 of file DTNScheme.h.