XMMS2
Functions
Fetch Specifications

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

Functions

s4_fetchspec_ts4_fetchspec_create (void)
 Creates a new fetch specification. More...
 
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. More...
 
void s4_fetchspec_update_key (s4_t *s4, s4_fetchspec_t *spec)
 
void s4_fetchspec_free (s4_fetchspec_t *spec)
 Frees a fetchspec. More...
 
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. More...
 
const char * s4_fetchspec_get_key (s4_fetchspec_t *spec, int index)
 Gets the key at a give index. More...
 
s4_sourcepref_ts4_fetchspec_get_sourcepref (s4_fetchspec_t *spec, int index)
 Gets the sourcepref at a give index. More...
 
int s4_fetchspec_get_flags (s4_fetchspec_t *spec, int index)
 

Detailed Description

Specifies what to fetch in a query.

Function Documentation

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_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().

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().

int s4_fetchspec_get_flags ( s4_fetchspec_t spec,
int  index 
)
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_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_t* s4_fetchspec_ref ( s4_fetchspec_t spec)
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().

void s4_fetchspec_unref ( s4_fetchspec_t spec)
void s4_fetchspec_update_key ( s4_t s4,
s4_fetchspec_t spec 
)

Referenced by _s4_query().