mp4atom.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef DO_NOT_DOCUMENT
00029
00030 #ifndef TAGLIB_MP4ATOM_H
00031 #define TAGLIB_MP4ATOM_H
00032
00033 #include "tfile.h"
00034 #include "tlist.h"
00035
00036 namespace TagLib {
00037
00038 namespace MP4 {
00039
00040 class Atom;
00041 typedef TagLib::List<Atom *> AtomList;
00042
00043 enum AtomDataType
00044 {
00045 TypeImplicit = 0,
00046 TypeUTF8 = 1,
00047 TypeUTF16 = 2,
00048 TypeSJIS = 3,
00049 TypeHTML = 6,
00050 TypeXML = 7,
00051 TypeUUID = 8,
00052 TypeISRC = 9,
00053 TypeMI3P = 10,
00054 TypeGIF = 12,
00055 TypeJPEG = 13,
00056 TypePNG = 14,
00057 TypeURL = 15,
00058 TypeDuration = 16,
00059 TypeDateTime = 17,
00060 TypeGenred = 18,
00061 TypeInteger = 21,
00062 TypeRIAAPA = 24,
00063 TypeUPC = 25,
00064 TypeBMP = 27,
00065 TypeUndefined = 255
00066 };
00067
00068 struct AtomData {
00069 AtomData(AtomDataType type, ByteVector data) : type(type), locale(0), data(data) {}
00070 AtomDataType type;
00071 int locale;
00072 ByteVector data;
00073 };
00074
00075 typedef TagLib::List<AtomData> AtomDataList;
00076
00077 class Atom
00078 {
00079 public:
00080 Atom(File *file);
00081 ~Atom();
00082 Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
00083 bool path(AtomList &path, const char *name1, const char *name2 = 0, const char *name3 = 0);
00084 AtomList findall(const char *name, bool recursive = false);
00085 long offset;
00086 long length;
00087 TagLib::ByteVector name;
00088 AtomList children;
00089 private:
00090 static const int numContainers = 11;
00091 static const char *containers[11];
00092 };
00093
00095 class Atoms
00096 {
00097 public:
00098 Atoms(File *file);
00099 ~Atoms();
00100 Atom *find(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
00101 AtomList path(const char *name1, const char *name2 = 0, const char *name3 = 0, const char *name4 = 0);
00102 AtomList atoms;
00103 };
00104
00105 }
00106
00107 }
00108
00109 #endif
00110
00111 #endif