SmartFoxServer 2X C++ API
SFSBuddyEvent.h
1 // ===================================================================
2 //
3 // Description
4 // Contains the definition of SFSBuddyEvent
5 //
6 // Revision history
7 // Date Description
8 // 30-Nov-2012 First version
9 //
10 // ===================================================================
11 #ifndef __SFSBuddyEvent__
12 #define __SFSBuddyEvent__
13 
14 #include "../Util/Common.h"
15 #include "../Core/BaseEvent.h"
16 
17 #include <boost/shared_ptr.hpp> // Boost Asio shared pointer
18 
19 #if defined(_MSC_VER)
20 #pragma warning(disable:4786) // STL library: disable warning 4786; this warning is generated due to a Microsoft bug
21 #endif
22 #include <map> // STL library: map object
23 #include <string> // STL library: string object
24 using namespace std; // STL library: declare the STL namespace
25 
26 namespace Sfs2X {
27 namespace Core {
28 
32  class DLLImportExport SFSBuddyEvent : public BaseEvent
33  {
34  public:
35 
36  // -------------------------------------------------------------------
37  // Public methods
38  // -------------------------------------------------------------------
39  SFSBuddyEvent(boost::shared_ptr<string> type);
40  SFSBuddyEvent(boost::shared_ptr<string> type, boost::shared_ptr<map<string, boost::shared_ptr<void> > > args);
41 
42  // -------------------------------------------------------------------
43  // Public members
44  // -------------------------------------------------------------------
45 
84  static boost::shared_ptr<string> BUDDY_LIST_INIT;
85 
112  static boost::shared_ptr<string> BUDDY_ADD;
113 
134  static boost::shared_ptr<string> BUDDY_REMOVE;
135 
156  static boost::shared_ptr<string> BUDDY_BLOCK;
157 
179  static boost::shared_ptr<string> BUDDY_ERROR;
180 
205  static boost::shared_ptr<string> BUDDY_ONLINE_STATE_UPDATE;
206 
235  static boost::shared_ptr<string> BUDDY_VARIABLES_UPDATE;
236 
269  static boost::shared_ptr<string> BUDDY_MESSAGE;
270 
271  protected:
272 
273  // -------------------------------------------------------------------
274  // Protected methods
275  // -------------------------------------------------------------------
276 
277  // -------------------------------------------------------------------
278  // Protected members
279  // -------------------------------------------------------------------
280 
281  private:
282 
283  // -------------------------------------------------------------------
284  // Private methods
285  // -------------------------------------------------------------------
286 
287  // -------------------------------------------------------------------
288  // Private members
289  // -------------------------------------------------------------------
290  };
291 
292 } // namespace Core
293 } // namespace Sfs2X
294 
295 #endif
static boost::shared_ptr< string > BUDDY_LIST_INIT
The Event is fired in response to a InitBuddyListRequest.
Definition: SFSBuddyEvent.h:84
static boost::shared_ptr< string > BUDDY_MESSAGE
The Event is fired in response to a BuddyMessageRequest.
Definition: SFSBuddyEvent.h:269
static boost::shared_ptr< string > BUDDY_REMOVE
The Event is fired in response to a RemoveBuddyRequest.
Definition: SFSBuddyEvent.h:134
STL namespace.
static boost::shared_ptr< string > BUDDY_ADD
The Event is fired in response to a AddBuddyRequest.
Definition: SFSBuddyEvent.h:112
static boost::shared_ptr< string > BUDDY_ERROR
The Event is fired in response to a failed Buddy request, such as AddBuddy, RemoveBuddy etc...
Definition: SFSBuddyEvent.h:179
static boost::shared_ptr< string > BUDDY_VARIABLES_UPDATE
The Event is fired in response to a SetBuddyVariablesRequest.
Definition: SFSBuddyEvent.h:235
This is the Base class of all Events in the API
Definition: BaseEvent.h:34
Definition: SmartFox.cpp:24
This class contains all the Buddy List API related events
Definition: SFSBuddyEvent.h:32
static boost::shared_ptr< string > BUDDY_BLOCK
The Event is fired in response to a BlockBuddyRequest.
Definition: SFSBuddyEvent.h:156
static boost::shared_ptr< string > BUDDY_ONLINE_STATE_UPDATE
The Event is fired in response to a GoOnlineRequest.
Definition: SFSBuddyEvent.h:205