SmartFoxServer 2X C++ API
GoOnlineRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of GoOnlineRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __GoOnlineRequest__
12 #define __GoOnlineRequest__
13 
14 #include "../../Util/Common.h"
15 #include "../BaseRequest.h"
16 #include "../../Exceptions/SFSValidationError.h"
17 
18 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
19 
20 #if defined(_MSC_VER)
21 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
22 #endif
23 #include <list> // STL library: list object
24 #include <string> // STL library: string object
25 using namespace std; // STL library: declare the STL namespace
26 
27 namespace Sfs2X {
28 namespace Requests {
29 namespace Buddylist {
30 
43  class DLLImportExport GoOnlineRequest : public BaseRequest
44  {
45  public:
46 
47  // -------------------------------------------------------------------
48  // Public methods
49  // -------------------------------------------------------------------
50 
59  GoOnlineRequest(bool online);
60 
61  virtual ~GoOnlineRequest();
62 
63  void Validate(boost::shared_ptr<SmartFox> sfs);
64 
65  void Execute(boost::shared_ptr<SmartFox> sfs);
66 
67  // -------------------------------------------------------------------
68  // Public members
69  // -------------------------------------------------------------------
70 
71  static boost::shared_ptr<string> KEY_ONLINE;
72 
73  static boost::shared_ptr<string> KEY_BUDDY_NAME;
74 
75  static boost::shared_ptr<string> KEY_BUDDY_ID;
76 
77  protected:
78 
79  // -------------------------------------------------------------------
80  // Protected methods
81  // -------------------------------------------------------------------
82 
83  // -------------------------------------------------------------------
84  // Protected members
85  // -------------------------------------------------------------------
86 
87  private:
88 
89  // -------------------------------------------------------------------
90  // Private methods
91  // -------------------------------------------------------------------
92 
93  // -------------------------------------------------------------------
94  // Private members
95  // -------------------------------------------------------------------
96  bool online;
97  };
98 
99 } // namespace Buddylist
100 } // namespace Requests
101 } // namespace Sfs2X
102 
103 #endif
Toggles the Buddy ONLINE status of the User.
Definition: GoOnlineRequest.h:43
STL namespace.
Definition: SmartFox.cpp:24