author | Michael Krelin <hacker@klever.net> | 2008-02-03 15:28:30 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-02-03 15:28:30 (UTC) |
commit | d1c45af16b3bd31f65d03eec0fcd1c61b4d69fb0 (patch) (unidiff) | |
tree | 34fc1389a138a2c33ccfceb595379a16a0139768 | |
parent | 5f742d37f78d626e0140632b28b072f892fd98c3 (diff) | |
download | libopkele-d1c45af16b3bd31f65d03eec0fcd1c61b4d69fb0.zip libopkele-d1c45af16b3bd31f65d03eec0fcd1c61b4d69fb0.tar.gz libopkele-d1c45af16b3bd31f65d03eec0fcd1c61b4d69fb0.tar.bz2 |
moved openid_endpoint_t to types.h
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | include/opkele/basic_rp.h | 18 | ||||
-rw-r--r-- | include/opkele/types.h | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/include/opkele/basic_rp.h b/include/opkele/basic_rp.h index 3f17fd9..d5356aa 100644 --- a/include/opkele/basic_rp.h +++ b/include/opkele/basic_rp.h | |||
@@ -2,5 +2,4 @@ | |||
2 | #define __OPKELE_BASIC_RP_H | 2 | #define __OPKELE_BASIC_RP_H |
3 | 3 | ||
4 | #include <cstring> | ||
5 | #include <string> | 4 | #include <string> |
6 | #include <opkele/types.h> | 5 | #include <opkele/types.h> |
@@ -10,21 +9,4 @@ namespace opkele { | |||
10 | using std::string; | 9 | using std::string; |
11 | 10 | ||
12 | struct openid_endpoint_t { | ||
13 | string uri; | ||
14 | string claimed_id; | ||
15 | string local_id; | ||
16 | |||
17 | openid_endpoint_t() { } | ||
18 | openid_endpoint_t(const string& u,const string& cid,const string& lid) | ||
19 | : uri(u), claimed_id(cid), local_id(lid) { } | ||
20 | |||
21 | bool operator==(const openid_endpoint_t& x) const { | ||
22 | return uri==x.uri && local_id==x.local_id; } | ||
23 | bool operator<(const openid_endpoint_t& x) const { | ||
24 | int c; | ||
25 | return (c=strcmp(uri.c_str(),x.uri.c_str())) | ||
26 | ? (c<0) : (strcmp(local_id.c_str(),x.local_id.c_str())<0); } | ||
27 | }; | ||
28 | |||
29 | class basic_RP { | 11 | class basic_RP { |
30 | public: | 12 | public: |
diff --git a/include/opkele/types.h b/include/opkele/types.h index 5d39a5c..6ab51ef 100644 --- a/include/opkele/types.h +++ b/include/opkele/types.h | |||
@@ -7,4 +7,5 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <cstring> | ||
9 | #include <ostream> | 10 | #include <ostream> |
10 | #include <vector> | 11 | #include <vector> |
@@ -207,4 +208,21 @@ namespace opkele { | |||
207 | }; | 208 | }; |
208 | 209 | ||
210 | struct openid_endpoint_t { | ||
211 | string uri; | ||
212 | string claimed_id; | ||
213 | string local_id; | ||
214 | |||
215 | openid_endpoint_t() { } | ||
216 | openid_endpoint_t(const string& u,const string& cid,const string& lid) | ||
217 | : uri(u), claimed_id(cid), local_id(lid) { } | ||
218 | |||
219 | bool operator==(const openid_endpoint_t& x) const { | ||
220 | return uri==x.uri && local_id==x.local_id; } | ||
221 | bool operator<(const openid_endpoint_t& x) const { | ||
222 | int c; | ||
223 | return (c=strcmp(uri.c_str(),x.uri.c_str())) | ||
224 | ? (c<0) : (strcmp(local_id.c_str(),x.local_id.c_str())<0); } | ||
225 | }; | ||
226 | |||
209 | } | 227 | } |
210 | 228 | ||