SmartFoxServer 2X C++ API
SFSInvitation.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SFSInvitation
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SFSInvitation__
12 #define __SFSInvitation__
13 
14 #include "../../Util/Common.h"
15 #include "../Data/ISFSObject.h"
16 #include "../User.h"
17 #include "Invitation.h"
18 
19 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
20 
21 using namespace Sfs2X::Entities;
22 using namespace Sfs2X::Entities::Data;
23 
24 namespace Sfs2X {
25 namespace Entities {
26 namespace Invitation {
27 
45  class DLLImportExport SFSInvitation : public Invitation
46  {
47  public:
48 
49  // -------------------------------------------------------------------
50  // Public methods
51  // -------------------------------------------------------------------
52 
62  SFSInvitation(boost::shared_ptr<User> inviter, boost::shared_ptr<User> invitee);
63 
76  SFSInvitation(boost::shared_ptr<User> inviter, boost::shared_ptr<User> invitee, long int secondsForAnswer);
77 
93  SFSInvitation(boost::shared_ptr<User> inviter, boost::shared_ptr<User> invitee, long int secondsForAnswer, boost::shared_ptr<ISFSObject> parameters);
94 
95  virtual ~SFSInvitation();
96 
97  long int Id();
98  void Id(long int value);
99 
100  boost::shared_ptr<User> Inviter();
101  boost::shared_ptr<User> Invitee();
102  long int SecondsForAnswer();
103  boost::shared_ptr<ISFSObject> Params();
104 
105  // -------------------------------------------------------------------
106  // Public members
107  // -------------------------------------------------------------------
108 
109  protected:
110 
111  // -------------------------------------------------------------------
112  // Protected methods
113  // -------------------------------------------------------------------
114 
115  // -------------------------------------------------------------------
116  // Protected members
117  // -------------------------------------------------------------------
118  // The id is only used when the Invitation is built from a Server Side Invitation
119  long int id;
120  boost::shared_ptr<User> inviter;
121  boost::shared_ptr<User> invitee;
122  long int secondsForAnswer;
123  boost::shared_ptr<ISFSObject> parameters;
124 
125  private:
126 
127  // -------------------------------------------------------------------
128  // Private methods
129  // -------------------------------------------------------------------
130  void Init(boost::shared_ptr<User> inviter, boost::shared_ptr<User> invitee, long int secondsForAnswer, boost::shared_ptr<ISFSObject> parameters);
131 
132  // -------------------------------------------------------------------
133  // Private members
134  // -------------------------------------------------------------------
135  };
136 
137 } // namespace Invitation
138 } // namespace Entities
139 } // namespace Sfs2X
140 
141 #endif
Represents an Invitation object
Definition: Invitation.h:33
Invitation object
Definition: SFSInvitation.h:45
Definition: Buddy.h:30
Definition: SmartFox.cpp:24
Definition: ISFSArray.h:17