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

arts

kioinputstream_impl.h

00001     /*
00002 
00003     Copyright (C) 2001 Nikolas Zimmermann <wildfox@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009   
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 
00020     */
00021 
00022 #ifndef KIOINPUTSTREAM_IMPL
00023 #define KIOINPUTSTREAM_IMPL
00024 
00025 #include <tqobject.h>
00026 #include <tqcstring.h>
00027 #include <tdeio/jobclasses.h>
00028 #include <kurl.h>
00029 #include "artskde.h"
00030 #include "stdsynthmodule.h" 
00031 
00032 namespace Arts {
00033 
00034 class TDEIOInputStream_impl : public TQObject, virtual public TDEIOInputStream_skel, 
00035                         virtual public InputStream_skel,
00036                         virtual public StdSynthModule
00037 {
00038 Q_OBJECT
00039 public:
00040     TDEIOInputStream_impl();
00041     ~TDEIOInputStream_impl();
00042     
00043     void streamStart(); 
00044     void streamEnd();
00045 
00046     bool eof();
00047     bool seekOk();
00048     long size();
00049     long seek(long);
00050 
00051     bool openURL(const std::string& url);
00052 
00053     void processQueue();
00054     void request_outdata(DataPacket<mcopbyte> *packet);
00055 
00056     long bufferPackets() { return m_packetBuffer; }
00057     void bufferPackets(long i) { m_packetBuffer = i; }
00058 
00059     long packetSize() { return m_packetSize; }
00060 
00061 signals:
00062     void mimeTypeFound(const TQString & mimetype);
00063     
00064 private slots:
00065     void slotData(TDEIO::Job *, const TQByteArray &);
00066     void slotResult(TDEIO::Job *);
00067     void slotScanMimeType(TDEIO::Job *, const TQString &mimetype);
00068     void slotTotalSize(TDEIO::Job *, TDEIO::filesize_t size);
00069 
00070 private:
00071     KURL m_url;
00072     TDEIO::TransferJob *m_job;
00073     TQByteArray m_data;
00074     bool m_finished;
00075     bool m_firstBuffer;
00076     bool m_streamStarted;
00077     bool m_streamSuspended;
00078     bool m_streamPulled;
00079 
00080     unsigned int m_packetBuffer;
00081     const unsigned int m_packetSize;
00082     TDEIO::filesize_t m_size;
00083     
00084     static const unsigned int PACKET_COUNT;
00085 };
00086 
00087 }
00088 
00089 #endif

arts

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

arts

Skip menu "arts"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for arts by doxygen 1.6.3
This website is maintained by Timothy Pearson.