XMMS2
Functions
Source Preferences

Handles source preferences. More...

Functions

s4_sourcepref_ts4_sourcepref_create (const char **srcprefs)
 Creates a new source preferences that can be used when querying. More...
 
void s4_sourcepref_unref (s4_sourcepref_t *sp)
 Decreases the reference of a sourcepref. More...
 
s4_sourcepref_ts4_sourcepref_ref (s4_sourcepref_t *sp)
 Increases the refcount of a sourcepref. More...
 
int s4_sourcepref_get_priority (s4_sourcepref_t *sp, const char *src)
 Gets the priority of a source. More...
 

Detailed Description

Handles source preferences.

Function Documentation

s4_sourcepref_t* s4_sourcepref_create ( const char **  srcprefs)

Creates a new source preferences that can be used when querying.

Parameters
srcprefsAn NULL terminated array of sources, where the first one has the highest priority. The sources may use glob- like patterns, for example "plugin*".
Returns
A new sourcepref

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

int s4_sourcepref_get_priority ( s4_sourcepref_t sp,
const char *  src 
)

Gets the priority of a source.

Parameters
spThe sourcepref to check against
srcThe source to check
Returns
The priority of the source

Referenced by CASE().

s4_sourcepref_t* s4_sourcepref_ref ( s4_sourcepref_t sp)

Increases the refcount of a sourcepref.

Parameters
spThe sourcepref to reference

Referenced by s4_cond_new_custom_filter(), s4_cond_new_filter(), s4_fetchspec_add(), and xmms_medialib_get_source_preferences().

void s4_sourcepref_unref ( s4_sourcepref_t sp)

Decreases the reference of a sourcepref.

If the reference count is less than or equal to zero it will be freed.

Parameters
spThe sourcepref to free

Referenced by CASE(), s4_cond_free(), s4_fetchspec_free(), xmms_medialib_query(), and xmms_medialib_session_property_set().