limal-ca-mgm
CRLReason.hpp
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                     _     _   _   _     __     _                     |
00004 |                    | |   | | | \_/ |   /  \   | |                    |
00005 |                    | |   | | | |_| |  / /\ \  | |                    |
00006 |                    | |__ | | | | | | / ____ \ | |__                  |
00007 |                    |____||_| |_| |_|/ /    \ \|____|                 |
00008 |                                                                      |
00009 |                             ca-mgm library                           |
00010 |                                                                      |
00011 |                                         (C) SUSE Linux Products GmbH |
00012 \----------------------------------------------------------------------/
00013 
00014   File:       CRLReason.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_CRL_REASON_HPP
00023 #define    LIMAL_CA_MGM_CRL_REASON_HPP
00024 
00025 #include  <limal/ca-mgm/config.h>
00026 #include  <limal/ca-mgm/CommonData.hpp>
00027 #include  <blocxx/COWIntrusiveReference.hpp>
00028 
00029 namespace LIMAL_NAMESPACE {
00030 
00031 namespace CA_MGM_NAMESPACE {
00032 
00033         class CRLReasonImpl;
00034 
00035         class CRLReason {
00036         public:
00037 
00038                 CRLReason();
00039 
00047                 CRLReason(const String& reason);
00048                 CRLReason(const CRLReason& reason);
00049                 virtual ~CRLReason();
00050 
00051 #ifndef SWIG
00052 
00053                 CRLReason&
00054                 operator=(const CRLReason& reason);
00055 
00056 #endif
00057 
00065                 void
00066                 setReason(const String& reason);
00067 
00071                 String
00072                 getReason() const;
00073 
00080                 void
00081                 setHoldInstruction(const String& holdInstruction);
00082         
00083                 String
00084                 getHoldInstruction() const;
00085 
00091                 void
00092                 setKeyCompromiseDate(time_t compromiseDate);
00093         
00094                 time_t
00095                 getKeyCompromiseDate() const;
00096         
00097                 String
00098                 getKeyCompromiseDateAsString() const;
00099 
00105                 void
00106                 setCACompromiseDate(time_t compromiseDate);
00107         
00108                 time_t
00109                 getCACompromiseDate() const;
00110         
00111                 String
00112                 getCACompromiseDateAsString() const;
00113 
00114                 virtual bool
00115                 valid() const;
00116         
00117                 virtual blocxx::StringArray
00118                 verify() const;
00119 
00120                 virtual blocxx::StringArray
00121                 dump() const;
00122 
00123         private:
00124                 blocxx::COWIntrusiveReference<CRLReasonImpl> m_impl;
00125        
00126                 blocxx::String
00127                 checkHoldInstruction(const String& hi) const;
00128         
00129                 bool
00130                 checkReason(const String& reason) const;
00131                 
00132         };
00133 
00134 }
00135 }
00136 
00137 #endif // LIMAL_CA_MGM_CRL_REASON_HPP