SmartFoxServer 2X C++ API
RoomSettings.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of RoomSettings
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __RoomSettings__
12 #define __RoomSettings__
13 
14 #include "../Util/Common.h"
15 #include "RoomPermissions.h"
16 #include "RoomEvents.h"
17 #include "RoomExtension.h"
18 #include "../Entities/Variables/RoomVariable.h"
19 #include "../Entities/SFSConstants.h"
20 
21 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
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 using namespace Sfs2X;
31 using namespace Sfs2X::Entities;
32 using namespace Sfs2X::Entities::Variables;
33 
34 namespace Sfs2X {
35 namespace Requests {
36 
60  class DLLImportExport RoomSettings
61  {
62  public:
63 
64  // -------------------------------------------------------------------
65  // Public methods
66  // -------------------------------------------------------------------
67 
76  RoomSettings(string name);
77 
78  virtual ~RoomSettings();
79 
83  boost::shared_ptr<string> Name();
84 
88  void Name(string value);
89 
93  boost::shared_ptr<string> Password();
94 
98  void Password(string value);
99 
103  bool IsGame();
104 
108  void IsGame(bool value);
109 
113  short int MaxUsers();
114 
118  void MaxUsers(short int value);
119 
123  short int MaxVariables();
124 
128  void MaxVariables(short int value);
129 
133  short int MaxSpectators();
134 
138  void MaxSpectators(short int value);
139 
144  boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > Variables();
145 
150  void Variables(boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > value);
151 
156  boost::shared_ptr<RoomPermissions> Permissions();
157 
162  void Permissions(boost::shared_ptr<RoomPermissions> value);
163 
168  boost::shared_ptr<RoomEvents> Events();
169 
174  void Events(boost::shared_ptr<RoomEvents> value);
175 
180  boost::shared_ptr<RoomExtension> Extension();
181 
186  void Extension(boost::shared_ptr<RoomExtension> value);
187 
191  boost::shared_ptr<string> GroupId();
192 
196  void GroupId(string value);
197 
207  bool AllowOwnerOnlyInvitation();
208 
218  void AllowOwnerOnlyInvitation(bool value);
219 
220  // -------------------------------------------------------------------
221  // Public members
222  // -------------------------------------------------------------------
223 
224  protected:
225 
226  // -------------------------------------------------------------------
227  // Protected methods
228  // -------------------------------------------------------------------
229 
230  // -------------------------------------------------------------------
231  // Protected members
232  // -------------------------------------------------------------------
233 
234  private:
235 
236  // -------------------------------------------------------------------
237  // Private methods
238  // -------------------------------------------------------------------
239 
240  // -------------------------------------------------------------------
241  // Private members
242  // -------------------------------------------------------------------
243  boost::shared_ptr<string> name;
244  boost::shared_ptr<string> password;
245  boost::shared_ptr<string> groupId;
246  bool isGame;
247  short int maxUsers;
248  short int maxSpectators;
249  short int maxVariables;
250  boost::shared_ptr<vector<boost::shared_ptr<RoomVariable> > > variables;
251  boost::shared_ptr<RoomPermissions> permissions;
252  boost::shared_ptr<RoomEvents> events;
253  boost::shared_ptr<RoomExtension> extension;
254  bool allowOwnerOnlyInvitation; // New in SFS2X 2.12
255  };
256 
257 } // namespace Requests
258 } // namespace Sfs2X
259 
260 #endif
STL namespace.
Definition: BaseVariable.cpp:15
This class provides the Room settings that you can pass to a CreateRoomRequest
Definition: RoomSettings.h:60
Definition: Buddy.h:30
Definition: SmartFox.cpp:24