author | Michael Krelin <hacker@klever.net> | 2007-12-21 21:24:01 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-04 18:16:09 (UTC) |
commit | ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a (patch) (unidiff) | |
tree | 00e1b73988a72a0d0886a10a8a833051942d5e0f /include | |
parent | 24a6f9e3525b76ed1aa787f66b003b01b767af39 (diff) | |
download | libopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.zip libopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.tar.gz libopkele-ac9e3ddb4277e5696d789ad6b3ea7aa820a5e76a.tar.bz2 |
idiscovery_t() default constructor and a couple of helpers
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/discovery.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h index 7865fb2..af4aa29 100644 --- a/include/opkele/discovery.h +++ b/include/opkele/discovery.h | |||
@@ -8,27 +8,33 @@ namespace opkele { | |||
8 | using std::string; | 8 | using std::string; |
9 | 9 | ||
10 | struct idiscovery_t; | 10 | struct idiscovery_t; |
11 | 11 | ||
12 | void idiscover(idiscovery_t& result,const string& identity); | 12 | void idiscover(idiscovery_t& result,const string& identity); |
13 | 13 | ||
14 | struct idiscovery_t { | 14 | struct idiscovery_t { |
15 | bool xri_identity; | 15 | bool xri_identity; |
16 | string normalized_id; | 16 | string normalized_id; |
17 | string canonicalized_id; | 17 | string canonicalized_id; |
18 | xrd::XRD_t xrd; | 18 | xrd::XRD_t xrd; |
19 | 19 | ||
20 | idiscovery_t() { } | ||
20 | idiscovery_t(const string& i) { | 21 | idiscovery_t(const string& i) { |
21 | idiscover(*this,i); | 22 | idiscover(*this,i); |
22 | } | 23 | } |
23 | idiscovery_t(const char *i) { | 24 | idiscovery_t(const char *i) { |
24 | idiscover(*this,i); | 25 | idiscover(*this,i); |
25 | } | 26 | } |
26 | 27 | ||
27 | void clear() { | 28 | void clear() { |
28 | normalized_id.clear(); canonicalized_id.clear(); | 29 | normalized_id.clear(); canonicalized_id.clear(); |
29 | xrd.clear(); | 30 | xrd.clear(); |
30 | } | 31 | } |
32 | |||
33 | idiscovery_t& operator=(const string& i) { | ||
34 | idiscover(*this,i); return *this; } | ||
35 | idiscovery_t& operator=(const char *i) { | ||
36 | idiscover(*this,i); return *this; } | ||
31 | }; | 37 | }; |
32 | } | 38 | } |
33 | 39 | ||
34 | #endif /* __OPKELE_DISCOVERY_H */ | 40 | #endif /* __OPKELE_DISCOVERY_H */ |