26 #ifndef LIBAUDCORE_TUPLE_H
27 #define LIBAUDCORE_TUPLE_H
92 typedef struct _Tuple Tuple;
119 void tuple_set_int (Tuple * tuple,
int nfield,
const char * field,
int x);
127 void tuple_set_str (Tuple * tuple,
int nfield,
const char * field,
const char * str);
130 void tuple_unset (Tuple * tuple,
int nfield,
const char * field);
140 char *
tuple_get_str (
const Tuple * tuple,
int nfield,
const char * field);
146 int tuple_get_int (
const Tuple * tuple,
int nfield,
const char * field);
155 samplerate,
int bitrate);
Structure for holding and passing around miscellaneous track metadata.
Total number of subsongs in the file.
EXPORT void tuple_set_str(Tuple *tuple, int nfield, const char *field, const char *str)
String representing quality, such as "lossy", "lossless", "sequenced".
File name part of the location URI.
Index number of subsong/tune.
EXPORT int tuple_field_by_name(const char *name)
EXPORT void tuple_set_int(Tuple *tuple, int nfield, const char *field, int x)
Composer of song, if different than artist.
Path part of the location URI.
EXPORT void tuple_set_filename(Tuple *tuple, const char *filename)
Sets filename/URI related fields of a #Tuple structure, based on the given filename argument...
EXPORT Tuple * tuple_new(void)
EXPORT void tuple_set_subtunes(Tuple *tuple, int n_subtunes, const int *subtunes)
int * subtunes
Array of int containing subtune index numbers.
EXPORT void tuple_unref(Tuple *tuple)
EXPORT TupleValueType tuple_field_get_type(int field)
EXPORT const char * tuple_field_get_name(int field)
EXPORT void tuple_unset(Tuple *tuple, int nfield, const char *field)
EXPORT Tuple * tuple_copy(const Tuple *old)
Creates a copy of given Tuple structure, with copied data.
EXPORT char * tuple_format_title(Tuple *tuple, const char *format)
EXPORT int tuple_get_nth_subtune(Tuple *tuple, int n)
Filename extension part of the location URI.
EXPORT char * tuple_get_str(const Tuple *tuple, int nfield, const char *field)
EXPORT Tuple * tuple_new_from_filename(const char *filename)
Allocates a new #Tuple structure, setting filename/URI related fields based on the given filename arg...
EXPORT Tuple * tuple_ref(Tuple *tuple)
EXPORT TupleValueType tuple_get_value_type(const Tuple *tuple, int nfield, const char *field)
Returns TupleValueType of given #Tuple field.
Track length in milliseconds.
EXPORT int tuple_get_n_subtunes(Tuple *tuple)
EXPORT void tuple_set_format(Tuple *t, const char *format, int chans, int rate, int brate)
Year of production/performance/etc.
EXPORT int tuple_get_int(const Tuple *tuple, int nfield, const char *field)
Returns integer associated to #Tuple field.