verificationresult.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __GPGMEPP_VERIFICATIONRESULT_H__
00022 #define __GPGMEPP_VERIFICATIONRESULT_H__
00023
00024 #include <gpgmepp/gpgmefw.h>
00025 #include <gpgmepp/result.h>
00026
00027 #include <time.h>
00028
00029 #include <vector>
00030
00031 namespace GpgME {
00032
00033 class Error;
00034 class Signature;
00035
00036 class VerificationResult : public Result {
00037 public:
00038 VerificationResult( gpgme_ctx_t ctx=0, int error=0 );
00039 explicit VerificationResult( const Error & err );
00040 VerificationResult( const VerificationResult & other );
00041 ~VerificationResult();
00042
00043 const VerificationResult & operator=( const VerificationResult & other );
00044
00045 bool isNull() const;
00046
00047 Signature signature( unsigned int index ) const;
00048 std::vector<Signature> signatures() const;
00049
00050 class Private;
00051 private:
00052 Private * d;
00053 };
00054
00055 class Signature {
00056 friend class VerificationResult;
00057 Signature( VerificationResult::Private * parent, unsigned int index );
00058 public:
00059 class Notation;
00060
00061 Signature();
00062 Signature( const Signature & other );
00063 ~Signature();
00064
00065 const Signature & operator=( const Signature & other );
00066
00067 bool isNull() const;
00068
00069
00070 enum Summary {
00071 None = 0x000,
00072 Valid = 0x001,
00073 Green = 0x002,
00074 Red = 0x004,
00075 KeyRevoked = 0x008,
00076 KeyExpired = 0x010,
00077 SigExpired = 0x020,
00078 KeyMissing = 0x040,
00079 CrlMissing = 0x080,
00080 CrlTooOld = 0x100,
00081 BadPolicy = 0x200,
00082 SysError = 0x400
00083 };
00084 Summary summary() const;
00085
00086 const char * fingerprint() const;
00087
00088 Error status() const;
00089
00090 time_t creationTime() const;
00091 time_t expirationTime() const;
00092 bool neverExpires() const;
00093
00094 bool wrongKeyUsage() const;
00095
00096 enum Validity {
00097 Unknown, Undefined, Never, Marginal, Full, Ultimate
00098 };
00099 Validity validity() const;
00100 char validityAsString() const;
00101 Error nonValidityReason() const;
00102
00103 Notation notation( unsigned int index ) const;
00104 std::vector<Notation> notations() const;
00105
00106 private:
00107 VerificationResult::Private * d;
00108 unsigned int idx;
00109 };
00110
00111 class Signature::Notation {
00112 friend class Signature;
00113 Notation( VerificationResult::Private * parent, unsigned int sindex, unsigned int nindex );
00114 public:
00115 Notation();
00116 Notation( const Notation & other );
00117 ~Notation();
00118
00119 const Notation & operator=( const Notation & other );
00120
00121 bool isNull() const;
00122
00123 const char * name() const;
00124 const char * value() const;
00125
00126 private:
00127 VerificationResult::Private * d;
00128 unsigned int sidx;
00129 unsigned int nidx;
00130 };
00131
00132 }
00133
00134 #endif
This file is part of the documentation for libkdenetwork Library Version 3.3.0.