User handling


Enumerations

enum  sp_relation_type {
  SP_RELATION_TYPE_UNKNOWN = 0,
  SP_RELATION_TYPE_NONE = 1,
  SP_RELATION_TYPE_UNIDIRECTIONAL = 2,
  SP_RELATION_TYPE_BIDIRECTIONAL = 3
}

Functions

const char * sp_user_canonical_name (sp_user *user)
const char * sp_user_display_name (sp_user *user)
bool sp_user_is_loaded (sp_user *user)
const char * sp_user_full_name (sp_user *user)
const char * sp_user_picture (sp_user *user)
sp_relation_type sp_user_relation_type (sp_session *session, sp_user *user)
void sp_user_add_ref (sp_user *user)
void sp_user_release (sp_user *user)

Enumeration Type Documentation

User relation type

Enumerator:
SP_RELATION_TYPE_UNKNOWN  Not yet known.
SP_RELATION_TYPE_NONE  No relation.
SP_RELATION_TYPE_UNIDIRECTIONAL  The currently logged in user is following this uer.
SP_RELATION_TYPE_BIDIRECTIONAL  Bidirectional friendship established.


Function Documentation

void sp_user_add_ref ( sp_user user  ) 

Increase the reference count of an user

Parameters:
[in] user The user object

const char* sp_user_canonical_name ( sp_user user  ) 

Get a pointer to a string representing the user's canonical username.

Parameters:
[in] user The Spotify user whose canonical username you would like a string representation of
Returns:
A string representing the canonical username.

const char* sp_user_display_name ( sp_user user  ) 

Get a pointer to a string representing the user's displayable username. If there is no difference between the canonical username and the display name, or if the library does not know about the display name yet, the canonical username will be returned.

Parameters:
[in] user The Spotify user whose displayable username you would like a string representation of
Returns:
A string

const char* sp_user_full_name ( sp_user user  ) 

Get a pointer to a string representing the user's full name as returned from social networks.

Parameters:
[in] user The Spotify user whose displayable username you would like a string representation of
Returns:
A string, NULL if the full name is not known.

bool sp_user_is_loaded ( sp_user user  ) 

Get load status for a user object. Before it is loaded, only the user's canonical username is known.

Parameters:
[in] user Spotify user object
Returns:
True if user object is loaded, otherwise false

const char* sp_user_picture ( sp_user user  ) 

Get a pointer to an URL for an picture representing the user

Parameters:
[in] user The Spotify user whose displayable username you would like a string representation of
Returns:
A string, NULL if the URL is not known.

sp_relation_type sp_user_relation_type ( sp_session session,
sp_user user 
)

Get relation type for a given user

Parameters:
[in] session Session
[in] user The Spotify user you want to query relation type for
Returns:
sp_relation_type

void sp_user_release ( sp_user user  ) 

Decrease the reference count of an user

Parameters:
[in] user The user object


Generated on Wed Nov 3 12:46:14 2010.
Copyright © 2006–2009 Spotify Ltd