SmartFoxServer 2X C++ API
SetBuddyVariablesRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SetBuddyVariablesRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SetBuddyVariablesRequest__
12 #define __SetBuddyVariablesRequest__
13 
14 #include "../../Util/Common.h"
15 #include "../BaseRequest.h"
16 #include "../../Exceptions/SFSValidationError.h"
17 #include "../../Entities/Variables/BuddyVariable.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 namespace Sfs2X {
29 namespace Requests {
30 namespace Buddylist {
31 
35  class DLLImportExport SetBuddyVariablesRequest : public BaseRequest
36  {
37  public:
38 
39  // -------------------------------------------------------------------
40  // Public methods
41  // -------------------------------------------------------------------
42 
81  SetBuddyVariablesRequest(boost::shared_ptr<list<boost::shared_ptr<BuddyVariable> > > buddyVariables);
82 
83  virtual ~SetBuddyVariablesRequest();
84 
85  void Validate(boost::shared_ptr<SmartFox> sfs);
86 
87  void Execute(boost::shared_ptr<SmartFox> sfs);
88 
89  // -------------------------------------------------------------------
90  // Public members
91  // -------------------------------------------------------------------
92 
93  static boost::shared_ptr<string> KEY_BUDDY_NAME;
94 
95  static boost::shared_ptr<string> KEY_BUDDY_VARS;
96 
97  protected:
98 
99  // -------------------------------------------------------------------
100  // Protected methods
101  // -------------------------------------------------------------------
102 
103  // -------------------------------------------------------------------
104  // Protected members
105  // -------------------------------------------------------------------
106 
107  private:
108 
109  // -------------------------------------------------------------------
110  // Private methods
111  // -------------------------------------------------------------------
112 
113  // -------------------------------------------------------------------
114  // Private members
115  // -------------------------------------------------------------------
116  boost::shared_ptr<list<boost::shared_ptr<BuddyVariable> > > buddyVariables;
117  };
118 
119 } // namespace Buddylist
120 } // namespace Requests
121 } // namespace Sfs2X
122 
123 #endif
STL namespace.
Definition: SmartFox.cpp:24
Sets one or more BuddyVariables for the current User. This will update all Users in the Zona who have...
Definition: SetBuddyVariablesRequest.h:35