1
0

id3_frame.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // The authors have released ID3Lib as Public Domain(PD) and claim no copyright,
  2. // patent or other intellectual property protection in this work. This means that
  3. // it may be modified, redistributed and used in commercial and non-commercial
  4. // software and hardware without restrictions. ID3Lib is distributed on an "AS IS"
  5. // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
  6. //
  7. // The ID3Lib authors encourage improvements and optimisations to be sent to the
  8. // ID3Lib coordinator, currently Dirk Mahoney([email protected]). Approved
  9. // submissions may be altered, and will be included and released under these terms.
  10. //
  11. // Mon Nov 23 18:34:01 1998
  12. #pragma once
  13. #include "id3_types.h"
  14. #include "id3_field.h"
  15. #include "id3_header_frame.h"
  16. class ID3_Frame
  17. {
  18. public:
  19. ID3_Frame(ID3_FrameID id = ID3FID_NOFRAME);
  20. ~ID3_Frame(void);
  21. void Clear(void);
  22. void SetID(ID3_FrameID id);
  23. ID3_FrameID GetID(void);
  24. ID3_Field& Field(ID3_FieldID name);
  25. // *** PRIVATE INTERNAL DATA - DO NOT USE *** PRIVATE INTERNAL DATA - DO NOT USE ***
  26. bool HasChanged(void);
  27. void SetVersion(uchar ver, uchar rev);
  28. void Parse(uchar *buffer, luint size);
  29. luint Size(void);
  30. luint Render(uchar *buffer);
  31. char encryptionID[256]; // the encryption method with which this frame is encrypted
  32. char groupingID[256]; // the group to which this frame belongs
  33. bool compression; // should we try to compress?
  34. bool hasChanged; // has the frame changed since the last parse/render?
  35. bitset fieldBits; // which fields are present?
  36. ID3_FrameID frameID; // what frame are we?
  37. protected:
  38. void UpdateStringTypes(void);
  39. void UpdateFieldDeps(void);
  40. lsint FindField(ID3_FieldID name);
  41. uchar version; // what version tag?
  42. uchar revision; // what revision tag?
  43. luint numFields; // how many fields are in this frame?
  44. ID3_Field **fields; // an array of field object pointers
  45. };