libkdenetwork Library API Documentation

verificationresult.h

00001 /* verificationresult.h - wraps a gpgme verify result 00002 Copyright (C) 2004 Klarälvdalens Datakonsult AB 00003 00004 This file is part of GPGME++. 00005 00006 GPGME++ is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 GPGME++ is distributed in the hope that it will be useful, but 00012 WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with GPGME++; if not, write to the Free Software Foundation, 00018 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. 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 // __GPGMEPP_VERIFICATIONRESULT_H__
KDE Logo
This file is part of the documentation for libkdenetwork Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:18:39 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003