11 #ifndef __SFSUserManager__ 12 #define __SFSUserManager__ 14 #include "IUserManager.h" 16 #include "../../SmartFox.h" 19 #include <boost/shared_ptr.hpp> 22 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug 29 using namespace Sfs2X;
55 bool ContainsUserName(
string userName);
56 bool ContainsUserId(
long int userId);
57 bool ContainsUser(boost::shared_ptr<User> user);
58 boost::shared_ptr<User> GetUserByName(
string userName);
59 boost::shared_ptr<User> GetUserById(
long int userId);
60 virtual void AddUser(boost::shared_ptr<User> user);
61 virtual void RemoveUser(boost::shared_ptr<User> user);
62 void RemoveUserById(
long int id);
64 boost::shared_ptr<SmartFox> SmartFoxClient();
65 boost::shared_ptr<vector<boost::shared_ptr<User> > > GetUserList();
78 void LogWarn(boost::shared_ptr<string> msg);
79 void AddUserInternal(boost::shared_ptr<User> user);
85 boost::shared_ptr<Room> room;
86 boost::shared_ptr<SmartFox> sfs;
98 boost::shared_ptr<map<string, boost::shared_ptr<User> > > usersByName;
99 boost::shared_ptr<map<long int, boost::shared_ptr<User> > > usersById;
101 boost::recursive_mutex lockUsersById;
102 boost::recursive_mutex lockUsersByName;
Definition: Logger.cpp:14
Manages the local Users.
Definition: SFSUserManager.h:43
The User Manager interface
Definition: IUserManager.h:45
Definition: SmartFox.cpp:24