• 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
kdpipeiodevice.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 Klarälvdalens Datakonsult AB
3 
4  KDPipeIODevice is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  KDPipeIODevice is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with KDPipeIODevice; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef __KDTOOLSCORE_KDPIPEIODEVICE_H__
21 #define __KDTOOLSCORE_KDPIPEIODEVICE_H__
22 
23 #include <QIODevice>
24 
25 #include <utility>
26 
27 //#include "checker.h"
28 
29 class KDPipeIODevice : public QIODevice {
30  Q_OBJECT
31  //KDAB_MAKE_CHECKABLE( KDPipeIODevice )
32 public:
33  enum DebugLevel {
34  NoDebug,
35  Debug
36  };
37 
38  static DebugLevel debugLevel();
39  static void setDebugLevel( DebugLevel level );
40 
41  explicit KDPipeIODevice( QObject * parent=0 );
42  explicit KDPipeIODevice( int fd, OpenMode=ReadOnly, QObject * parent=0 );
43  explicit KDPipeIODevice( Qt::HANDLE handle, OpenMode=ReadOnly, QObject * parent=0 );
44  ~KDPipeIODevice();
45 
46  static std::pair<KDPipeIODevice*, KDPipeIODevice*> makePairOfConnectedPipes();
47 
48  bool open( int fd, OpenMode mode=ReadOnly );
49  bool open( Qt::HANDLE handle, OpenMode mode=ReadOnly );
50 
51  Qt::HANDLE handle() const;
52  int descriptor() const;
53 
54  bool readWouldBlock() const;
55  bool writeWouldBlock() const;
56 
57  /* reimp */ qint64 bytesAvailable() const;
58  /* reimp */ qint64 bytesToWrite() const;
59  /* reimp */ bool canReadLine() const;
60  /* reimp */ void close();
61  /* reimp */ bool isSequential() const;
62  /* reimp */ bool atEnd() const;
63 
64  /* reimp */ bool waitForBytesWritten( int msecs );
65  /* reimp */ bool waitForReadyRead( int msecs );
66 
67 protected:
68  /* reimp */ qint64 readData( char * data, qint64 maxSize );
69  /* reimp */ qint64 writeData( const char * data, qint64 maxSize );
70 
71 private:
72  using QIODevice::open;
73 
74 private:
75  class Private;
76  Private * d;
77 };
78 
79 #endif /* __KDTOOLSCORE_KDPIPEIODEVICE_H__ */
80 
KDPipeIODevice::waitForBytesWritten
bool waitForBytesWritten(int msecs)
Definition: kdpipeiodevice.cpp:480
KDPipeIODevice::writeData
qint64 writeData(const char *data, qint64 maxSize)
Definition: kdpipeiodevice.cpp:609
KDPipeIODevice::bytesToWrite
qint64 bytesToWrite() const
Definition: kdpipeiodevice.cpp:432
KDPipeIODevice::debugLevel
static DebugLevel debugLevel()
Definition: kdpipeiodevice.cpp:235
KDPipeIODevice::readWouldBlock
bool readWouldBlock() const
Definition: kdpipeiodevice.cpp:519
KDPipeIODevice::waitForReadyRead
bool waitForReadyRead(int msecs)
Definition: kdpipeiodevice.cpp:491
KDPipeIODevice::makePairOfConnectedPipes
static std::pair< KDPipeIODevice *, KDPipeIODevice * > makePairOfConnectedPipes()
Definition: kdpipeiodevice.cpp:911
KDPipeIODevice::readData
qint64 readData(char *data, qint64 maxSize)
Definition: kdpipeiodevice.cpp:534
KDPipeIODevice::setDebugLevel
static void setDebugLevel(DebugLevel level)
Definition: kdpipeiodevice.cpp:240
KDPipeIODevice::descriptor
int descriptor() const
Definition: kdpipeiodevice.cpp:408
KDPipeIODevice::isSequential
bool isSequential() const
Definition: kdpipeiodevice.cpp:451
KDPipeIODevice::writeWouldBlock
bool writeWouldBlock() const
Definition: kdpipeiodevice.cpp:526
d
#define d
Definition: adduseridcommand.cpp:90
KDPipeIODevice::handle
Qt::HANDLE handle() const
Definition: kdpipeiodevice.cpp:413
KDPipeIODevice::Debug
Definition: kdpipeiodevice.h:35
KDPipeIODevice::~KDPipeIODevice
~KDPipeIODevice()
Definition: kdpipeiodevice.cpp:280
KDPipeIODevice::DebugLevel
DebugLevel
Definition: kdpipeiodevice.h:33
KDPipeIODevice
Definition: kdpipeiodevice.h:29
KDPipeIODevice::open
bool open(int fd, OpenMode mode=ReadOnly)
Definition: kdpipeiodevice.cpp:287
KDPipeIODevice::atEnd
bool atEnd() const
Definition: kdpipeiodevice.cpp:455
KDPipeIODevice::bytesAvailable
qint64 bytesAvailable() const
Definition: kdpipeiodevice.cpp:417
KDPipeIODevice::NoDebug
Definition: kdpipeiodevice.h:34
KDPipeIODevice::close
void close()
Definition: kdpipeiodevice.cpp:680
QIODevice
KDPipeIODevice::KDPipeIODevice
KDPipeIODevice(QObject *parent=0)
Definition: kdpipeiodevice.cpp:260
KDPipeIODevice::canReadLine
bool canReadLine() const
Definition: kdpipeiodevice.cpp:441
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