Added SubscriptionHandler capability to Subscriptions.
This commit is contained in:
1 parent
69dcbae428
commit
001cd8c06c
152 files changed
+15005
-64
No files matched your search
+8
-2
@@ -1,9 +1,10 @@
|
||||
#ifndef __Subscription_h__
|
||||
#define __Subscription_h__
|
||||
|
||||
#include "SubscriptionHandler.h"
|
||||
#include "ZString.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace core
|
||||
{
|
||||
@@ -15,7 +16,8 @@ namespace core
|
||||
|
||||
public:
|
||||
Subscription(std::string id, std::string mode = "*AUTHOR");
|
||||
Subscription(std::string id, TCPSession &session, std::string mode = "*AUTHOR");
|
||||
Subscription(std::string id, TCPSession &session, std::string mode);
|
||||
Subscription(std::string id, TCPSession &session, std::string mode, SubscriptionHandler *handler);
|
||||
virtual ~Subscription();
|
||||
|
||||
int subscribe(TCPSession &session);
|
||||
@@ -29,12 +31,16 @@ namespace core
|
||||
|
||||
bool ifSubscriber(TCPSession &session);
|
||||
|
||||
// void setHandler(SubscriptionHandler *handlers);
|
||||
|
||||
// int processCommand(coreutils::ZString &request, TCPSession &session) override;
|
||||
|
||||
std::string id;
|
||||
std::string mode;
|
||||
TCPSession *owner;
|
||||
|
||||
SubscriptionHandler *handler;
|
||||
|
||||
std::vector<TCPSession *> subscribers;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user