XMMS2
Fetch Specifications

Specifies what to fetch in a query. More...

Functions

s4_fetchspec_ts4_fetchspec_create (void)
 Creates a new fetch specification.
void s4_fetchspec_add (s4_fetchspec_t *spec, const char *key, s4_sourcepref_t *sourcepref, int flags)
 Adds something to fetch to the fetch specification.
void s4_fetchspec_update_key (s4_t *s4, s4_fetchspec_t *spec)
void s4_fetchspec_free (s4_fetchspec_t *spec)
 Frees a fetchspec.
s4_fetchspec_ts4_fetchspec_ref (s4_fetchspec_t *spec)
void s4_fetchspec_unref (s4_fetchspec_t *spec)
int s4_fetchspec_size (s4_fetchspec_t *spec)
 Gets the size of the fetchspec.
const char * s4_fetchspec_get_key (s4_fetchspec_t *spec, int index)
 Gets the key at a give index.
s4_sourcepref_ts4_fetchspec_get_sourcepref (s4_fetchspec_t *spec, int index)
 Gets the sourcepref at a give index.
int s4_fetchspec_get_flags (s4_fetchspec_t *spec, int index)

Detailed Description

Specifies what to fetch in a query.

Function Documentation

◆ s4_fetchspec_add()

void s4_fetchspec_add ( s4_fetchspec_t * spec,
const char * key,
s4_sourcepref_t * sourcepref,
int flags )

Adds something to fetch to the fetch specification.

If key is NULL, it will fetch everything in an entry

Parameters
specThe specification to add to
keyThe key to fetch
sourceprefThe sourcepref to use when deciding which key-value pair to fetch
flagsFlags to decide what to fetch

Referenced by CASE(), xmms_fetch_info_add_key(), xmms_fetch_info_new(), and xmms_medialib_session_property_set().

◆ s4_fetchspec_create()

s4_fetchspec_t * s4_fetchspec_create ( void )

Creates a new fetch specification.

Returns
A new fetchspec

Referenced by CASE(), xmms_fetch_info_new(), and xmms_medialib_session_property_set().

◆ s4_fetchspec_free()

void s4_fetchspec_free ( s4_fetchspec_t * spec)

Frees a fetchspec.

Parameters
specThe fetchspec to free

Referenced by CASE(), s4_fetchspec_unref(), xmms_fetch_info_free(), and xmms_medialib_session_property_set().

◆ s4_fetchspec_get_flags()

int s4_fetchspec_get_flags ( s4_fetchspec_t * spec,
int index )

◆ s4_fetchspec_get_key()

const char * s4_fetchspec_get_key ( s4_fetchspec_t * spec,
int index )

Gets the key at a give index.

Parameters
specThe fetchspec to find the key in
indexThe index of the key
Returns
The key, or NULL if index is out of bounds

Referenced by print_fetch().

◆ s4_fetchspec_get_sourcepref()

s4_sourcepref_t * s4_fetchspec_get_sourcepref ( s4_fetchspec_t * spec,
int index )

Gets the sourcepref at a give index.

Parameters
specThe fetchspec to find the sourcepref in
indexThe index of the sourcepref
Returns
The key, or NULL if index is out of bounds

◆ s4_fetchspec_ref()

s4_fetchspec_t * s4_fetchspec_ref ( s4_fetchspec_t * spec)

◆ s4_fetchspec_size()

int s4_fetchspec_size ( s4_fetchspec_t * spec)

Gets the size of the fetchspec.

Parameters
specThe fetchspec to find the size of
Returns
The size of spec

Referenced by _s4_query(), print_fetch(), and xmms_fetch_info_add_key().

◆ s4_fetchspec_unref()

void s4_fetchspec_unref ( s4_fetchspec_t * spec)

◆ s4_fetchspec_update_key()

void s4_fetchspec_update_key ( s4_t * s4,
s4_fetchspec_t * spec )

Referenced by _s4_query().