Moo
moofriend.h
Go to the documentation of this file.
1 
4 
5 #ifndef __moofriend__
6 #define __moofriend__
7 
8 #include "mooplatform.h"
9 
14 
15 //-----------------------------------------------------------------------------
16 class MooFriend
17 {
18 public:
19  MooFriend () {}
20  virtual ~MooFriend () {}
21 
23  virtual mooUInt getID () = 0;
24 
26  virtual const mooChar* getName () = 0;
27 
29  enum
30  {
31  kMooFriendshipNoFriend = 0,
32  kMooFriendshipInvited, // we have been invited to become friend
33  kMooFriendshipWaitingForConfirmation, // we invited the friend and wait for confirmation
34  kMooFriendshipConfirmed // we are entirely friends
35  };
36 
41  virtual mooInt makeFriend () = 0;
43  virtual mooInt confirmFriendship () = 0;
45  virtual mooInt unfriend () = 0;
47  virtual mooInt isFriend () = 0;
48 
52  virtual mooInt likeFriend () = 0;
54  virtual mooInt getLikes () = 0;
56  virtual mooBool hasUserLiked () = 0;
57 
59  virtual const mooChar* getPictureFile () = 0;
61  virtual const mooChar* getAudioFile () = 0;
62 
64 
67 
69  virtual mooBool isFriendOnline () = 0;
72  // '&' (replaced by '+'), '<' (replaced by '('), and '>' (replaced by ')')
74  virtual mooBool sendMessage (const mooChar* message) = 0;
80  virtual const mooChar* getMessage (mooUInt messageID) = 0;
81 
83 
86 
89  {
90  kFriendInfoInvalid = 0,
91  kFriendInfoLanguage,
92  kFriendInfoLocation,
93  kFriendInfoInstruments,
94  kFriendInfoSkills,
95  kFriendInfoGenre,
96  kFriendInfoAbout,
97  kFriendInfoBand
98  };
99 
101  virtual const mooChar* getInfo (mooFriendInfoType which) = 0;
102 };
103 
104 #endif
virtual const mooChar * getName()=0
get the friend&#39;s name
unsigned short mooChar
Definition: mooplatform.h:35
virtual mooInt likeFriend()=0
__int64 mooInt
All signed ints are 64 bit wide.
Definition: mooplatform.h:41
virtual mooInt makeFriend()=0
virtual mooInt isFriend()=0
is a friend?
unsigned __int64 mooUInt
All unsigned ints are 64 bit wide.
Definition: mooplatform.h:50
bool mooBool
just a bool
Definition: mooplatform.h:63
virtual const mooChar * getInfo(mooFriendInfoType which)=0
obtain this friend&#39;s info as per type, null if none given
virtual const mooChar * getMessage(mooUInt messageID)=0
virtual mooBool isFriendOnline()=0
friend messages
virtual mooBool hasUserLiked()=0
have we liked already? useful to display user like state
virtual mooInt unfriend()=0
terminate friendship
A MooFriend
Definition: moofriend.h:16
virtual mooInt confirmFriendship()=0
confirm a friendship request
virtual mooBool sendMessage(const mooChar *message)=0
fails if not logged in, the friend is not confirmed etc.
virtual const mooChar * getAudioFile()=0
obtain a local file path to this friend&#39;s audio (demo) file, null if none found
virtual const mooChar * getPictureFile()=0
obtain a local file path to this friend&#39;s picture, null if none found
virtual mooInt getLikes()=0
get friends likes
virtual mooUInt getID()=0
get a friend&#39;s ID
mooFriendInfoType
friend infos
Definition: moofriend.h:88