author | Michael Krelin <hacker@klever.net> | 2007-11-22 23:00:32 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-11-22 23:00:32 (UTC) |
commit | 2589c69c4a909563098365fba141082db4657353 (patch) (unidiff) | |
tree | e42018dd7d2ed1bbdee90155d3c99bbaf0011bc0 | |
parent | e6b62b080eae38a7c62be1148cf794085e9065c3 (diff) | |
download | libopkele-2589c69c4a909563098365fba141082db4657353.zip libopkele-2589c69c4a909563098365fba141082db4657353.tar.gz libopkele-2589c69c4a909563098365fba141082db4657353.tar.bz2 |
added virtual destructors to base classes
and bumped version to 0.4
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | include/opkele/consumer.h | 2 | ||||
-rw-r--r-- | include/opkele/extension.h | 2 | ||||
-rw-r--r-- | include/opkele/server.h | 2 | ||||
-rw-r--r-- | include/opkele/types.h | 2 |
5 files changed, 9 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 283757f..48a5efb 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,13 +1,13 @@ | |||
1 | AC_INIT([libopkele], [0.3.2], [libopkele-bugs@klever.net]) | 1 | AC_INIT([libopkele], [0.4], [libopkele-bugs@klever.net]) |
2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) | 2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) |
3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) | 3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) |
4 | AM_INIT_AUTOMAKE([dist-bzip2]) | 4 | AM_INIT_AUTOMAKE([dist-bzip2]) |
5 | 5 | ||
6 | AC_PROG_INSTALL | 6 | AC_PROG_INSTALL |
7 | AC_PROG_CXX | 7 | AC_PROG_CXX |
8 | AC_PROG_CC | 8 | AC_PROG_CC |
9 | AC_PROG_LIBTOOL | 9 | AC_PROG_LIBTOOL |
10 | PKG_PROG_PKG_CONFIG | 10 | PKG_PROG_PKG_CONFIG |
11 | 11 | ||
12 | AC_HEADER_STDC | 12 | AC_HEADER_STDC |
13 | 13 | ||
diff --git a/include/opkele/consumer.h b/include/opkele/consumer.h index b9d1e54..50ff692 100644 --- a/include/opkele/consumer.h +++ b/include/opkele/consumer.h | |||
@@ -13,24 +13,26 @@ namespace opkele { | |||
13 | 13 | ||
14 | /** | 14 | /** |
15 | * implementation of basic consumer functionality | 15 | * implementation of basic consumer functionality |
16 | * | 16 | * |
17 | * @note | 17 | * @note |
18 | * The consumer uses libcurl internally, which means that if you're using | 18 | * The consumer uses libcurl internally, which means that if you're using |
19 | * libopkele in multithreaded environment you should call curl_global_init | 19 | * libopkele in multithreaded environment you should call curl_global_init |
20 | * yourself before spawning any threads. | 20 | * yourself before spawning any threads. |
21 | */ | 21 | */ |
22 | class consumer_t { | 22 | class consumer_t { |
23 | public: | 23 | public: |
24 | 24 | ||
25 | virtual ~consumer_t() { } | ||
26 | |||
25 | /** | 27 | /** |
26 | * store association. The function should be overridden in the real | 28 | * store association. The function should be overridden in the real |
27 | * implementation to provide persistent associations store. | 29 | * implementation to provide persistent associations store. |
28 | * @param server the OpenID server | 30 | * @param server the OpenID server |
29 | * @param handle association handle | 31 | * @param handle association handle |
30 | * @param secret the secret associated with the server and handle | 32 | * @param secret the secret associated with the server and handle |
31 | * @param expires_in the number of seconds until the handle is expired | 33 | * @param expires_in the number of seconds until the handle is expired |
32 | * @return the auto_ptr<> for the newly allocated association_t object | 34 | * @return the auto_ptr<> for the newly allocated association_t object |
33 | */ | 35 | */ |
34 | virtual assoc_t store_assoc(const string& server,const string& handle,const secret_t& secret,int expires_in) = 0; | 36 | virtual assoc_t store_assoc(const string& server,const string& handle,const secret_t& secret,int expires_in) = 0; |
35 | /** | 37 | /** |
36 | * retrieve stored association. The function should be overridden | 38 | * retrieve stored association. The function should be overridden |
diff --git a/include/opkele/extension.h b/include/opkele/extension.h index ea0c74c..513672f 100644 --- a/include/opkele/extension.h +++ b/include/opkele/extension.h | |||
@@ -6,24 +6,26 @@ | |||
6 | * @brief extensions framework basics | 6 | * @brief extensions framework basics |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <opkele/types.h> | 9 | #include <opkele/types.h> |
10 | 10 | ||
11 | namespace opkele { | 11 | namespace opkele { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * OpenID extension hooks base class | 14 | * OpenID extension hooks base class |
15 | */ | 15 | */ |
16 | class extension_t { | 16 | class extension_t { |
17 | public: | 17 | public: |
18 | |||
19 | virtual ~extension_t() { } | ||
18 | /** | 20 | /** |
19 | * hook called by consumer before submitting data to OpenID server. | 21 | * hook called by consumer before submitting data to OpenID server. |
20 | * It is supposed to manipulate parameters list. | 22 | * It is supposed to manipulate parameters list. |
21 | * @param p parameters about to be submitted to server | 23 | * @param p parameters about to be submitted to server |
22 | * @param identity identity being verified. It may differ from the | 24 | * @param identity identity being verified. It may differ from the |
23 | * one available in parameters list in case of delegation | 25 | * one available in parameters list in case of delegation |
24 | * @see consumer_t::checkid_ | 26 | * @see consumer_t::checkid_ |
25 | * @see consumer_t::checkid_immediate | 27 | * @see consumer_t::checkid_immediate |
26 | * @see consumer_t::checkid_setup | 28 | * @see consumer_t::checkid_setup |
27 | */ | 29 | */ |
28 | virtual void checkid_hook(params_t& p,const string& identity); | 30 | virtual void checkid_hook(params_t& p,const string& identity); |
29 | /** | 31 | /** |
diff --git a/include/opkele/server.h b/include/opkele/server.h index e7e5bb3..dd7fc41 100644 --- a/include/opkele/server.h +++ b/include/opkele/server.h | |||
@@ -8,24 +8,26 @@ | |||
8 | 8 | ||
9 | #include <opkele/types.h> | 9 | #include <opkele/types.h> |
10 | #include <opkele/extension.h> | 10 | #include <opkele/extension.h> |
11 | 11 | ||
12 | namespace opkele { | 12 | namespace opkele { |
13 | 13 | ||
14 | /** | 14 | /** |
15 | * implementation of basic server functionality | 15 | * implementation of basic server functionality |
16 | */ | 16 | */ |
17 | class server_t { | 17 | class server_t { |
18 | public: | 18 | public: |
19 | 19 | ||
20 | virtual ~server_t() { } | ||
21 | |||
20 | /** | 22 | /** |
21 | * allocate the new association. The function should be overridden | 23 | * allocate the new association. The function should be overridden |
22 | * in the real implementation to provide persistent assocations | 24 | * in the real implementation to provide persistent assocations |
23 | * store. | 25 | * store. |
24 | * @param mode the mode of request being processed to base the | 26 | * @param mode the mode of request being processed to base the |
25 | * statelessness of the association upon | 27 | * statelessness of the association upon |
26 | * @return the auto_ptr<> for the newly allocated association_t object | 28 | * @return the auto_ptr<> for the newly allocated association_t object |
27 | */ | 29 | */ |
28 | virtual assoc_t alloc_assoc(mode_t mode) = 0; | 30 | virtual assoc_t alloc_assoc(mode_t mode) = 0; |
29 | /** | 31 | /** |
30 | * retrieve the association. The function should be overridden in | 32 | * retrieve the association. The function should be overridden in |
31 | * the reqal implementation to provide persistent assocations | 33 | * the reqal implementation to provide persistent assocations |
diff --git a/include/opkele/types.h b/include/opkele/types.h index 8f4bf73..f732a1e 100644 --- a/include/opkele/types.h +++ b/include/opkele/types.h | |||
@@ -56,24 +56,26 @@ namespace opkele { | |||
56 | * decode cleartext secret from base64 | 56 | * decode cleartext secret from base64 |
57 | * @param b64 base64-encoded representation of the secret value | 57 | * @param b64 base64-encoded representation of the secret value |
58 | */ | 58 | */ |
59 | void from_base64(const string& b64); | 59 | void from_base64(const string& b64); |
60 | }; | 60 | }; |
61 | 61 | ||
62 | /** | 62 | /** |
63 | * Interface to the association. | 63 | * Interface to the association. |
64 | */ | 64 | */ |
65 | class association_t { | 65 | class association_t { |
66 | public: | 66 | public: |
67 | 67 | ||
68 | virtual ~association_t() { } | ||
69 | |||
68 | /** | 70 | /** |
69 | * retrieve the server with which association was established. | 71 | * retrieve the server with which association was established. |
70 | * @return server name | 72 | * @return server name |
71 | */ | 73 | */ |
72 | virtual string server() const = 0; | 74 | virtual string server() const = 0; |
73 | /** | 75 | /** |
74 | * retrieve the association handle. | 76 | * retrieve the association handle. |
75 | * @return handle | 77 | * @return handle |
76 | */ | 78 | */ |
77 | virtual string handle() const = 0; | 79 | virtual string handle() const = 0; |
78 | /** | 80 | /** |
79 | * retrieve the association type. | 81 | * retrieve the association type. |