MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
metaiotaglib.h
Go to the documentation of this file.
1 #ifndef METAIOTAGLIB_H_
2 #define METAIOTAGLIB_H_
3 
4 // libmythmetadata
5 #include "metaio.h"
6 #include "musicmetadata.h"
7 
8 // Taglib
9 #include <tfile.h>
10 
11 using TagLib::File;
12 using TagLib::Tag;
13 using TagLib::String;
14 
20 class META_PUBLIC MetaIOTagLib : public MetaIO
21 {
22  public:
23  MetaIOTagLib(void);
24  virtual ~MetaIOTagLib(void);
25 
26  virtual bool write(const QString &filename, MusicMetadata* mdata) = 0;
27  virtual MusicMetadata* read(const QString &filename) = 0;
28 
29  protected:
30  int getTrackLength(TagLib::File *file);
31  int getTrackLength(const QString &filename);
32  void ReadGenericMetadata(TagLib::Tag *tag, MusicMetadata *metadata);
33  void WriteGenericMetadata(TagLib::Tag *tag, const MusicMetadata *metadata);
34 };
35 
36 #endif
const char * filename
Definition: ioapi.h:135
Definition: metaio.h:17
virtual MusicMetadata * read(const QString &filename)=0
Reads MusicMetadata from a file.
virtual int getTrackLength(const QString &filename)=0
virtual bool write(const QString &filename, MusicMetadata *mdata)=0
Writes all metadata back to a file.
Base for Taglib metadata classes.
Definition: metaiotaglib.h:20