SmartFoxServer 2X C++ API
ChangeRoomNameRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of ChangeRoomNameRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __ChangeRoomNameRequest__
12 #define __ChangeRoomNameRequest__
13 
14 #include "../Util/Common.h"
15 #include "BaseRequest.h"
16 #include "BanMode.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 
36  class DLLImportExport ChangeRoomNameRequest : public BaseRequest
37  {
38  public:
39 
40  // -------------------------------------------------------------------
41  // Public methods
42  // -------------------------------------------------------------------
43 
94  ChangeRoomNameRequest(boost::shared_ptr<Room> room, string newName);
95  virtual ~ChangeRoomNameRequest();
96 
97  void Validate(boost::shared_ptr<SmartFox> sfs);
98 
99  void Execute (boost::shared_ptr<SmartFox> sfs);
100 
101  // -------------------------------------------------------------------
102  // Public members
103  // -------------------------------------------------------------------
104 
105  static boost::shared_ptr<string> KEY_ROOM;
106 
107  static boost::shared_ptr<string> KEY_NAME;
108 
109  protected:
110 
111  // -------------------------------------------------------------------
112  // Protected methods
113  // -------------------------------------------------------------------
114 
115  // -------------------------------------------------------------------
116  // Protected members
117  // -------------------------------------------------------------------
118 
119  private:
120 
121  // -------------------------------------------------------------------
122  // Private methods
123  // -------------------------------------------------------------------
124 
125  // -------------------------------------------------------------------
126  // Private members
127  // -------------------------------------------------------------------
128  boost::shared_ptr<Room> room;
129  boost::shared_ptr<string> newName;
130  };
131 
132 } // namespace Requests
133 } // namespace Sfs2X
134 
135 #endif
STL namespace.
Change the name of a Room at runtime.
Definition: ChangeRoomNameRequest.h:36
Definition: SmartFox.cpp:24