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)

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] result The same pointer returned by sp_search_create()
[in] userdata The 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] inbox The 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] inbox Inbox 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] session Session object
[in] user Canonical username of recipient
[in] tracks Array of tracks to post
[in] num_tracks Number of tracks in tracks
[in] message Message to attach to tracks. UTF-8
[in] callback Callback to be invoked when the request has completed
[in] userdata Userdata 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] inbox The inbox result object
Returns:
One of the following errors, from sp_error SP_ERROR_OK

Generated on Wed Jun 13 2012 14:22:40.
Copyright © 2006–2012 Spotify Ltd