XMMS2
Functions
Source Preferences

Functions

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

Detailed Description

Handles source preferences

Function Documentation

◆ s4_sourcepref_create()

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(), CASE(), xmms_medialib_init(), and xmms_medialib_session_property_set().

◆ s4_sourcepref_get_priority()

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

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

◆ s4_sourcepref_unref()

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(), CASE(), s4_cond_free(), s4_fetchspec_free(), xmms_medialib_query(), and xmms_medialib_session_property_set().