• 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
gpgproc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007 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 #ifndef GPGPROC_H
14 #define GPGPROC_H
15 
16 #include <QString>
17 #include <QStringList>
18 
19 #include "klinebufferedprocess.h"
20 
36 class GPGProc : public KLineBufferedProcess
37 {
38  Q_OBJECT
39 
40 public:
46  explicit GPGProc(QObject *parent = 0, const QString &binary = QString());
47 
51  ~GPGProc();
52 
56  void start();
57 
71  int readln(QString &line, const bool colons = false);
72 
85  int readln(QStringList &l);
86 
94  static QString recode(QByteArray a, const bool colons = true, const QByteArray &codec = QByteArray());
95 
104  bool setCodec(const QByteArray &codec);
105 
110  void resetProcess(const QString &binary = QString());
111 
120  static int gpgVersion(const QString &vstr);
129  static QString gpgVersionString(const QString &binary);
138  static QString getGpgHome(const QString &binary);
139 
145  static QString getGpgStartupError(const QString &binary);
146 signals:
152  void readReady();
153 
158  void processExited();
159 
160 protected slots:
161  void finished();
162  void received();
163 
164 private:
165  QByteArray m_codec;
166 };
167 
168 #endif // GPGPROC_H
GPGProc
A interface to GnuPG handling UTF8 recoding correctly.
Definition: gpgproc.h:36
QByteArray
GPGProc::readln
int readln(QString &line, const bool colons=false)
Reads a line of text (excluding '\n').
Definition: gpgproc.cpp:203
GPGProc::getGpgHome
static QString getGpgHome(const QString &binary)
find users GnuPG directory
Definition: gpgproc.cpp:336
GPGProc::finished
void finished()
Definition: gpgproc.cpp:198
GPGProc::~GPGProc
~GPGProc()
Destructor.
Definition: gpgproc.cpp:160
GPGProc::processExited
void processExited()
Emitted when the process has finished.
GPGProc::start
void start()
Starts the process.
Definition: gpgproc.cpp:185
GPGProc::setCodec
bool setCodec(const QByteArray &codec)
sets the codec used to translate the incoming data
Definition: gpgproc.cpp:277
GPGProc::getGpgStartupError
static QString getGpgStartupError(const QString &binary)
run GnuPG and check if it complains about anything
Definition: gpgproc.cpp:317
GPGProc::readReady
void readReady()
Emitted when the process is ready for reading.
QObject
GPGProc::gpgVersion
static int gpgVersion(const QString &vstr)
parse GnuPG version string and return version as number
Definition: gpgproc.cpp:288
KLineBufferedProcess
Read output of a process split into lines.
Definition: klinebufferedprocess.h:56
QString
QStringList
GPGProc::received
void received()
Definition: gpgproc.cpp:193
GPGProc::recode
static QString recode(QByteArray a, const bool colons=true, const QByteArray &codec=QByteArray())
Recode a line from GnuPG encoding to UTF8.
Definition: gpgproc.cpp:238
klinebufferedprocess.h
GPGProc::resetProcess
void resetProcess(const QString &binary=QString())
Reset the class to the state it had right after creation.
Definition: gpgproc.cpp:165
GPGProc::gpgVersionString
static QString gpgVersionString(const QString &binary)
get the GnuPG version string of the given binary
Definition: gpgproc.cpp:300
GPGProc::GPGProc
GPGProc(QObject *parent=0, const QString &binary=QString())
Constructor.
Definition: gpgproc.cpp:154
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