Changeset View
Changeset View
Standalone View
Standalone View
src/zmq/zmqnotificationinterface.h
// Copyright (c) 2015-2016 The Bitcoin Core developers | // Copyright (c) 2015-2018 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | #ifndef BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | ||||
#define BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | #define BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | ||||
#include <validationinterface.h> | #include <validationinterface.h> | ||||
#include <list> | #include <list> | ||||
#include <map> | #include <map> | ||||
class CBlockIndex; | class CBlockIndex; | ||||
class CZMQAbstractNotifier; | class CZMQAbstractNotifier; | ||||
class CZMQNotificationInterface final : public CValidationInterface { | class CZMQNotificationInterface final : public CValidationInterface { | ||||
public: | public: | ||||
virtual ~CZMQNotificationInterface(); | virtual ~CZMQNotificationInterface(); | ||||
std::list<const CZMQAbstractNotifier *> GetActiveNotifiers() const; | |||||
static CZMQNotificationInterface *Create(); | static CZMQNotificationInterface *Create(); | ||||
protected: | protected: | ||||
bool Initialize(); | bool Initialize(); | ||||
void Shutdown(); | void Shutdown(); | ||||
// CValidationInterface | // CValidationInterface | ||||
void TransactionAddedToMempool(const CTransactionRef &tx) override; | void TransactionAddedToMempool(const CTransactionRef &tx) override; | ||||
Show All 9 Lines | |||||
private: | private: | ||||
CZMQNotificationInterface(); | CZMQNotificationInterface(); | ||||
void *pcontext; | void *pcontext; | ||||
std::list<CZMQAbstractNotifier *> notifiers; | std::list<CZMQAbstractNotifier *> notifiers; | ||||
}; | }; | ||||
extern CZMQNotificationInterface *g_zmq_notification_interface; | |||||
#endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | #endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H |