00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef PUBSUBEVENTHANDLER_H__
00014 #define PUBSUBEVENTHANDLER_H__
00015
00016 #include "macros.h"
00017 #include "pubsub.h"
00018
00019 #include <string>
00020
00021 namespace gloox
00022 {
00023
00024 class JID;
00025 class Tag;
00026 class DataForm;
00027
00028 namespace PubSub
00029 {
00030
00036 class GLOOX_API EventHandler
00037 {
00038 public:
00042 virtual ~EventHandler() {}
00043
00050 virtual void handleNodeCreation( const JID& service,
00051 const std::string& node,
00052 const DataForm* config ) = 0;
00053
00059 virtual void handleNodeRemoval( const JID& service,
00060 const std::string& node ) = 0;
00061
00069 virtual void handleItemPublication( const JID& service,
00070 const std::string& node,
00071 const std::string& item,
00072 const Tag* entry ) = 0;
00073
00080 virtual void handleItemRemoval( const JID& service,
00081 const std::string& node,
00082 const std::string& item) = 0;
00083
00092 virtual void handleSubscriptionChange( const JID& service,
00093 const JID& jid,
00094 const std::string& node,
00095 const std::string& reason,
00096 SubscriptionType type ) = 0;
00097
00104 virtual void handleConfigurationChange( const JID& service,
00105 const std::string& node,
00106 const DataForm* config ) = 0;
00107
00113 virtual void handleNodePurge( const JID& service,
00114 const std::string& node ) = 0;
00115
00116 };
00117
00118 }
00119
00120 }
00121
00122 #endif
00123