libspotify
Typedefs | Functions
Inbox subsystem

Typedefs

typedef void inboxpost_complete_cb (sp_inbox *result, void *userdata)
 

Functions

sp_inboxsp_inbox_post_tracks (sp_session *session, const char *user, sp_track *const *tracks, int num_tracks, const char *message, inboxpost_complete_cb *callback, void *userdata)
 
sp_error sp_inbox_error (sp_inbox *inbox)
 
sp_error sp_inbox_add_ref (sp_inbox *inbox)
 
sp_error sp_inbox_release (sp_inbox *inbox)
 

Detailed Description

Typedef Documentation

typedef void inboxpost_complete_cb(sp_inbox *result, void *userdata)

The type of a callback used in sp_inbox_post()

When this callback is called, the sp_track_is_loaded(), sp_album_is_loaded(), and sp_artist_is_loaded() functions will return non-zero for the objects contained in the search result.

Parameters
[in]resultThe same pointer returned by sp_search_create()
[in]userdataThe opaque pointer given to sp_search_create()

Function Documentation

sp_error sp_inbox_add_ref ( sp_inbox inbox)

Increase the reference count of a inbox result

Parameters
[in]inboxThe inbox result object
Returns
One of the following errors, from sp_error SP_ERROR_OK
sp_error sp_inbox_error ( sp_inbox inbox)

Check if inbox operation returned an error code.

Parameters
[in]inboxInbox object
Returns
One of the following errors, from sp_error SP_ERROR_OK SP_ERROR_OTHER_TRANSIENT SP_ERROR_PERMISSION_DENIED SP_ERROR_INVALID_INDATA SP_ERROR_INBOX_IS_FULL SP_ERROR_NO_SUCH_USER SP_ERROR_OTHER_PERMANENT
sp_inbox* sp_inbox_post_tracks ( sp_session session,
const char *  user,
sp_track *const *  tracks,
int  num_tracks,
const char *  message,
inboxpost_complete_cb callback,
void *  userdata 
)

Add to inbox

Parameters
[in]sessionSession object
[in]userCanonical username of recipient
[in]tracksArray of tracks to post
[in]num_tracksNumber of tracks in tracks
[in]messageMessage to attach to tracks. UTF-8
[in]callbackCallback to be invoked when the request has completed
[in]userdataUserdata passed to callback
Returns
sp_inbox object if the request has been sent, NULL if request failed to initialize
sp_error sp_inbox_release ( sp_inbox inbox)

Decrease the reference count of a inbox result

Parameters
[in]inboxThe inbox result object
Returns
One of the following errors, from sp_error SP_ERROR_OK

Generated on Tue Jun 4 2013 15:11:47.
Copyright © 2006–2013 Spotify Ltd