modfilebase.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2011 by Mathias Panzenböck
3  email : grosser.meister.morti@gmx.net
4  ***************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
19  * MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef TAGLIB_MODFILEBASE_H
23 #define TAGLIB_MODFILEBASE_H
24 
25 #include "taglib.h"
26 #include "tfile.h"
27 #include "tstring.h"
28 #include "tlist.h"
29 #include "taglib_export.h"
30 
31 #include <algorithm>
32 
33 namespace TagLib {
34 
35  namespace Mod {
36 
38  {
39  protected:
40  FileBase(FileName file);
41  FileBase(IOStream *stream);
42 
43  void writeString(const String &s, ulong size, char padding = 0);
44  void writeByte(uchar byte);
45  void writeU16L(ushort number);
46  void writeU32L(ulong number);
47  void writeU16B(ushort number);
48  void writeU32B(ulong number);
49 
50  bool readString(String &s, ulong size);
51  bool readByte(uchar &byte);
52  bool readU16L(ushort &number);
53  bool readU32L(ulong &number);
54  bool readU16B(ushort &number);
55  bool readU32B(ulong &number);
56  };
57 
58  }
59 
60 }
61 
62 #endif