#include <TCAScheme.h>
SSPs for this scheme take the canonical form:
tca://<router identifier (guid)>[/<application tag>="">]
Where "router identifier" is a globally unique identifier. In practice, this will often be the DNS-style "hostname" string of an internet host, for the more-or-less static "infrastructure" nodes that make up the routers and gateways of the TCA network. For the true TCA mobiles, it may be something quite different, like the sha1 hash of an email address for example.
"application tag" is any string of URI-valid characters.
This implementation also supports limited wildcard matching for endpoint patterns.
Definition at line 46 of file TCAScheme.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 | |
TCAScheme () | |
Friends | |
class | oasys::Singleton< TCAScheme > |
dtn::TCAScheme::TCAScheme | ( | ) | [inline, private] |
Definition at line 75 of file TCAScheme.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 39 of file TCAScheme.cc.
References oasys::URL::host_, log_debug_p, and oasys::URL::valid().
bool dtn::TCAScheme::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 87 of file TCAScheme.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::TCAScheme::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 193 of file TCAScheme.cc.
friend class oasys::Singleton< TCAScheme > [friend] |
Definition at line 74 of file TCAScheme.h.