11 #ifndef __SFSBuddyManager__ 12 #define __SFSBuddyManager__ 14 #include "IBuddyManager.h" 15 #include "../../SmartFox.h" 16 #include "../SFSBuddy.h" 18 #include <boost/shared_ptr.hpp> 21 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug 28 using namespace Sfs2X;
51 void Inited(
bool value);
52 void AddBuddy(boost::shared_ptr<Buddy> buddy);
54 boost::shared_ptr<Buddy> RemoveBuddyById(
long int id);
55 boost::shared_ptr<Buddy> RemoveBuddyByName(
string name);
56 boost::shared_ptr<Buddy> GetBuddyById(
long int id);
57 bool ContainsBuddy(
string name);
58 boost::shared_ptr<Buddy> GetBuddyByName(
string name);
59 boost::shared_ptr<Buddy> GetBuddyByNickName(
string nickName);
60 boost::shared_ptr<vector<boost::shared_ptr<Buddy> > > OfflineBuddies();
61 boost::shared_ptr<vector<boost::shared_ptr<Buddy> > > OnlineBuddies();
62 boost::shared_ptr<vector<boost::shared_ptr<Buddy> > > BuddyList();
63 boost::shared_ptr<BuddyVariable> GetMyVariable(
string varName);
64 boost::shared_ptr<BuddyVariable> GetMyVariable(boost::shared_ptr<string> varName);
65 boost::shared_ptr<vector<boost::shared_ptr<BuddyVariable> > > MyVariables();
66 void MyVariables(boost::shared_ptr<vector<boost::shared_ptr<BuddyVariable> > > value);
68 void MyOnlineState(
bool value);
69 boost::shared_ptr<string> MyNickName();
70 void MyNickName(
string value);
71 boost::shared_ptr<string> MyState();
72 void MyState(
string value);
73 boost::shared_ptr<vector<string> > BuddyStates();
74 void BuddyStates(boost::shared_ptr<vector<string> > value);
75 void SetMyVariable(boost::shared_ptr<BuddyVariable> bVar);
90 boost::shared_ptr<map<string, boost::shared_ptr<Buddy> > > buddiesByName;
91 boost::shared_ptr<map<string, boost::shared_ptr<BuddyVariable> > > myVariables;
104 boost::shared_ptr<vector<string> > buddyStates;
105 boost::shared_ptr<SmartFox> sfs;
106 boost::recursive_mutex lockBuddiesByName;
107 boost::recursive_mutex lockMyVariables;
Definition: BaseVariable.cpp:15
The class manages the current User's Buddy List
Definition: SFSBuddyManager.h:39
The BuddyList Manager interface
Definition: IBuddyManager.h:37
Definition: SmartFox.cpp:24