Moo
MooFriend Class Referenceabstract

A MooFriend

More...

#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 mooChargetName ()=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 mooChargetPictureFile ()=0
 obtain a local file path to this friend's picture, null if none found
 
virtual const mooChargetAudioFile ()=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 mooChargetMessage (mooUInt messageID)=0
 
virtual const mooChargetInfo (mooFriendInfoType which)=0
 obtain this friend's info as per type, null if none given
 

Detailed Description

Member Enumeration Documentation

◆ mooFriendInfoType

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

Member Function Documentation

◆ getMessage()

virtual const mooChar* MooFriend::getMessage ( mooUInt  messageID)
pure virtual

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).

◆ isFriendOnline()

virtual mooBool MooFriend::isFriendOnline ( )
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

◆ likeFriend()

virtual mooInt MooFriend::likeFriend ( )
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.

◆ makeFriend()

virtual mooInt MooFriend::makeFriend ( )
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

◆ sendMessage()

virtual mooBool MooFriend::sendMessage ( const mooChar message)
pure virtual

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:


The documentation for this class was generated from the following file: