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

kgpg

GPGProc Class Reference

#include <gpgproc.h>

Inheritance diagram for GPGProc:

Inheritance graph
[legend]

List of all members.


Detailed Description

Copyright (C) 2007 Rolf Eike Beer <kde@opensource.sf-tec.de>.

This class handles the GnuPG formatted UTF8 output correctly. GnuPG recodes some characters as \xnn where nn is the hex representation of the character. This can't be fixed up simply when using QString as QString already did it's own UTF8 conversion. Therefore we replace this sequences by their corresponding character so QString will work just fine.

As we know that GnuPG limits it's columns by ':' we skip \x3a. Since this is an ascii character (single byte) the replacement can be done later without problems after the line has been split into pieces.

Author:
Rolf Eike Beer A interface to GnuPG handling UTF8 recoding correctly

Definition at line 35 of file gpgproc.h.


Signals

void processExited (GPGProc *p)
void readReady (GPGProc *p)

Public Member Functions

 GPGProc (QObject *parent=0, const QString &binary=QString())
int readln (QStringList &l)
int readln (QString &line, const bool &colons=false)
void resetProcess (const QString &binary=QString())
void start ()
 ~GPGProc ()

Static Public Member Functions

static QString recode (QByteArray a, const bool colons=true)

Protected Slots

void finished ()
void received ()

Constructor & Destructor Documentation

GPGProc::GPGProc ( QObject *  parent = 0,
const QString &  binary = QString() 
) [explicit]

Constructor.

Copyright (C) 2007 Rolf Eike Beer <kde@opensource.sf-tec.de>.

Parameters:
parent parent object
binary path to GnuPG binary or QString() if the configured one

Definition at line 22 of file gpgproc.cpp.

GPGProc::~GPGProc (  ) 

Destructor.

Definition at line 28 of file gpgproc.cpp.


Member Function Documentation

void GPGProc::finished (  )  [protected, slot]

Definition at line 59 of file gpgproc.cpp.

void GPGProc::processExited ( GPGProc *  p  )  [signal]

Emitted when the process has finished.

Parameters:
p the process that emitted the signal

int GPGProc::readln ( QStringList &  l  ) 

Reads a line of text and splits it into parts.

Use readln() in response to a readReady() signal. You may use it multiple times if more than one line of data is available.

readln() never blocks.

Parameters:
l is used to store the parts of the line that was read.
Returns:
the number of characters read, or -1 if no data is available.

Definition at line 75 of file gpgproc.cpp.

int GPGProc::readln ( QString &  line,
const bool &  colons = false 
)

Reads a line of text (excluding '\n').

Use readln() in response to a readReady() signal. You may use it multiple times if more than one line of data is available.

readln() never blocks.

Parameters:
line is used to store the line that was read.
colons recode also colons
Returns:
the number of characters read, or -1 if no data is available.

Definition at line 64 of file gpgproc.cpp.

void GPGProc::readReady ( GPGProc *  p  )  [signal]

Emitted when the process is ready for reading.

The signal is only emitted if at least one complete line of data is ready.

Parameters:
p the process that emitted the signal

void GPGProc::received (  )  [protected, slot]

Definition at line 54 of file gpgproc.cpp.

QString GPGProc::recode ( QByteArray  a,
const bool  colons = true 
) [static]

Recode a line from GnuPG encoding to UTF8.

Parameters:
a data to recode
colons recode also colons
Returns:
recoded string

Definition at line 99 of file gpgproc.cpp.

void GPGProc::resetProcess ( const QString &  binary = QString()  ) 

Reset the class to the state it had right after creation.

Parameters:
binary path to GnuPG binary or empty string to use the configured one

Definition at line 33 of file gpgproc.cpp.

void GPGProc::start (  ) 

Starts the process.

Definition at line 47 of file gpgproc.cpp.


The documentation for this class was generated from the following files:
  • gpgproc.h
  • gpgproc.cpp

kgpg

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • ktimer
  • kwallet
  • okteta
  • printer-applet
  • superkaramba
  • sweeper
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal