• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • arts
 

arts

  • arts
  • kde
kioinputstream_impl.h
1  /*
2 
3  Copyright (C) 2001 Nikolas Zimmermann <wildfox@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 
20  */
21 
22 #ifndef KIOINPUTSTREAM_IMPL
23 #define KIOINPUTSTREAM_IMPL
24 
25 #include <tqobject.h>
26 #include <tqcstring.h>
27 #include <kio/jobclasses.h>
28 #include <kurl.h>
29 #include "artskde.h"
30 #include "stdsynthmodule.h"
31 
32 namespace Arts {
33 
34 class KIOInputStream_impl : public TQObject, virtual public KIOInputStream_skel,
35  virtual public InputStream_skel,
36  virtual public StdSynthModule
37 {
38 Q_OBJECT
39 public:
40  KIOInputStream_impl();
41  ~KIOInputStream_impl();
42 
43  void streamStart();
44  void streamEnd();
45 
46  bool eof();
47  bool seekOk();
48  long size();
49  long seek(long);
50 
51  bool openURL(const std::string& url);
52 
53  void processQueue();
54  void request_outdata(DataPacket<mcopbyte> *packet);
55 
56  long bufferPackets() { return m_packetBuffer; }
57  void bufferPackets(long i) { m_packetBuffer = i; }
58 
59  long packetSize() { return m_packetSize; }
60 
61 signals:
62  void mimeTypeFound(const TQString & mimetype);
63 
64 private slots:
65  void slotData(KIO::Job *, const TQByteArray &);
66  void slotResult(KIO::Job *);
67  void slotScanMimeType(KIO::Job *, const TQString &mimetype);
68  void slotTotalSize(KIO::Job *, KIO::filesize_t size);
69 
70 private:
71  KURL m_url;
72  KIO::TransferJob *m_job;
73  TQByteArray m_data;
74  bool m_finished;
75  bool m_firstBuffer;
76  bool m_streamStarted;
77  bool m_streamSuspended;
78  bool m_streamPulled;
79 
80  unsigned int m_packetBuffer;
81  const unsigned int m_packetSize;
82  KIO::filesize_t m_size;
83 
84  static const unsigned int PACKET_COUNT;
85 };
86 
87 }
88 
89 #endif
KURL
Arts
Definition: kartsdispatcher.h:29

arts

Skip menu "arts"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for arts by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |