src/despotify_utils.h File Reference

Go to the source code of this file.

Functions

struct despotify_session * mpd_despotify_get_session (void)
 Return the current despotify session.
struct tagmpd_despotify_tag_from_track (struct ds_track *track)
 Create a MPD tags structure from a spotify track.
bool mpd_despotify_register_callback (void(*cb)(struct despotify_session *, int, void *, void *), void *cb_data)
 Register a despotify callback.
void mpd_despotify_unregister_callback (void(*cb)(struct despotify_session *, int, void *, void *))
 Unregister a despotify callback.

Function Documentation

struct despotify_session* mpd_despotify_get_session ( void   )  [read]

Return the current despotify session.

If the session isn't initialized, this function will initialize it and connect to Spotify.

Returns:
a pointer to the despotify session, or NULL if it can't be initialized (e.g., if the configuration isn't supplied)
bool mpd_despotify_register_callback ( void(*)(struct despotify_session *, int, void *, void *)  cb,
void *  cb_data 
)

Register a despotify callback.

Despotify calls this e.g., when a track ends.

Parameters:
cb the callback
cb_data the data to pass to the callback
Returns:
true if the callback could be registered
struct tag* mpd_despotify_tag_from_track ( struct ds_track *  track  )  [read]

Create a MPD tags structure from a spotify track.

Parameters:
track the track to convert
Returns:
a pointer to the filled in tags structure
void mpd_despotify_unregister_callback ( void(*)(struct despotify_session *, int, void *, void *)  cb  ) 

Unregister a despotify callback.

Parameters:
cb the callback to unregister.

Generated on 9 Aug 2013 for MPD by  doxygen 1.6.1