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

kgpg

  • sources
  • kde-4.14
  • kdeutils
  • kgpg
  • transactions
kgpgexport.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009 Rolf Eike Beer <kde@opensource.sf-tec.de>
3  */
4 
5 /***************************************************************************
6  * *
7  * This program 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  ***************************************************************************/
13 
14 #ifndef KGPGEXPORT_H
15 #define KGPGEXPORT_H
16 
17 #include <QObject>
18 #include <QStringList>
19 
20 #include <KUrl>
21 
22 #include "kgpgtransaction.h"
23 
24 class QProcess;
25 
32 class KGpgExport: public KGpgTransaction {
33  Q_OBJECT
34 
35  KGpgExport(); // = delete C++0x
36  Q_DISABLE_COPY(KGpgExport)
37 public:
46  KGpgExport(QObject *parent, const QStringList &ids, QProcess *outp, const QStringList &options = QStringList(), const bool secret = false);
47 
56  KGpgExport(QObject *parent, const QStringList &ids, KGpgTransaction *outt, const QStringList &options = QStringList(), const bool secret = false);
57 
66  KGpgExport(QObject *parent, const QStringList &ids, const QString &file, const QStringList &options = QStringList(), const bool secret = false);
67 
78  KGpgExport(QObject *parent, const QStringList &ids, const QStringList &options = QStringList(), const bool secret = false);
79 
83  virtual ~KGpgExport();
84 
89  void setKeyId(const QString &id);
94  void setKeyIds(const QStringList &ids);
99  const QStringList &getKeyIds() const;
104  void setOutputProcess(QProcess *outp);
109  void setOutputTransaction(KGpgTransaction *outt);
114  void setOutputFile(const QString &filename);
119  const QString &getOutputFile() const;
124  const QByteArray &getOutputData() const;
125 
126 protected:
127  virtual bool preStart();
128  virtual bool nextLine(const QString &line);
129 
130 private:
131  QStringList m_keyids;
132  QProcess *m_outp;
133  QString m_outf;
134  QByteArray m_data;
135 
136  enum OutputMode {
137  ModeFile = 0,
138  ModeProcess = 1,
139  ModeStdout = 2,
140  ModeTransaction = 3
141  };
142  enum OutputMode m_outputmode;
143 
144  void procSetup(const QStringList &options, const bool secret);
145 };
146 
147 #endif // KGPGEXPORT_H
KGpgExport::setKeyId
void setKeyId(const QString &id)
set key id to export
Definition: kgpgexport.cpp:64
KGpgExport::getKeyIds
const QStringList & getKeyIds() const
return the key ids to export
Definition: kgpgexport.cpp:77
kgpgtransaction.h
KGpgExport::getOutputData
const QByteArray & getOutputData() const
return the data read from standard output
Definition: kgpgexport.cpp:117
QByteArray
KGpgExport::getOutputFile
const QString & getOutputFile() const
return the output filename currently set
Definition: kgpgexport.cpp:111
KGpgExport
export one or more keys from keyring
Definition: kgpgexport.h:32
KGpgExport::nextLine
virtual bool nextLine(const QString &line)
Called for every line the gpg process writes.
Definition: kgpgexport.cpp:169
KGpgExport::~KGpgExport
virtual ~KGpgExport()
destructor
Definition: kgpgexport.cpp:59
QProcess
QObject
KGpgExport::setOutputFile
void setOutputFile(const QString &filename)
set filename to send output to
Definition: kgpgexport.cpp:91
KGpgExport::preStart
virtual bool preStart()
Called before the gpg process is started.
Definition: kgpgexport.cpp:123
KGpgExport::setKeyIds
void setKeyIds(const QStringList &ids)
set key ids to export
Definition: kgpgexport.cpp:71
QString
QStringList
KGpgExport::setOutputTransaction
void setOutputTransaction(KGpgTransaction *outt)
set the transaction the output is sent to
Definition: kgpgexport.cpp:102
KGpgTransaction
Process one GnuPG operation.
Definition: kgpgtransaction.h:44
QObject::parent
QObject * parent() const
KGpgExport::setOutputProcess
void setOutputProcess(QProcess *outp)
set the process the output is sent to
Definition: kgpgexport.cpp:83
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:42:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kgpg

Skip menu "kgpg"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • sweeper

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