-rw-r--r-- | include/opkele/association.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/opkele/association.h b/include/opkele/association.h index 5eb1cc3..ef0df42 100644 --- a/include/opkele/association.h +++ b/include/opkele/association.h | |||
@@ -1,89 +1,89 @@ | |||
1 | #ifndef __OPKELE_ASSOCIATION_H | 1 | #ifndef __OPKELE_ASSOCIATION_H |
2 | #define __OPKELE_ASSOCIATION_H | 2 | #define __OPKELE_ASSOCIATION_H |
3 | 3 | ||
4 | #include <time.h> | 4 | #include <time.h> |
5 | #include <opkele/types.h> | 5 | #include <opkele/types.h> |
6 | 6 | ||
7 | /** | 7 | /** |
8 | * @file | 8 | * @file |
9 | * @brief reference implementation of association_t | 9 | * @brief reference implementation of association_t |
10 | */ | 10 | */ |
11 | 11 | ||
12 | /** | 12 | /** |
13 | * @brief the main opkele namespace | 13 | * @brief the main opkele namespace |
14 | */ | 14 | */ |
15 | namespace opkele { | 15 | namespace opkele { |
16 | 16 | ||
17 | /** | 17 | /** |
18 | * reference implementation of association_t class. | 18 | * reference implementation of association_t class. |
19 | */ | 19 | */ |
20 | class association : public association_t { | 20 | class association : public association_t { |
21 | public: | 21 | public: |
22 | /** | 22 | /** |
23 | * OpenID server name | 23 | * OpenID server name |
24 | */ | 24 | */ |
25 | string _server; | 25 | string _server; |
26 | /** | 26 | /** |
27 | * association handle | 27 | * association handle |
28 | */ | 28 | */ |
29 | string _handle; | 29 | string _handle; |
30 | /** | 30 | /** |
31 | * association type | 31 | * association type |
32 | */ | 32 | */ |
33 | string _assoc_type; | 33 | string _assoc_type; |
34 | /** | 34 | /** |
35 | * the secret | 35 | * the secret |
36 | */ | 36 | */ |
37 | secret_t _secret; | 37 | secret_t _secret; |
38 | /** | 38 | /** |
39 | * expiration time | 39 | * expiration time |
40 | */ | 40 | */ |
41 | time_t _expires; | 41 | time_t _expires; |
42 | /** | 42 | /** |
43 | * statelessness of the assoc_handle | 43 | * statelessness of the assoc_handle |
44 | */ | 44 | */ |
45 | bool _stateless; | 45 | bool _stateless; |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * @param __server the server name | 48 | * @param __server the server name |
49 | * @param __handle association handle | 49 | * @param __handle association handle |
50 | * @param __assoc_type association type | 50 | * @param __assoc_type association type |
51 | * @param __secret the secret | 51 | * @param __secret the secret |
52 | * @param __expires expiration time | 52 | * @param __expires expiration time |
53 | * @param __stateless statelessness of the assoc_handle | 53 | * @param __stateless statelessness of the assoc_handle |
54 | */ | 54 | */ |
55 | association(const string& __server, const string& __handle, | 55 | association(const string& __server, const string& __handle, |
56 | const string& __assoc_type, const secret_t& __secret, | 56 | const string& __assoc_type, const secret_t& __secret, |
57 | time_t __expires, bool __stateless) | 57 | time_t __expires, bool __stateless) |
58 | : _server(__server), _handle(__handle), _assoc_type(__assoc_type), | 58 | : _server(__server), _handle(__handle), _assoc_type(__assoc_type), |
59 | _secret(__secret), _expires(__expires), _stateless(__stateless) { } | 59 | _secret(__secret), _expires(__expires), _stateless(__stateless) { } |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * @overload association_t::server() | 62 | * @overload association_t::server() |
63 | */ | 63 | */ |
64 | virtual string server() const { return _server; } | 64 | virtual string server() const { return _server; } |
65 | /** | 65 | /** |
66 | * @overload association_t::handle() | 66 | * @overload association_t::handle() |
67 | */ | 67 | */ |
68 | virtual string handle() const { return _handle; } | 68 | virtual string handle() const { return _handle; } |
69 | /** | 69 | /** |
70 | * @overload association_t::assoc_type() | 70 | * @overload association_t::assoc_type() |
71 | */ | 71 | */ |
72 | virtual string assoc_type() const { return _assoc_type; } | 72 | virtual string assoc_type() const { return _assoc_type; } |
73 | /** | 73 | /** |
74 | * @overload association_t::secret() | 74 | * @overload association_t::secret() |
75 | */ | 75 | */ |
76 | virtual secret_t secret() const { return _secret; } | 76 | virtual secret_t secret() const { return _secret; } |
77 | /** | 77 | /** |
78 | * @overload association_t::expires_in() | 78 | * @overload association_t::expires_in() |
79 | */ | 79 | */ |
80 | virtual int expires_in() const { return _expires-time(0); } | 80 | virtual int expires_in() const { return _expires-time(0); } |
81 | /** | 81 | /** |
82 | * @overload associationn_t::stateless() | 82 | * @overload association_t::stateless() |
83 | */ | 83 | */ |
84 | virtual bool stateless() const { return _stateless; } | 84 | virtual bool stateless() const { return _stateless; } |
85 | }; | 85 | }; |
86 | 86 | ||
87 | } | 87 | } |
88 | 88 | ||
89 | #endif /* __OPKELE_ASSOCIATION_H */ | 89 | #endif /* __OPKELE_ASSOCIATION_H */ |