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

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • io
klimitediodevice_p.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries
2  Copyright (C) 2001, 2002, 2007 David Faure <faure@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 
19 #ifndef klimitediodevice_p_h
20 #define klimitediodevice_p_h
21 
22 #include <kdebug.h>
23 #include <QtCore/QIODevice>
31 class KLimitedIODevice : public QIODevice
32 {
33 public:
41  KLimitedIODevice( QIODevice *dev, qint64 start, qint64 length );
42  virtual ~KLimitedIODevice() {}
43 
44  virtual bool isSequential() const;
45 
46  virtual bool open( QIODevice::OpenMode m );
47  virtual void close();
48 
49  virtual qint64 size() const;
50 
51  virtual qint64 readData ( char * data, qint64 maxlen );
52  virtual qint64 writeData ( const char *, qint64 ) { return -1; } // unsupported
53  virtual int putChar( int ) { return -1; } // unsupported
54 
55  //virtual qint64 pos() const { return m_dev->pos() - m_start; }
56  virtual bool seek( qint64 pos );
57  virtual qint64 bytesAvailable() const;
58 private:
59  QIODevice* m_dev;
60  qint64 m_start;
61  qint64 m_length;
62 };
63 
64 #endif
KLimitedIODevice::seek
virtual bool seek(qint64 pos)
Definition: klimitediodevice.cpp:61
qint64
kdebug.h
KLimitedIODevice::readData
virtual qint64 readData(char *data, qint64 maxlen)
Definition: klimitediodevice.cpp:55
KLimitedIODevice::close
virtual void close()
Definition: klimitediodevice.cpp:46
KLimitedIODevice
A readonly device that reads from an underlying device from a given point to another (e...
Definition: klimitediodevice_p.h:31
KLimitedIODevice::putChar
virtual int putChar(int)
Definition: klimitediodevice_p.h:53
KLimitedIODevice::bytesAvailable
virtual qint64 bytesAvailable() const
Definition: klimitediodevice.cpp:72
KLimitedIODevice::writeData
virtual qint64 writeData(const char *, qint64)
Definition: klimitediodevice_p.h:52
KLimitedIODevice::open
virtual bool open(QIODevice::OpenMode m)
Definition: klimitediodevice.cpp:28
KLimitedIODevice::~KLimitedIODevice
virtual ~KLimitedIODevice()
Definition: klimitediodevice_p.h:42
KLimitedIODevice::size
virtual qint64 size() const
Definition: klimitediodevice.cpp:50
QIODevice
KLimitedIODevice::KLimitedIODevice
KLimitedIODevice(QIODevice *dev, qint64 start, qint64 length)
Creates a new KLimitedIODevice.
Definition: klimitediodevice.cpp:21
KLimitedIODevice::isSequential
virtual bool isSequential() const
Definition: klimitediodevice.cpp:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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