SmartFoxServer 2X C++ API
ChangeRoomPasswordStateRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of ChangeRoomPasswordStateRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __ChangeRoomPasswordStateRequest__
12 #define __ChangeRoomPasswordStateRequest__
13 
14 #include "../Util/Common.h"
15 #include "BaseRequest.h"
16 #include "../Entities/Room.h"
17 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
18 
19 #if defined(_MSC_VER)
20 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
21 #endif
22 #include <list> // STL library: list object
23 using namespace std; // STL library: declare the STL namespace
24 
25 namespace Sfs2X {
26 namespace Requests {
27 
37  class DLLImportExport ChangeRoomPasswordStateRequest : public BaseRequest
38  {
39  public:
40 
41  // -------------------------------------------------------------------
42  // Public methods
43  // -------------------------------------------------------------------
44 
93  ChangeRoomPasswordStateRequest(boost::shared_ptr<Room> room, string newPass);
95 
96  void Validate(boost::shared_ptr<SmartFox> sfs);
97 
98  void Execute (boost::shared_ptr<SmartFox> sfs);
99 
100  // -------------------------------------------------------------------
101  // Public members
102  // -------------------------------------------------------------------
103 
104  static boost::shared_ptr<string> KEY_ROOM;
105 
106  static boost::shared_ptr<string> KEY_PASS;
107 
108  protected:
109 
110  // -------------------------------------------------------------------
111  // Protected methods
112  // -------------------------------------------------------------------
113 
114  // -------------------------------------------------------------------
115  // Protected members
116  // -------------------------------------------------------------------
117 
118  private:
119 
120  // -------------------------------------------------------------------
121  // Private methods
122  // -------------------------------------------------------------------
123 
124  // -------------------------------------------------------------------
125  // Private members
126  // -------------------------------------------------------------------
127  boost::shared_ptr<Room> room;
128  boost::shared_ptr<string> newPass;
129  };
130 
131 } // namespace Requests
132 } // namespace Sfs2X
133 
134 #endif
STL namespace.
Definition: SmartFox.cpp:24
Changes the password of a Room at runtime.
Definition: ChangeRoomPasswordStateRequest.h:37