![]() |
Moo
|
#include <moouser.h>
Public Types | |
enum | { kFileSendFinished = 1000 } |
asynchronous operations as passed to the operation parameter for the callback | |
enum | mooUserInfoType { kUserInfoInvalid = 0, kUserInfoLanguage, kUserInfoLocation, kUserInfoInstruments, kUserInfoSkills, kUserInfoGenre, kUserInfoAbout, kUserInfoBand } |
user infos More... | |
enum | { kLoginNotAuthorized = 1, kLoginNoUserNameOrPassword, kLoginWrongUserNameOrPassword, kLoginNoConnection, kLoginNetworkError, kLoginFails, kLoginInternalError, kLoginProtocolError, kLoginSSLError, kFileSendError = 1000, kFileReceiveError } |
Error codes. | |
Public Member Functions | |
MooUser () | |
MooUser manages the local user only. | |
virtual mooInt | signIn (const mooChar *username, const mooChar *password)=0 |
virtual mooInt | logIn (const mooChar *username, const mooChar *password)=0 |
virtual mooBool | isLoggedIn ()=0 |
virtual void | logOut ()=0 |
virtual mooUInt | getID ()=0 |
virtual const mooChar * | getUserName ()=0 |
virtual const mooChar * | errorToString (mooInt errorCode)=0 |
virtual void | setCallback (mooUserCallback callback, void *reference)=0 |
virtual mooBool | sendUserPictureFile (const mooChar *localPath)=0 |
virtual const mooChar * | getUserPictureFile ()=0 |
obtain this user's picture, zero if none found | |
virtual mooBool | sendUserAudioFile (const mooChar *localPath)=0 |
virtual const mooChar * | getUserAudioFile ()=0 |
obtain this user's audio file, zero if none found | |
virtual const mooChar * | getInfo (mooUserInfoType which)=0 |
obtain this user's info as per type, null if none given | |
virtual mooBool | setInfo (mooUserInfoType which, const mooChar *info)=0 |
user infos
get and set general information for this user (optional). user infos are just strings describing various properties of the user. info types
get
errorCode | as text provides a readable error description for the passed errorCode |
|
pure virtual |
get the currently logged in user ID. negative or zero are invalid IDs. IDs are important throughout the entire Moo SDK and are always unique.
|
pure virtual |
get moo user name obtain the users name,
|
pure virtual |
Get logged in state returns
Login with
username | and |
password. | Check return code for errors |
username | must be all lower case and not exceed 80 characters. |
password | must not exceed 80 characters and may contain any ascii character except the escape character ("\") |
|
pure virtual |
Logout. Also automatically called when Moo is destroyed All actions are ignored and return an error when the user is not logged in with the exception of signIn
send an audio file (demo) for this user all moo audio files are wav or flac. This audio file must not exceed 5 MB in file size the provided file will be copied to the Moo user folder. If it already exists and not changed, nothing happens note that all file transfer actions are asynchronous. If the file doesn't exist or is otherwise inaccessible, false is returned; however a return value of true does not indicate a successful transfer yet. When a transfer has finished (successfully or not), your mooUserCallback (if provided) is invoked with operation code kMooUserCallbackWriteFileFinished
send a picture for this user. user must be logged in. this can be jpg or png and must not exceed 5 MB in file size the provided file will be copied to the Moo user folder. If it already exists and has not changed, nothing happens note that all file transfer actions are asynchronous. If the file doesn't exist or is otherwise inaccessible, false is returned; however a return value of true does not indicate a successful transfer yet. When a transfer has finished (successfully or not), your mooUserCallback (if provided) is invoked with operation code kMooUserCallbackWriteFileFinished
|
pure virtual |
set your
callback. | the |
reference | parameter passed to setCallback is passed to the callback for your own use, Moo does not touch this. |
|
pure virtual |
set this user's info Note that none of these strings must contain any of the following characters: <, >, {, }, &, and @ also the respective length is restricted to a maximum of 80 characters each.
Sign in with
username | and |
password. | Check return code for errors |
username | must be all lower case and not exceed 80 characters. Upper case chars will be replaced with lower case. |
password | must not exceed 80 characters and may contain any ascii character except the escape character ("\") |