SmartFoxServer 2X C++ API
JoinRoomInvitationRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of JoinRoomInvitationRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2016 First version
9 //
10 // ===================================================================
11 #ifndef __JoinRoomInvitationRequest__
12 #define __JoinRoomInvitationRequest__
13 
14 #include "../../Util/Common.h"
15 #include "../BaseRequest.h"
16 #include "../../Entities/Data/ISFSObject.h"
17 #include "../../Entities/Room.h"
18 
19 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
20 
21 #if defined(_MSC_VER)
22 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
23 #endif
24 #include <list> // STL library: list object
25 #include <string> // STL library: string object
26 using namespace std; // STL library: declare the STL namespace
27 
28 using namespace Sfs2X::Entities::Data;
29 
30 namespace Sfs2X {
31 namespace Requests {
32 namespace Game {
33 
92  class DLLImportExport JoinRoomInvitationRequest : public BaseRequest
93  {
94  public:
95 
96  // -------------------------------------------------------------------
97  // Public methods
98  // -------------------------------------------------------------------
99 
113  JoinRoomInvitationRequest(boost::shared_ptr<Room> targetRoom, boost::shared_ptr<list<string> > invitedUserNames, boost::shared_ptr<ISFSObject> parameters, long int expirySeconds, bool asSpectator);
114 
118  JoinRoomInvitationRequest(boost::shared_ptr<Room> targetRoom, boost::shared_ptr<list<string> > invitedUserNames, boost::shared_ptr<ISFSObject> parameters, long int expirySeconds);
119 
123  JoinRoomInvitationRequest(boost::shared_ptr<Room> targetRoom, boost::shared_ptr<list<string> > invitedUserNames, boost::shared_ptr<ISFSObject> parameters);
124 
128  JoinRoomInvitationRequest(boost::shared_ptr<Room> targetRoom, boost::shared_ptr<list<string> > invitedUserNames);
129 
130  virtual ~JoinRoomInvitationRequest();
131 
132  void Validate(boost::shared_ptr<SmartFox> sfs);
133 
134  void Execute (boost::shared_ptr<SmartFox> sfs);
135 
136  // -------------------------------------------------------------------
137  // Public members
138  // -------------------------------------------------------------------
139 
141  static boost::shared_ptr<string> KEY_ROOM_ID;
142 
144  static boost::shared_ptr<string> KEY_EXPIRY_SECONDS;
145 
147  static boost::shared_ptr<string> KEY_INVITED_NAMES;
148 
150  static boost::shared_ptr<string> KEY_AS_SPECT;
151 
153  static boost::shared_ptr<string> KEY_OPTIONAL_PARAMS;
154 
155  protected:
156 
157  // -------------------------------------------------------------------
158  // Protected methods
159  // -------------------------------------------------------------------
160 
161  // -------------------------------------------------------------------
162  // Protected members
163  // -------------------------------------------------------------------
164 
165  private:
166 
167  // -------------------------------------------------------------------
168  // Private methods
169  // -------------------------------------------------------------------
170  void Init(boost::shared_ptr<Room> targetRoom, boost::shared_ptr<list<string> > invitedUserNames, boost::shared_ptr<ISFSObject> parameters, long int expirySeconds, bool asSpectator);
171 
172  // -------------------------------------------------------------------
173  // Private members
174  // -------------------------------------------------------------------
175  boost::shared_ptr<Room> targetRoom;
176  boost::shared_ptr<list<string> > invitedUserNames;
177  long int expirySeconds;
178  bool asSpectator;
179  boost::shared_ptr<ISFSObject> parameters;
180  };
181 
182 } // namespace Game
183 } // namespace Requests
184 } // namespace Sfs2X
185 
186 #endif
static boost::shared_ptr< string > KEY_EXPIRY_SECONDS
<exclude>
Definition: JoinRoomInvitationRequest.h:144
STL namespace.
static boost::shared_ptr< string > KEY_INVITED_NAMES
<exclude>
Definition: JoinRoomInvitationRequest.h:147
static boost::shared_ptr< string > KEY_OPTIONAL_PARAMS
<exclude>
Definition: JoinRoomInvitationRequest.h:153
static boost::shared_ptr< string > KEY_ROOM_ID
<exclude>
Definition: JoinRoomInvitationRequest.h:141
Definition: SmartFox.cpp:24
Sends an invitation to other users/players to join a specific Room.
Definition: JoinRoomInvitationRequest.h:92
static boost::shared_ptr< string > KEY_AS_SPECT
<exclude>
Definition: JoinRoomInvitationRequest.h:150
Definition: ISFSArray.h:17