28#ifndef _ID3LIB_FIELD_IMPL_H_
29#define _ID3LIB_FIELD_IMPL_H_
33#include "id3/id3lib_strings.h"
62 size_t Set(
const char* data);
63 size_t Get(
char*,
size_t)
const;
64 size_t Get(
char*,
size_t,
size_t)
const;
67 size_t Add(
const char* data);
84 size_t Set(
const uchar* buf,
size_t size);
85 size_t Set(
const char* buf,
size_t size)
87 return this->
Set(
reinterpret_cast<const uchar *
>(buf), size);
92 void ToFile(
const char *sInfo)
const;
100 {
return _spec_begin <= spec && spec <= _spec_end; }
114 size_t SetText_i(dami::String);
115 size_t AddText_i(dami::String);
127 mutable bool _changed;
129 dami::BString _binary;
133 const size_t _fixed_size;
The representative class of an ID3v2 field.
dami::String GetText() const
size_t Add(const char *data)
bool ParseInteger(ID3_Reader &)
const unicode_t * GetRawUnicodeTextItem(size_t) const
const char * GetRawTextItem(size_t) const
size_t SetText(dami::String)
void RenderInteger(ID3_Writer &) const
const unicode_t * GetRawUnicodeText() const
void RenderText(ID3_Writer &) const
uint32 GetInteger() const
const char * GetRawText() const
size_t GetNumTextItems() const
Returns the number of items in a text list.
void ToFile(const char *sInfo) const
Copies binary data from the field to the specified file.
dami::String GetTextItem(size_t) const
size_t AddText(dami::String)
ID3_FieldType GetType() const
bool ParseBinary(ID3_Reader &)
void Set(uint32)
Sets the value of the field to the specified integer.
void Clear()
Clears any data and frees any memory associated with the field.
size_t Set(const char *buf, size_t size)
ID3_TextEnc GetEncoding() const
uint32 Get() const
Returns the value of the integer field.
ID3_Field & operator=(uint32 val)
A shortcut for the Set method.
ID3_FieldID GetID() const
const uchar * GetRawBinary() const
void Render(ID3_Writer &) const
bool ParseText(ID3_Reader &)
size_t Size() const
Returns the size of a field.
void RenderBinary(ID3_Writer &) const
bool InScope(ID3_V2Spec spec) const
bool SetEncoding(ID3_TextEnc enc)
size_t SetBinary(dami::BString)
Copies the supplied unicode string to the field.
dami::BString GetBinary() const
void FromFile(const char *)
Copies binary data from the file specified to the field.
The representative class of an id3v2 frame.
ID3_FrameDef * ID3_FindFrameDef(ID3_FrameID id)
ID3_FrameID ID3_FindFrameID(const char *id)
ID3_FieldID
Enumeration of the different types of fields in a frame.
ID3_TextEnc
Enumeration of the types of text encodings: ascii or unicode.
ID3_FrameID
Enumeration of the different types of frames recognized by id3lib.
ID3_FieldType
Enumeration of the types of field types.