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, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_MODFILEBASE_H
27 #define TAGLIB_MODFILEBASE_H
28 
29 #include "taglib.h"
30 #include "tfile.h"
31 #include "tstring.h"
32 #include "tlist.h"
33 #include "taglib_export.h"
34 
35 #include <algorithm>
36 
37 namespace TagLib {
38 
39  namespace Mod {
40 
42  {
43  protected:
44  FileBase(FileName file);
45  FileBase(IOStream *stream);
46 
47  void writeString(const String &s, unsigned long size, char padding = 0);
48  void writeByte(unsigned char byte);
49  void writeU16L(unsigned short number);
50  void writeU32L(unsigned long number);
51  void writeU16B(unsigned short number);
52  void writeU32B(unsigned long number);
53 
54  bool readString(String &s, unsigned long size);
55  bool readByte(unsigned char &byte);
56  bool readU16L(unsigned short &number);
57  bool readU32L(unsigned long &number);
58  bool readU16B(unsigned short &number);
59  bool readU32B(unsigned long &number);
60  };
61 
62  }
63 
64 }
65 
66 #endif
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:62
Definition: modfilebase.h:41
A file class with some useful methods for tag manipulation.
Definition: tfile.h:50
A wide string class suitable for unicode.
Definition: tstring.h:84
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
const char * FileName
Definition: tiostream.h:57