Typedefs | Enumerations | Functions

User handling

Typedefs

typedef enum sp_relation_type sp_relation_type

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)
sp_error sp_user_add_ref (sp_user *user)
sp_error sp_user_release (sp_user *user)

Typedef Documentation

User relation type


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

sp_error sp_user_add_ref ( sp_user user  ) 

Increase the reference count of an user

Parameters:
[in] user The user object
Returns:
One of the following errors, from sp_error SP_ERROR_OK
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
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
sp_error sp_user_release ( sp_user user  ) 

Decrease the reference count of an user

Parameters:
[in] user The user 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