Moo
moofriends.h
Go to the documentation of this file.
1 
4 
5 #ifndef __moofriends__
6 #define __moofriends__
7 
8 #include "mooplatform.h"
9 #include "moofriend.h"
10 
11 //-----------------------------------------------------------------------------
13 class MooFriends;
24 typedef void (*mooFriendsCallback) (MooFriends* friends, mooInt operation, mooInt result, mooInt id, void* reference);
25 
30 
31 //-----------------------------------------------------------------------------
33 {
34 public:
35  MooFriends () {}
36  virtual ~MooFriends () {}
37 
46  virtual MooFriend** getFriends (mooInt& count) = 0;
48  virtual MooFriend* getFriend (mooUInt iD) = 0;
49 
54  virtual void searchUsers (const mooChar* searchText) = 0;
55 
61  virtual MooFriend** getSearchedUsers (mooInt& count) = 0;
62 
65  virtual void setCallback (mooFriendsCallback callback, void* reference) = 0;
66 
68  virtual const mooChar* getLastError () = 0;
69 
71  enum
72  {
73  kFriendsChanged = 2000,
74  kSearchedUsersChanged,
75 
79 
83 
85 
87 
88  // error codes passed to callback
89  kMooFriendsErrorNotLoggedIn = 2000,
90  kMooFriendsErrorUnspecifiedError
91  };
92 };
93 
94 #endif
with id
Definition: moofriends.h:80
unsigned short mooChar
Definition: mooplatform.h:35
with id
Definition: moofriends.h:82
void(* mooFriendsCallback)(MooFriends *friends, mooInt operation, mooInt result, mooInt id, void *reference)
Definition: moofriends.h:24
with id
Definition: moofriends.h:78
__int64 mooInt
All signed ints are 64 bit wide.
Definition: mooplatform.h:41
new in the list with id
Definition: moofriends.h:81
unsigned __int64 mooUInt
All unsigned ints are 64 bit wide.
Definition: mooplatform.h:50
virtual void setCallback(mooFriendsCallback callback, void *reference)=0
virtual void searchUsers(const mooChar *searchText)=0
with id, result 0: offline, 1 : online
Definition: moofriends.h:86
virtual const mooChar * getLastError()=0
for unspecified errors (see kMooFriendsErrorUnspecifiedError below), get error string ...
with id
Definition: moofriends.h:76
A MooFriend
Definition: moofriend.h:16
virtual MooFriend ** getSearchedUsers(mooInt &count)=0
MooFriend container and management
Definition: moofriends.h:32
new in the list with id
Definition: moofriends.h:77
virtual MooFriend ** getFriends(mooInt &count)=0
virtual MooFriend * getFriend(mooUInt iD)=0
get friend by ID
with id, result is message ID, see MooFriend getMessage ()
Definition: moofriends.h:84