00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | _ _ _ _ __ _ | 00004 | | | | | | \_/ | / \ | | | 00005 | | | | | | |_| | / /\ \ | | | 00006 | | |__ | | | | | | / ____ \ | |__ | 00007 | |____||_| |_| |_|/ / \ \|____| | 00008 | | 00009 | ca-mgm library | 00010 | | 00011 | (C) SUSE Linux Products GmbH | 00012 \----------------------------------------------------------------------/ 00013 00014 File: AuthorityInfoAccessExtension.hpp 00015 00016 Author: <Michael Calmer> <mc@suse.de> 00017 Maintainer: <Michael Calmer> <mc@suse.de> 00018 00019 Purpose: 00020 00021 /-*/ 00022 #ifndef LIMAL_CA_MGM_AUTHORITY_INFO_ACCESS_EXTENSION_HPP 00023 #define LIMAL_CA_MGM_AUTHORITY_INFO_ACCESS_EXTENSION_HPP 00024 00025 #include <limal/ca-mgm/config.h> 00026 #include <limal/ca-mgm/CommonData.hpp> 00027 #include <limal/ca-mgm/LiteralValues.hpp> 00028 #include <limal/ca-mgm/ExtensionBase.hpp> 00029 #include <blocxx/COWIntrusiveReference.hpp> 00030 00031 namespace LIMAL_NAMESPACE { 00032 00033 namespace CA_MGM_NAMESPACE { 00034 00035 class CA; 00036 class CAConfig; 00037 class AuthorityInformationImpl; 00038 class AuthorityInfoAccessExtImpl; 00039 00040 class AuthorityInformation { 00041 00042 public: 00046 AuthorityInformation(); 00047 00062 AuthorityInformation(const String &accessOID, 00063 const LiteralValue& location); 00064 00068 AuthorityInformation(const AuthorityInformation& ai); 00069 00073 ~AuthorityInformation(); 00074 00075 #ifndef SWIG 00076 00077 AuthorityInformation& 00078 operator=(const AuthorityInformation& ai); 00079 00080 #endif 00081 00089 void 00090 setAuthorityInformation(const String &accessOID, 00091 const LiteralValue& location); 00092 00096 String 00097 getAccessOID() const; 00098 00102 LiteralValue 00103 getLocation() const; 00104 00110 bool 00111 valid() const; 00112 00120 blocxx::Array<String> 00121 verify() const; 00122 00126 blocxx::Array<String> 00127 dump() const; 00128 00129 #ifndef SWIG 00130 00131 friend bool 00132 operator==(const AuthorityInformation &l, const AuthorityInformation &r); 00133 00134 friend bool 00135 operator<(const AuthorityInformation &l, const AuthorityInformation &r); 00136 00137 #endif 00138 00139 private: 00140 blocxx::COWIntrusiveReference<AuthorityInformationImpl> m_impl; 00141 00142 }; 00143 00161 class AuthorityInfoAccessExt : public ExtensionBase { 00162 public: 00163 00167 AuthorityInfoAccessExt(); 00168 00169 AuthorityInfoAccessExt(const AuthorityInfoAccessExt& extension); 00170 00178 AuthorityInfoAccessExt(CAConfig* caConfig, Type type); 00179 00180 virtual ~AuthorityInfoAccessExt(); 00181 00182 #ifndef SWIG 00183 00184 AuthorityInfoAccessExt& 00185 operator=(const AuthorityInfoAccessExt& extension); 00186 00187 #endif 00188 00192 void 00193 setAuthorityInformation(const blocxx::List<AuthorityInformation>& infolist); 00194 00198 blocxx::List<AuthorityInformation> 00199 getAuthorityInformation() const; 00200 00207 virtual void 00208 commit2Config(CA& ca, Type type) const; 00209 00215 virtual bool 00216 valid() const; 00217 00225 virtual blocxx::StringArray 00226 verify() const; 00227 00231 virtual blocxx::StringArray 00232 dump() const; 00233 00234 private: 00235 blocxx::COWIntrusiveReference<AuthorityInfoAccessExtImpl> m_impl; 00236 00237 }; 00238 00239 } 00240 } 00241 00242 #endif // LIMAL_CA_MGM_AUTHORITY_INFO_ACCESS_EXTENSION_HPP