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

KDECore

k3iobuffer.h

Go to the documentation of this file.
00001 /*  -*- C++ -*-
00002  *  Copyright (C) 2003,2005 Thiago Macieira <thiago@kde.org>
00003  *
00004  *
00005  *  Permission is hereby granted, free of charge, to any person obtaining
00006  *  a copy of this software and associated documentation files (the
00007  *  "Software"), to deal in the Software without restriction, including
00008  *  without limitation the rights to use, copy, modify, merge, publish,
00009  *  distribute, sublicense, and/or sell copies of the Software, and to
00010  *  permit persons to whom the Software is furnished to do so, subject to
00011  *  the following conditions:
00012  *
00013  *  The above copyright notice and this permission notice shall be included
00014  *  in all copies or substantial portions of the Software.
00015  *
00016  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00017  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00018  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00019  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00020  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00021  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00022  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00023  */
00024 
00025 #ifndef KIOBUFFER_H
00026 #define KIOBUFFER_H
00027 
00028 #include <kdecore_export.h>
00029 #include <QtCore/QByteArray>
00030 
00031 
00043 class KDECORE_EXPORT KIOBufferBase //krazy:exclude=inline (mainly virtual; simple implementations; KDE3 compat)
00044 {
00045 public:
00049   KIOBufferBase()
00050   { }
00051 
00055   KIOBufferBase(const KIOBufferBase& )
00056   { }
00057 
00061   virtual ~KIOBufferBase()
00062   { }
00063 
00067   KIOBufferBase& operator=(const KIOBufferBase& )
00068   { return *this; }
00069 
00073   virtual bool canReadLine() const = 0;
00074 
00078   virtual qint64 readLine(char* data, qint64 maxlen) = 0;
00079 
00086   virtual qint64 length() const = 0;
00087 
00091   inline bool isEmpty() const
00092   { return length() == 0; }
00093 
00100   virtual qint64 size() const = 0;
00101 
00105   inline bool isFull() const
00106   { return size() != -1 && size() == length(); }
00107 
00115   virtual bool setSize(qint64 size) = 0;
00116 
00124   virtual qint64 feedBuffer(const char *data, qint64 len) = 0;
00125 
00134   virtual qint64 consumeBuffer(char *data, qint64 maxlen, bool discard = true) = 0;
00135 
00139   virtual void clear() = 0;
00140 };
00141 
00142 #endif

KDECore

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs 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