id3lib 3.8.3

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

id3lib_frame.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: id3lib_frame.h,v 1.1 2002/08/10 10:55:47 t1mpy Exp $
3
4 // id3lib: a C++ library for creating and manipulating id3v1/v2 tags
5 // Copyright 1999, 2000 Scott Thomas Haug
6
7 // This library is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU Library General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or (at your
10 // option) any later version.
11 //
12 // This library is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU Library General Public License
18 // along with this library; if not, write to the Free Software Foundation,
19 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 // The id3lib authors encourage improvements and optimisations to be sent to
22 // the id3lib coordinator. Please see the README file for details on where to
23 // send such submissions. See the AUTHORS file for a list of people who have
24 // contributed to id3lib. See the ChangeLog file for a list of changes to
25 // id3lib. These files are distributed with id3lib at
26 // http://download.sourceforge.net/id3lib/
27
28 #ifndef _ID3LIB_FRAME_H_
29 #define _ID3LIB_FRAME_H_
30
31 #include "id3/globals.h" //has <stdlib.h> "id3/sized_types.h"
32
33 class ID3_Field;
34 class ID3_FrameImpl;
35 class ID3_Reader;
36 class ID3_Writer;
37
38 class ID3_CPP_EXPORT ID3_Frame
39 {
40 ID3_FrameImpl* _impl;
41 public:
42
43 class Iterator
44 {
45 public:
46 virtual ID3_Field* GetNext() = 0;
47 };
48
49 class ConstIterator
50 {
51 public:
52 virtual const ID3_Field* GetNext() = 0;
53 };
54
55 public:
56 ID3_Frame(ID3_FrameID id = ID3FID_NOFRAME);
57 ID3_Frame(const ID3_Frame&);
58
59 virtual ~ID3_Frame();
60
61 void Clear();
62
63 bool SetID(ID3_FrameID id);
64 ID3_FrameID GetID() const;
65
66 ID3_Field* GetField(ID3_FieldID name) const;
67
68 size_t NumFields() const;
69
70 const char* GetDescription() const;
71 static const char* GetDescription(ID3_FrameID);
72
73 const char* GetTextID() const;
74
75 ID3_Frame& operator=(const ID3_Frame &);
76 bool HasChanged() const;
77 bool Parse(ID3_Reader&);
78 void Render(ID3_Writer&) const;
79 size_t Size();
80 bool Contains(ID3_FieldID fld) const;
81 bool SetSpec(ID3_V2Spec);
82 ID3_V2Spec GetSpec() const;
83
84 bool SetCompression(bool b);
85 bool GetCompression() const;
86 size_t GetDataSize() const;
87
88 bool SetEncryptionID(uchar id);
89 uchar GetEncryptionID() const;
90
91 bool SetGroupingID(uchar id);
92 uchar GetGroupingID() const;
93
94 Iterator* CreateIterator();
95 ConstIterator* CreateIterator() const;
96
97 // Deprecated
98 ID3_Field& Field(ID3_FieldID name) const;
99 //ID3_Field* GetFieldNum(size_t) const;
100 };
101
102 #endif /* _ID3LIB_FRAME_H_ */
103
ID3_FrameImpl
Definition: frame_impl.h:41
ID3_CPP_EXPORT
#define ID3_CPP_EXPORT
Definition: globals.h:79
ID3FID_NOFRAME
No known frame.
Definition: globals.h:231
ID3_FrameID
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
Definition: globals.h:229
globals.h
uchar
unsigned char uchar
Definition: globals.h:114
ID3_Frame::Iterator
Definition: id3lib_frame.h:43
ID3_Reader
Definition: reader.h:33
ID3_V2Spec
ID3_V2Spec
Definition: globals.h:161
ID3_Frame
The representative class of an id3v2 frame.
Definition: id3lib_frame.h:38
ID3_Field
The representative class of an ID3v2 field.
Definition: field.h:36
ID3_Writer
Definition: writer.h:33
ID3_FieldID
ID3_FieldID
Enumeration of the different types of fields in a frame.
Definition: globals.h:197
ID3_Frame::ConstIterator
Definition: id3lib_frame.h:49