SmartFoxServer 2X C++ API
IUserManager.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of IUserManager interface
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __IUserManager__
12 #define __IUserManager__
13 
14 // Forward class declaration
15 namespace Sfs2X {
16 namespace Entities {
17 namespace Managers {
18  class IUserManager;
19 } // namespace Managers
20 } // namespace Entities
21 } // namespace Sfs2X
22 
23 #if defined(_MSC_VER)
24 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
25 #endif
26 #include <string> // STL library: string object
27 #include <vector> // STL library: vector object
28 using namespace std; // STL library: declare the STL namespace
29 
30 #include "../User.h"
31 #include "../../SmartFox.h"
32 
33 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
34 
35 using namespace Sfs2X;
36 using namespace Sfs2X::Entities;
37 
38 namespace Sfs2X {
39 namespace Entities {
40 namespace Managers {
41 
45  class DLLImportExport IUserManager
46  {
47  public:
57  virtual bool ContainsUserName(string userName) = 0;
58 
68  virtual bool ContainsUserId(long int userId) = 0;
69 
79  virtual bool ContainsUser(boost::shared_ptr<User> user) = 0;
80 
90  virtual boost::shared_ptr<User> GetUserByName(string userName) = 0;
91 
101  virtual boost::shared_ptr<User> GetUserById(long int userId) = 0;
102 
103  virtual void AddUser(boost::shared_ptr<User> user) = 0;
104 
105  virtual void RemoveUser(boost::shared_ptr<User> user) = 0;
106 
107  virtual void RemoveUserById(long int id) = 0;
108 
112  virtual long int UserCount() = 0;
113 
120  virtual boost::shared_ptr<vector<boost::shared_ptr<User> > > GetUserList() = 0;
121 
122  virtual boost::shared_ptr<SmartFox> SmartFoxClient() = 0;
123 
124  virtual void ClearAll() = 0;
125 
126  virtual void Dispose() = 0;
127  };
128 
129 } // namespace Managers
130 } // namespace Entities
131 } // namespace Sfs2X
132 
133 #endif
STL namespace.
The User Manager interface
Definition: IUserManager.h:45
Definition: Buddy.h:30
Definition: SmartFox.cpp:24