00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _DECAF_SECURITY_PROVIDERSERVICE_H_
00019 #define _DECAF_SECURITY_PROVIDERSERVICE_H_
00020
00021 #include <decaf/util/Config.h>
00022
00023 #include <string>
00024
00025 namespace decaf {
00026 namespace security {
00027
00028 class Provider;
00029 class SecuritySpi;
00030
00031 class DECAF_API ProviderService {
00032 private:
00033
00034 const Provider* provider;
00035 std::string type;
00036 std::string algorithm;
00037
00038 public:
00039
00040 ProviderService(const Provider* provider, const std::string& type, const std::string& algorithm);
00041
00042 virtual ~ProviderService();
00043
00049 std::string getType() const {
00050 return this->type;
00051 }
00052
00059 std::string getAlgorithm() const {
00060 return this->algorithm;
00061 }
00062
00071 const Provider* getProvider() const {
00072 return provider;
00073 }
00074
00082 virtual SecuritySpi* newInstance() = 0;
00083
00090 std::string toString() const {
00091 return getType() + "." + getAlgorithm();
00092 }
00093
00094 };
00095
00096 }}
00097
00098 #endif