-rw-r--r-- | include/opkele/discovery.h | 1 | ||||
-rw-r--r-- | lib/discovery.cc | 2 | ||||
-rw-r--r-- | test/idiscover.cc | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h index 5d7129b..7865fb2 100644 --- a/include/opkele/discovery.h +++ b/include/opkele/discovery.h @@ -14,2 +14,3 @@ namespace opkele { struct idiscovery_t { + bool xri_identity; string normalized_id; diff --git a/lib/discovery.cc b/lib/discovery.cc index a35ce32..1f23ff1 100644 --- a/lib/discovery.cc +++ b/lib/discovery.cc @@ -97,2 +97,3 @@ namespace opkele { result.normalized_id = id; + result.xri_identity = true; /* TODO: further canonicalize xri identity? Like folding case or whatever... */ @@ -108,2 +109,3 @@ namespace opkele { }else{ + result.xri_identity = false; if(id.find("://")==string::npos) diff --git a/test/idiscover.cc b/test/idiscover.cc index 2abedc9..05cbcae 100644 --- a/test/idiscover.cc +++ b/test/idiscover.cc @@ -38,2 +38,3 @@ int main(int argc,char **argv) { << "Canonicalized ID: " << discovery.canonicalized_id << endl + << "The identity is " << (discovery.xri_identity?"":"not ") << "an i-name" << endl << endl |