#include <DTNScheme.h>
Public Member Functions | |
virtual bool | validate (const URI &uri, bool is_pattern=false) |
Validate that the SSP in the given URI 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 (URI *uri, const char *tag) |
Append the given service tag to the uri in a scheme-specific manner. | |
virtual bool | append_service_wildcard (URI *uri) |
Append a wildcard tag to the uri in a scheme-specific manner. | |
virtual bool | remove_service_tag (URI *uri) |
Reduce URI to node ID in a scheme specific manner. | |
virtual singleton_info_t | is_singleton (const URI &uri) |
Check if the given URI is a singleton EID. | |
Private Member Functions | |
DTNScheme () | |
Friends | |
class | oasys::Singleton< DTNScheme > |
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.
dtn::DTNScheme::DTNScheme | ( | ) | [inline, private] |
Definition at line 96 of file DTNScheme.h.
Append the given service tag to the uri in a scheme-specific manner.
Reimplemented from dtn::Scheme.
Definition at line 133 of file DTNScheme.cc.
Append a wildcard tag to the uri in a scheme-specific manner.
Reimplemented from dtn::Scheme.
Definition at line 145 of file DTNScheme.cc.
Scheme::singleton_info_t dtn::DTNScheme::is_singleton | ( | const URI & | uri | ) | [virtual] |
Check if the given URI is a singleton EID.
Implements dtn::Scheme.
Definition at line 168 of file DTNScheme.cc.
References dtn::EndpointID::MULTINODE, and dtn::EndpointID::SINGLETON.
bool dtn::DTNScheme::match | ( | const EndpointIDPattern & | pattern, | |
const EndpointID & | eid | |||
) | [virtual] |
Match the pattern to the endpoint id in a scheme-specific manner.
Implements dtn::Scheme.
Definition at line 55 of file DTNScheme.cc.
References ASSERT, dtn::EndpointID::known_scheme(), dtn::EndpointID::scheme(), dtn::EndpointID::ssp(), and dtn::EndpointID::uri().
Reduce URI to node ID in a scheme specific manner.
The default scheme is not capable of this.
Reimplemented from dtn::Scheme.
Definition at line 159 of file DTNScheme.cc.
Validate that the SSP in the given URI 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 35 of file DTNScheme.cc.
friend class oasys::Singleton< DTNScheme > [friend] |
Definition at line 95 of file DTNScheme.h.