author | Michael Krelin <hacker@klever.net> | 2007-12-09 17:22:06 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-12-09 22:08:24 (UTC) |
commit | c34adc6e274c3dbb63af99ca566000e7d218244c (patch) (unidiff) | |
tree | 705624c208deb4eaf8d07c119a883e6f4f35236e /include/opkele/discovery.h | |
parent | 60fdaff7888b455b4d07eadc905cefd20f1ddd3c (diff) | |
download | libopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.zip libopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.tar.gz libopkele-c34adc6e274c3dbb63af99ca566000e7d218244c.tar.bz2 |
reworked identity resolution and service discovery
The discovery, which does both XRDS-based (Yadis, XRI, for XRI, using proxy)
and HTML-based search, now returns results in opkele:idiscovery_t structure.
It uses expat-based parser idigger_t, which itself is not exposed via any
header files, but hidden in lib/discovery.cc, the discovery testing program is
renamed from openid_resolve to idiscover.
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/discovery.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/opkele/discovery.h b/include/opkele/discovery.h new file mode 100644 index 0000000..5d7129b --- a/dev/null +++ b/include/opkele/discovery.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef __OPKELE_DISCOVERY_H | ||
2 | #define __OPKELE_DISCOVERY_H | ||
3 | |||
4 | #include <string> | ||
5 | #include <opkele/types.h> | ||
6 | |||
7 | namespace opkele { | ||
8 | using std::string; | ||
9 | |||
10 | struct idiscovery_t; | ||
11 | |||
12 | void idiscover(idiscovery_t& result,const string& identity); | ||
13 | |||
14 | struct idiscovery_t { | ||
15 | string normalized_id; | ||
16 | string canonicalized_id; | ||
17 | xrd::XRD_t xrd; | ||
18 | |||
19 | idiscovery_t(const string& i) { | ||
20 | idiscover(*this,i); | ||
21 | } | ||
22 | idiscovery_t(const char *i) { | ||
23 | idiscover(*this,i); | ||
24 | } | ||
25 | |||
26 | void clear() { | ||
27 | normalized_id.clear(); canonicalized_id.clear(); | ||
28 | xrd.clear(); | ||
29 | } | ||
30 | }; | ||
31 | } | ||
32 | |||
33 | #endif /* __OPKELE_DISCOVERY_H */ | ||