#include <metadata.h>
Public Methods | |
| Entry () | |
| Entry (const char *field, unsigned field_length) | |
| Entry (const char *field_name, const char *field_value, unsigned field_value_length) | |
| Entry (const Entry &entry) | |
| void | operator= (const Entry &entry) |
| virtual | ~Entry () |
| virtual bool | is_valid () const |
| unsigned | get_field_length () const |
| unsigned | get_field_name_length () const |
| unsigned | get_field_value_length () const |
| ::FLAC__StreamMetadata_VorbisComment_Entry | get_entry () const |
| const char * | get_field () const |
| const char * | get_field_name () const |
| const char * | get_field_value () const |
| bool | set_field (const char *field, unsigned field_length) |
| bool | set_field_name (const char *field_name) |
| bool | set_field_value (const char *field_value, unsigned field_value_length) |
Protected Attributes | |
| bool | is_valid_ |
| ::FLAC__StreamMetadata_VorbisComment_Entry | entry_ |
| char * | field_name_ |
| unsigned | field_name_length_ |
| char * | field_value_ |
| unsigned | field_value_length_ |
A field as used in the methods refers to an entire 'NAME=VALUE' string; the string is not null- terminated and a length field is required since the string may contain embedded nulls.
A field_name is what is on the left side of the first '=' in the field. By definition it is ASCII and so is null-terminated and does not require a length to describe it. field_name is undefined for a vendor string entry.
A field_value is what is on the right side of the first '=' in the field. By definition, this may contain embedded nulls and so a field_value_length is requires to describe it.
Always check is_valid() after the constructor or operator= to make sure memory was properly allocated.
1.2.14 written by Dimitri van Heesch,
© 1997-2002