SmartFoxServer 2X C++ API
RemoveBuddyRequest.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of RemoveBuddyRequest
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __RemoveBuddyRequest__
12 #define __RemoveBuddyRequest__
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 
34  class DLLImportExport RemoveBuddyRequest : public BaseRequest
35  {
36  public:
37 
38  // -------------------------------------------------------------------
39  // Public methods
40  // -------------------------------------------------------------------
41 
83  RemoveBuddyRequest(string buddyName);
84 
85  virtual ~RemoveBuddyRequest();
86 
87  void Validate(boost::shared_ptr<SmartFox> sfs);
88 
89  void Execute(boost::shared_ptr<SmartFox> sfs);
90 
91  // -------------------------------------------------------------------
92  // Public members
93  // -------------------------------------------------------------------
94 
95  static boost::shared_ptr<string> KEY_BUDDY_NAME;
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<string> name;
117  };
118 
119 } // namespace Buddylist
120 } // namespace Requests
121 } // namespace Sfs2X
122 
123 #endif
STL namespace.
Remove a new Buddy fron the current Buddy List
Definition: RemoveBuddyRequest.h:34
Definition: SmartFox.cpp:24