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

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • utils
iodevicelogger.h
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  iodevicelogger.h
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 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_IODEVICELOGGER_H__
34 #define __KLEOPATRA_IODEVICELOGGER_H__
35 
36 #include <QIODevice>
37 
38 #include <utils/pimpl_ptr.h>
39 
40 #include <boost/shared_ptr.hpp>
41 
42 namespace Kleo {
43 
44  class IODeviceLogger : public QIODevice {
45  Q_OBJECT
46  public:
47  explicit IODeviceLogger( const boost::shared_ptr<QIODevice>& iod, QObject* parent = 0 );
48  ~IODeviceLogger();
49 
50  void setWriteLogDevice( const boost::shared_ptr<QIODevice>& dev );
51  void setReadLogDevice( const boost::shared_ptr<QIODevice>& dev );
52 
53  /* reimp */ bool atEnd() const;
54  /* reimp */ qint64 bytesAvailable() const;
55  /* reimp */ qint64 bytesToWrite() const;
56  /* reimp */ bool canReadLine() const;
57  /* reimp */ void close();
58  /* reimp */ bool isSequential() const;
59  /* reimp */ bool open( OpenMode mode );
60  /* reimp */ qint64 pos() const;
61  /* reimp */ bool reset();
62  /* reimp */ bool seek( qint64 pos );
63  /* reimp */ qint64 size() const;
64  /* reimp */ bool waitForBytesWritten( int msecs );
65  /* reimp */ bool waitForReadyRead( int msecs );
66 
67  protected:
68  qint64 readData( char* data, qint64 maxSize );
69  qint64 writeData( const char* data, qint64 maxSize );
70  /* reimp */ qint64 readLineData( char* data, qint64 maxSize );
71 
72  private:
73  class Private;
74  kdtools::pimpl_ptr<Private> d;
75  };
76 }
77 
78 #endif // __KLEOPATRA_IODEVICELOGGER_H__
Kleo::IODeviceLogger::readLineData
qint64 readLineData(char *data, qint64 maxSize)
Definition: iodevicelogger.cpp:182
kdtools::pimpl_ptr< Private >
pimpl_ptr.h
Kleo::IODeviceLogger::setWriteLogDevice
void setWriteLogDevice(const boost::shared_ptr< QIODevice > &dev)
Definition: iodevicelogger.cpp:90
Kleo::IODeviceLogger::readData
qint64 readData(char *data, qint64 maxSize)
Definition: iodevicelogger.cpp:166
Kleo::IODeviceLogger::isSequential
bool isSequential() const
Definition: iodevicelogger.cpp:125
Kleo::IODeviceLogger::setReadLogDevice
void setReadLogDevice(const boost::shared_ptr< QIODevice > &dev)
Definition: iodevicelogger.cpp:95
Kleo::IODeviceLogger::close
void close()
Definition: iodevicelogger.cpp:120
Kleo::IODeviceLogger::canReadLine
bool canReadLine() const
Definition: iodevicelogger.cpp:115
Kleo::IODeviceLogger::atEnd
bool atEnd() const
Definition: iodevicelogger.cpp:100
Kleo::IODeviceLogger::bytesAvailable
qint64 bytesAvailable() const
Definition: iodevicelogger.cpp:105
boost::shared_ptr< QIODevice >
d
#define d
Definition: adduseridcommand.cpp:90
Kleo::IODeviceLogger::pos
qint64 pos() const
Definition: iodevicelogger.cpp:136
Kleo::IODeviceLogger::size
qint64 size() const
Definition: iodevicelogger.cpp:151
Kleo::IODeviceLogger::bytesToWrite
qint64 bytesToWrite() const
Definition: iodevicelogger.cpp:110
Kleo::IODeviceLogger::writeData
qint64 writeData(const char *data, qint64 maxSize)
Definition: iodevicelogger.cpp:174
Kleo::IODeviceLogger::waitForReadyRead
bool waitForReadyRead(int msecs)
Definition: iodevicelogger.cpp:161
Kleo::IODeviceLogger
Definition: iodevicelogger.h:44
Kleo::IODeviceLogger::open
bool open(OpenMode mode)
Definition: iodevicelogger.cpp:130
Kleo::IODeviceLogger::reset
bool reset()
Definition: iodevicelogger.cpp:141
Kleo::IODeviceLogger::IODeviceLogger
IODeviceLogger(const boost::shared_ptr< QIODevice > &iod, QObject *parent=0)
Definition: iodevicelogger.cpp:82
Kleo::IODeviceLogger::waitForBytesWritten
bool waitForBytesWritten(int msecs)
Definition: iodevicelogger.cpp:156
QIODevice
Kleo::IODeviceLogger::seek
bool seek(qint64 pos)
Definition: iodevicelogger.cpp:146
Kleo::IODeviceLogger::~IODeviceLogger
~IODeviceLogger()
Definition: iodevicelogger.cpp:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:41 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

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