?
This commit is contained in:
1 parent
fd70c79282
commit
db199eaec3
218 files changed
+15584
-295
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#ifndef __SubscriptionManager_h__
|
||||
#define __SubscriptionManager_h__
|
||||
|
||||
#include "Command.h"
|
||||
#include "Subscription.h"
|
||||
#include "SubscriptionHandler.h"
|
||||
#include "TCPSession.h"
|
||||
#include "ZString.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace core
|
||||
{
|
||||
|
||||
class SubscriptionManager : public Command
|
||||
{
|
||||
|
||||
public:
|
||||
SubscriptionManager();
|
||||
|
||||
int add(Subscription &subscription);
|
||||
int add(Subscription &subscription, std::string handler);
|
||||
int addHandler(std::string name, SubscriptionHandler *handler);
|
||||
|
||||
int removeSessionSubscriptions(TCPSession &session);
|
||||
|
||||
int processCommand(coreutils::ZString &request, TCPSession &session) override;
|
||||
|
||||
private:
|
||||
Subscription *subscription;
|
||||
std::map<std::string, Subscription *> subscriptions;
|
||||
std::map<std::string, SubscriptionHandler *> handlers;
|
||||
Subscription *newSubscription;
|
||||
std::mutex lock;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user