kwave  18.07.70
ID3_QIODeviceWriter.h
Go to the documentation of this file.
1 /*************************************************************************
2  ID3_QIODeviceWriter.h - Adapter between QIODevice and ID3_Writer
3  -------------------
4  begin : Mon May 28 2012
5  copyright : (C) 2012 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef ID3_QIODEVICE_WRITER_H
19 #define ID3_QIODEVICE_WRITER_H
20 
21 #include "config.h"
22 
23 #include <id3/globals.h>
24 #include <id3/writer.h>
25 
26 class QIODevice;
27 
28 namespace Kwave
29 {
34  class ID3_QIODeviceWriter: public ID3_Writer
35  {
36  public:
37 
39  explicit ID3_QIODeviceWriter(QIODevice &dest);
40 
42  virtual ~ID3_QIODeviceWriter();
43 
45  virtual void close();
46 
48  virtual void flush();
49 
51  virtual ID3_Writer::pos_type getBeg();
52 
54  virtual ID3_Writer::pos_type getEnd();
55 
57  virtual ID3_Writer::pos_type getCur();
58 
60  virtual ID3_Writer::size_type getSize();
61 
63  virtual ID3_Writer::size_type getMaxSize();
64 
69  virtual ID3_Writer::size_type writeChars(
70  const ID3_Writer::char_type buf[], ID3_Writer::size_type len);
71  virtual ID3_Writer::size_type writeChars(
72  const char buf[], ID3_Writer::size_type len);
73 
75  virtual bool atEnd();
76 
77  private:
78 
80  QIODevice &m_dest;
81 
83  ID3_Writer::size_type m_written;
84  };
85 }
86 
87 #endif /* ID3_QIODEVICE_WRITER_H */
88 
89 //***************************************************************************
90 //***************************************************************************
ID3_Writer::size_type m_written
virtual ID3_Writer::size_type getMaxSize()
Definition: App.h:33
virtual ID3_Writer::size_type getSize()
virtual ID3_Writer::size_type writeChars(const ID3_Writer::char_type buf[], ID3_Writer::size_type len)
virtual ID3_Writer::pos_type getCur()
virtual ID3_Writer::pos_type getEnd()
virtual ID3_Writer::pos_type getBeg()