SmartFoxServer 2X C++ API
InvitationReplyRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of InvitationReplyRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __InvitationReplyRequest__
12 #define __InvitationReplyRequest__
13 
14 #include "../../Util/Common.h"
15 #include "../BaseRequest.h"
16 #include "../CreateRoomRequest.h"
17 #include "../../Entities/Invitation/Invitation.h"
18 #include "../../Entities/Invitation/InvitationReply.h"
19 #include "../../Entities/Data/ISFSObject.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 <list> // STL library: list 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 using namespace Sfs2X::Entities::Invitation;
32 
33 namespace Sfs2X {
34 namespace Requests {
35 namespace Game {
36 
43  class DLLImportExport InvitationReplyRequest : public BaseRequest
44  {
45  public:
46 
47  // -------------------------------------------------------------------
48  // Public methods
49  // -------------------------------------------------------------------
50 
54  InvitationReplyRequest(boost::shared_ptr<Sfs2X::Entities::Invitation::Invitation> invitation, boost::shared_ptr<InvitationReply> reply);
55 
104  InvitationReplyRequest(boost::shared_ptr<Sfs2X::Entities::Invitation::Invitation> invitation, boost::shared_ptr<InvitationReply> reply, boost::shared_ptr<ISFSObject> parameters);
105 
106  virtual ~InvitationReplyRequest();
107 
108  void Validate(boost::shared_ptr<SmartFox> sfs);
109 
110  void Execute (boost::shared_ptr<SmartFox> sfs);
111 
112  // -------------------------------------------------------------------
113  // Public members
114  // -------------------------------------------------------------------
115 
116  static boost::shared_ptr<string> KEY_INVITATION_ID;
117 
118  static boost::shared_ptr<string> KEY_INVITATION_REPLY;
119 
120  static boost::shared_ptr<string> KEY_INVITATION_PARAMS;
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  void Init(boost::shared_ptr<Sfs2X::Entities::Invitation::Invitation> invitation, boost::shared_ptr<InvitationReply> reply, boost::shared_ptr<ISFSObject> parameters);
138 
139  // -------------------------------------------------------------------
140  // Private members
141  // -------------------------------------------------------------------
142  boost::shared_ptr<Sfs2X::Entities::Invitation::Invitation> invitation;
143  boost::shared_ptr<InvitationReply> reply;
144  boost::shared_ptr<ISFSObject> parameters;
145  };
146 
147 } // namespace Game
148 } // namespace Requests
149 } // namespace Sfs2X
150 
151 #endif
STL namespace.
Send a reply to an Invitation.
Definition: InvitationReplyRequest.h:43
Definition: Invitation.h:24
Definition: SmartFox.cpp:24
Definition: ISFSArray.h:17