asffile.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 2005-2007 by Lukáš Lalinský
3  email : lalinsky@gmail.com
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_ASFFILE_H
27 #define TAGLIB_ASFFILE_H
28 
29 #include "tag.h"
30 #include "tfile.h"
31 #include "taglib_export.h"
32 #include "asfproperties.h"
33 #include "asftag.h"
34 
35 namespace TagLib {
36 
38  namespace ASF {
39 
47  {
48  public:
49 
61  File(FileName file, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
62 
74  File(IOStream *stream, bool readProperties = true, Properties::ReadStyle propertiesStyle = Properties::Average);
75 
79  virtual ~File();
80 
91  virtual Tag *tag() const;
92 
96  PropertyMap properties() const;
97 
102  void removeUnsupportedProperties(const StringList &properties);
103 
107  PropertyMap setProperties(const PropertyMap &);
108 
112  virtual Properties *audioProperties() const;
113 
119  virtual bool save();
120 
121  private:
122 
123  int readBYTE(bool *ok = 0);
124  int readWORD(bool *ok = 0);
125  unsigned int readDWORD(bool *ok = 0);
126  long long readQWORD(bool *ok = 0);
127  static ByteVector renderString(const String &str, bool includeLength = false);
128  String readString(int len);
129  void read(bool readProperties, Properties::ReadStyle propertiesStyle);
130 
131  friend class Attribute;
132  friend class Picture;
133 
134  class BaseObject;
135  class UnknownObject;
136  class FilePropertiesObject;
137  class StreamPropertiesObject;
138  class ContentDescriptionObject;
139  class ExtendedContentDescriptionObject;
140  class HeaderExtensionObject;
141  class MetadataObject;
142  class MetadataLibraryObject;
143 
144  class FilePrivate;
145  FilePrivate *d;
146  };
147 
148  }
149 
150 }
151 
152 #endif
A map for format-independent <key,valuelist> tag representations.
Definition: tpropertymap.h:104
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:53
A file class with some useful methods for tag manipulation.
Definition: tfile.h:50
A wide string class suitable for unicode.
Definition: tstring.h:78
Read more of the file and make better values guesses.
Definition: audioproperties.h:57
A byte vector.
Definition: tbytevector.h:45
A list of strings.
Definition: tstringlist.h:45
An ASF attached picture interface implementation.
Definition: asfpicture.h:49
Definition: asftag.h:42
ReadStyle
Definition: audioproperties.h:53
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
Definition: asffile.h:46
const char * FileName
Definition: tiostream.h:48
Definition: asfattribute.h:43
An implementation of ASF audio properties.
Definition: asfproperties.h:38