Mercurial > trustbridge
diff ui/certificate.h @ 1101:2b3526ef2d69
(issue111) Keep manually changed certificates in the manually changed list.
This invents the new property "active certificate"
an inactive certificate is a certificate that is displayed but
has no impact on the store.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 15 Sep 2014 13:55:47 +0200 |
parents | da00099aef5d |
children | 9bb9932bb819 |
line wrap: on
line diff
--- a/ui/certificate.h Mon Sep 15 12:50:26 2014 +0200 +++ b/ui/certificate.h Mon Sep 15 13:55:47 2014 +0200 @@ -136,6 +136,21 @@ friend inline bool operator==(const Certificate& lhs, const Certificate& rhs) { return lhs.base64Line() == rhs.base64Line(); } + + /** @brief Wether or not the certificate is Active. + * + * This property is mainly for the manually changed certificate list. + * A certificate is active if it should be counted as change in a list + * and if it should be written to a certificate store. + * + * An inctive certificate will only be shown in the manual changes list + * but not counted as a changed or changed in the certificate list. */ + bool isActive() const { return mActive; } + + /** @brief set the active state of a certificate. + * + * See isActive() for details. */ + void setActive(bool active) { mActive = active; } private: /** @brief Helper function to parse the details of a certificate **/ void parseDetails(const QByteArray& cert); @@ -143,6 +158,7 @@ bool mValid; /* bool mInstCert; */ bool mEditable; + bool mActive; QString mSubjectOU, mSubjectCN,