libkdenetwork Library API Documentation

importresult.h

00001 /* importresult.h - wraps a gpgme import 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_IMPORTRESULT_H__
00022 #define __GPGMEPP_IMPORTRESULT_H__
00023 
00024 #include <gpgmepp/gpgmefw.h>
00025 #include <gpgmepp/result.h>
00026 
00027 #include <vector>
00028 
00029 namespace GpgME {
00030 
00031   class Error;
00032   class Import;
00033 
00034   class ImportResult : public Result {
00035   public:
00036     ImportResult( gpgme_ctx_t ctx=0, int error=0 );
00037     explicit ImportResult( const Error & error );
00038     ImportResult( const ImportResult & other );
00039     ~ImportResult();
00040 
00041     const ImportResult & operator=( const ImportResult & other );
00042 
00043     bool isNull() const;
00044 
00045     int numConsidered() const;
00046     int numKeysWithoutUserID() const;
00047     int numImported() const;
00048     int numRSAImported() const;
00049     int numUnchanged() const;
00050 
00051     int newUserIDs() const;
00052     int newSubkeys() const;
00053     int newSignatures() const;
00054     int newRevocations() const;
00055 
00056     int numSecretKeysConsidered() const;
00057     int numSecretKeysImported() const;
00058     int numSecretKeysUnchanged() const;
00059 
00060     int notImported() const;
00061 
00062     Import import( unsigned int idx ) const;
00063     std::vector<Import> imports() const;
00064 
00065     class Private;
00066   private:
00067     Private * d;
00068   };
00069 
00070   class Import {
00071     friend class ImportResult;
00072     Import( ImportResult::Private * parent, unsigned int idx );
00073   public:
00074     Import();
00075     Import( const Import & other );
00076     ~Import();
00077 
00078     const Import & operator=( const Import & other );
00079 
00080     bool isNull() const;
00081 
00082     const char * fingerprint() const;
00083     Error error() const;
00084 
00085     enum Status {
00086       Unknown = 0x0,
00087       NewKey = 0x1,
00088       NewUserIDs = 0x2,
00089       NewSignatures = 0x4,
00090       NewSubkeys = 0x8,
00091       ContainedSecretKey = 0x10
00092     };
00093     Status status() const;
00094 
00095   private:
00096     ImportResult::Private * d;
00097     unsigned int idx;
00098   };
00099 
00100 }
00101 
00102 #endif // __GPGMEPP_IMPORTRESULT_H__
KDE Logo
This file is part of the documentation for libkdenetwork Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:44:05 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003