• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kleopatra

  • sources
  • kde-4.14
  • kdepim
  • kleopatra
  • commands
importcertificatescommand_p.h
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  commands/importcertificatescommand_p.h
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2007, 2008 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef __KLEOPATRA_IMPORTCERTIFICATESCOMMAND_P_H__
34 #define __KLEOPATRA_IMPORTCERTIFICATESCOMMAND_P_H__
35 
36 #include "command_p.h"
37 #include "importcertificatescommand.h"
38 
39 #include <gpgme++/global.h>
40 
41 #include <vector>
42 #include <map>
43 
44 namespace GpgME {
45  class ImportResult;
46  class Error;
47 }
48 
49 namespace Kleo {
50  class AbstractImportJob;
51 }
52 
53 class QByteArray;
54 
55 class Kleo::ImportCertificatesCommand::Private : public Command::Private {
56  friend class ::Kleo::ImportCertificatesCommand;
57  Kleo::ImportCertificatesCommand * q_func() const { return static_cast<ImportCertificatesCommand*>( q ); }
58 public:
59  explicit Private( ImportCertificatesCommand * qq, KeyListController * c );
60  ~Private();
61 
62  void setWaitForMoreJobs( bool waiting );
63 
64  void startImport( GpgME::Protocol proto, const QByteArray & data, const QString & id=QString() );
65  void startImport( GpgME::Protocol proto, const std::vector<GpgME::Key> & keys, const QString & id=QString() );
66  void importResult( const GpgME::ImportResult & );
67  void importResult( const GpgME::ImportResult &, const QString & );
68 
69  void showError( QWidget * parent, const GpgME::Error & error, const QString & id=QString() );
70  void showError( const GpgME::Error & error, const QString & id=QString() );
71 
72  void showDetails( QWidget * parent, const std::vector<GpgME::ImportResult> & results, const QStringList & ids );
73  void showDetails( const std::vector<GpgME::ImportResult> & results, const QStringList & ids );
74 
75  void setImportResultProxyModel( const std::vector<GpgME::ImportResult> & results, const QStringList & ids );
76 
77 private:
78  void tryToFinish();
79 
80 private:
81  bool waitForMoreJobs;
82  std::vector<GpgME::Protocol> nonWorkingProtocols;
83  std::map<QObject*,QString> idsByJob;
84  std::vector<Kleo::AbstractImportJob*> jobs;
85  std::vector<GpgME::ImportResult> results;
86  QStringList ids;
87 };
88 
89 inline Kleo::ImportCertificatesCommand::Private * Kleo::ImportCertificatesCommand::d_func() { return static_cast<Private*>(d.get()); }
90 inline const Kleo::ImportCertificatesCommand::Private * Kleo::ImportCertificatesCommand::d_func() const { return static_cast<const Private*>(d.get()); }
91 
92 inline Kleo::ImportCertificatesCommand::ImportCertificatesCommand( Private * pp ) : Command( pp ) {}
93 inline Kleo::ImportCertificatesCommand::ImportCertificatesCommand( QAbstractItemView * v, Private * pp ) : Command( v, pp ) {}
94 
95 #endif /* __KLEOPATRA_IMPORTCERTIFICATESCOMMAND_P_H__ */
96 
QWidget
Kleo::ImportCertificatesCommand::Private::showError
void showError(QWidget *parent, const GpgME::Error &error, const QString &id=QString())
QAbstractItemView
Kleo::Command::Private
Definition: commands/command_p.h:52
QByteArray
Kleo::ImportCertificatesCommand::Private
Definition: importcertificatescommand_p.h:55
Kleo::ImportCertificatesCommand::Private::showDetails
void showDetails(QWidget *parent, const std::vector< GpgME::ImportResult > &results, const QStringList &ids)
Kleo::ImportCertificatesCommand::ImportCertificatesCommand
ImportCertificatesCommand(KeyListController *parent)
Definition: importcertificatescommand.cpp:180
Kleo::KeyListController
Definition: keylistcontroller.h:55
Kleo::ImportCertificatesCommand::Private::startImport
void startImport(GpgME::Protocol proto, const QByteArray &data, const QString &id=QString())
Definition: importcertificatescommand.cpp:389
Kleo::ImportCertificatesCommand
Definition: importcertificatescommand.h:42
importcertificatescommand.h
Kleo::Command::d
kdtools::pimpl_ptr< Private > d
Definition: commands/command.h:129
Kleo::Command::Private::q
Command *const q
Definition: commands/command_p.h:55
d
#define d
Definition: adduseridcommand.cpp:89
Kleo::ImportCertificatesCommand::Private::setImportResultProxyModel
void setImportResultProxyModel(const std::vector< GpgME::ImportResult > &results, const QStringList &ids)
Definition: importcertificatescommand.cpp:214
Kleo::ImportCertificatesCommand::Private::Private
Private(ImportCertificatesCommand *qq, KeyListController *c)
Definition: importcertificatescommand.cpp:162
Kleo::Command::Private::keys
std::vector< GpgME::Key > keys() const
Definition: commands/command_p.h:70
kdtools::pimpl_ptr::get
T * get()
Definition: pimpl_ptr.h:39
QString
QStringList
command_p.h
Kleo::ImportCertificatesCommand::Private::~Private
~Private()
Definition: importcertificatescommand.cpp:174
Kleo::ImportCertificatesCommand::d_func
Private * d_func()
Definition: importcertificatescommand_p.h:89
QObject::parent
QObject * parent() const
Kleo::ImportCertificatesCommand::Private::importResult
void importResult(const GpgME::ImportResult &)
Kleo::Command
Definition: commands/command.h:58
Kleo::Command::Private::error
void error(const QString &text, const QString &caption=QString(), KMessageBox::Options options=KMessageBox::Notify) const
Definition: commands/command_p.h:83
Kleo::ImportCertificatesCommand::Private::setWaitForMoreJobs
void setWaitForMoreJobs(bool waiting)
Definition: importcertificatescommand.cpp:340
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:33:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal