author | Michael Krelin <hacker@klever.net> | 2008-02-12 23:37:05 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-02-12 23:37:05 (UTC) |
commit | 2048be862b8619ddec90163af05e6472bf5175e4 (patch) (side-by-side diff) | |
tree | 74ab3384a2a088abe5748ab93cd2f65fa121e1ae /include/opkele/discovery.h | |
parent | a3eba4c33fee80fcf152dcbd198586e12b687e54 (diff) | |
download | libopkele-2048be862b8619ddec90163af05e6472bf5175e4.zip libopkele-2048be862b8619ddec90163af05e6472bf5175e4.tar.gz libopkele-2048be862b8619ddec90163af05e6472bf5175e4.tar.bz2 |
slight api improvement to ease caching of discovery information
* added opend_endpoint_output_iterator to types.h
* changed endpoint_discovery_iterator to the aforementioned iterator typedef
* added discover() virtual to prequeue_RP and made use thereof.
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/discovery.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h index 4471597..f2721a6 100644 --- a/include/opkele/discovery.h +++ b/include/opkele/discovery.h @@ -56,60 +56,59 @@ namespace opkele { uris.clear(); local_ids.clear(); provider_id.clear(); } }; typedef priority_map<service_t> services_t; class XRD_t { public: time_t expires; canonical_ids_t canonical_ids; local_ids_t local_ids; services_t services; string provider_id; void clear() { expires = 0; canonical_ids.clear(); local_ids.clear(); services.clear(); provider_id.clear(); } bool empty() const { return canonical_ids.empty() && local_ids.empty() && services.empty(); } }; } - typedef util::output_iterator_proxy<openid_endpoint_t> - endpoint_discovery_iterator; + typedef openid_endpoint_output_iterator endpoint_discovery_iterator; string idiscover( endpoint_discovery_iterator oi, const string& identity); void yadiscover( endpoint_discovery_iterator oi, const string& yurl, const char **types, bool redirs=false); struct idiscovery_t { bool xri_identity; string normalized_id; string canonicalized_id; xrd::XRD_t xrd; idiscovery_t() { } void clear() { normalized_id.clear(); canonicalized_id.clear(); xrd.clear(); } }; } #endif /* __OPKELE_DISCOVERY_H */ |