![]() |
Moo
|
#include <moofriend.h>
Public Types | |
enum | { kMooFriendshipNoFriend = 0, kMooFriendshipInvited, kMooFriendshipWaitingForConfirmation, kMooFriendshipConfirmed } |
friendship states. | |
enum | mooFriendInfoType { kFriendInfoInvalid = 0, kFriendInfoLanguage, kFriendInfoLocation, kFriendInfoInstruments, kFriendInfoSkills, kFriendInfoGenre, kFriendInfoAbout, kFriendInfoBand } |
friend infos More... | |
Public Member Functions | |
virtual mooUInt | getID ()=0 |
get a friend's ID | |
virtual const mooChar * | getName ()=0 |
get the friend's name | |
virtual mooInt | makeFriend ()=0 |
virtual mooInt | confirmFriendship ()=0 |
confirm a friendship request | |
virtual mooInt | unfriend ()=0 |
terminate friendship | |
virtual mooInt | isFriend ()=0 |
is a friend? | |
virtual mooInt | likeFriend ()=0 |
virtual mooInt | getLikes ()=0 |
get friends likes | |
virtual mooBool | hasUserLiked ()=0 |
have we liked already? useful to display user like state | |
virtual const mooChar * | getPictureFile ()=0 |
obtain a local file path to this friend's picture, null if none found | |
virtual const mooChar * | getAudioFile ()=0 |
obtain a local file path to this friend's audio (demo) file, null if none found | |
virtual mooBool | isFriendOnline ()=0 |
friend messages More... | |
virtual mooBool | sendMessage (const mooChar *message)=0 |
fails if not logged in, the friend is not confirmed etc. More... | |
virtual const mooChar * | getMessage (mooUInt messageID)=0 |
virtual const mooChar * | getInfo (mooFriendInfoType which)=0 |
obtain this friend's info as per type, null if none given | |
friend infos
friend infos are just strings describing various properties of the friend or user. Note that all of these strings are optional info types
retreive the latest messages. Messages have IDs; you will be informed by your MooFriends callback of incoming messages with an according friend and message ID. For example, in your callback void My::mooFriendsCallback (MooFriends* friends, mooInt operation, mooInt result, mooInt id, void* reference) if (operation == MooFriends::kFriendMessage) lastMessage = mooFriends->getFriend (id)->getMessage (result)); note that messge IDs are only valid during a session (between login and logout).
|
pure virtual |
friend messages
you can send an retreive messages to and from your friends. Retreived messages will be reported to your MooFriends callback; you can then ask for received messages via getMessages. check if this friend is currently online
|
pure virtual |
like, or unlike a friend, returns number of likes for this friend if you like but you liked already, the friend is unliked (like is toggled). note: only confirmed friends can be liked or unliked.
|
pure virtual |
friendships. all friendship methods return: 0 (no friend), 1 (invited), or 2 (confirmed) make friend with someone (invite). When the friend confirms the friendship, your MooFriends callback should be invoked with friend changed
fails if not logged in, the friend is not confirmed etc.
send a message. Messages must not exceed 80 characters. You should avoid the following characters, as those will be replaced: