author | Michael Krelin <hacker@klever.net> | 2007-12-29 21:15:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-04 18:21:55 (UTC) |
commit | 3801123163d78896a05fb26323deb7c0fa8c7f8e (patch) (side-by-side diff) | |
tree | 96ff115b07235e4ce66d5de8e9e9338d388696d8 | |
parent | d81fa443c048d6919e98e82fff1fe6013c9deff4 (diff) | |
download | libopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.zip libopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.tar.gz libopkele-3801123163d78896a05fb26323deb7c0fa8c7f8e.tar.bz2 |
make ./test/idiscover show expiration data
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | test/idiscover.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/idiscover.cc b/test/idiscover.cc index 05cbcae..873da12 100644 --- a/test/idiscover.cc +++ b/test/idiscover.cc @@ -15,36 +15,38 @@ template<typename _PDT> } ostream& operator<<(ostream& o,const opkele::xrd::service_t s) { o << "{" << endl << " Type: "; copy(s.types.begin(),s.types.end(), ostream_iterator<string>(o," ")); o << endl << " URI: " << s.uris << endl << " LocalID: " << s.local_ids << endl; o << "}"; } int main(int argc,char **argv) { try { if(argc<2) throw opkele::exception(OPKELE_CP_ "Please, give me something to resolve"); for(int a=1;a<argc;++a) { opkele::idiscovery_t discovery(argv[a]); clog << "===============================================================" << endl << "User-supplied ID: " << argv[a] << endl << "Normalized ID: " << discovery.normalized_id << endl << "Canonicalized ID: " << discovery.canonicalized_id << endl - << "The identity is " << (discovery.xri_identity?"":"not ") << "an i-name" << endl - << endl + << "The identity is " << (discovery.xri_identity?"":"not ") << "an i-name" << endl; + if(discovery.xrd.expires) + clog << "Information expires in " << discovery.xrd.expires-time(0) << " seconds" << endl; + clog << endl << "CanonicalID: " << discovery.xrd.canonical_ids << endl << "LocalID: " << discovery.xrd.local_ids << endl << "Services: " << discovery.xrd.services << endl; } }catch(exception& e) { cerr << "oops: " << e.what() << endl; _exit(1); } _exit(0); } |