SmartFoxServer 2X C++ API
SetUserVariablesRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SetUserVariablesRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SetUserVariablesRequest__
12 #define __SetUserVariablesRequest__
13 
14 #include "../Util/Common.h"
15 #include "BaseRequest.h"
16 #include "../Entities/Data/ISFSArray.h"
17 #include "../Entities/Data/SFSArray.h"
18 #include "../Entities/Variables/UserVariable.h"
19 
20 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
21 
22 #if defined(_MSC_VER)
23 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
24 #endif
25 #include <list> // STL library: list object
26 #include <vector> // STL library: vector object
27 #include <string> // STL library: string object
28 using namespace std; // STL library: declare the STL namespace
29 
30 using namespace Sfs2X::Entities::Data;
31 
32 namespace Sfs2X {
33 namespace Requests {
34 
39  class DLLImportExport SetUserVariablesRequest : public BaseRequest
40  {
41  public:
42 
43  // -------------------------------------------------------------------
44  // Public methods
45  // -------------------------------------------------------------------
46 
106  SetUserVariablesRequest(boost::shared_ptr<vector<boost::shared_ptr<UserVariable> > > userVariables);
107 
108  virtual ~SetUserVariablesRequest();
109 
110  void Validate(boost::shared_ptr<SmartFox> sfs);
111 
112  void Execute (boost::shared_ptr<SmartFox> sfs);
113 
114  // -------------------------------------------------------------------
115  // Public members
116  // -------------------------------------------------------------------
117 
118  static boost::shared_ptr<string> KEY_USER;
119 
120  static boost::shared_ptr<string> KEY_VAR_LIST;
121 
122  protected:
123 
124  // -------------------------------------------------------------------
125  // Protected methods
126  // -------------------------------------------------------------------
127 
128  // -------------------------------------------------------------------
129  // Protected members
130  // -------------------------------------------------------------------
131 
132  private:
133 
134  // -------------------------------------------------------------------
135  // Private methods
136  // -------------------------------------------------------------------
137 
138  // -------------------------------------------------------------------
139  // Private members
140  // -------------------------------------------------------------------
141  boost::shared_ptr<vector<boost::shared_ptr<UserVariable> > > userVariables;
142  };
143 
144 } // namespace Requests
145 } // namespace Sfs2X
146 
147 #endif
STL namespace.
Definition: SmartFox.cpp:24
Set custom User Variables for the current User
Definition: SetUserVariablesRequest.h:39
Definition: ISFSArray.h:17