Changeset View
Changeset View
Standalone View
Standalone View
src/zmq/zmqnotificationinterface.h
// Copyright (c) 2015-2018 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 <memory> | |||||
class CBlockIndex; | class CBlockIndex; | ||||
class CZMQAbstractNotifier; | class CZMQAbstractNotifier; | ||||
class CZMQNotificationInterface final : public CValidationInterface { | class CZMQNotificationInterface final : public CValidationInterface { | ||||
public: | public: | ||||
virtual ~CZMQNotificationInterface(); | virtual ~CZMQNotificationInterface(); | ||||
Show All 14 Lines | protected: | ||||
void UpdatedBlockTip(const CBlockIndex *pindexNew, | void UpdatedBlockTip(const CBlockIndex *pindexNew, | ||||
const CBlockIndex *pindexFork, | const CBlockIndex *pindexFork, | ||||
bool fInitialDownload) override; | bool fInitialDownload) override; | ||||
private: | private: | ||||
CZMQNotificationInterface(); | CZMQNotificationInterface(); | ||||
void *pcontext; | void *pcontext; | ||||
std::list<CZMQAbstractNotifier *> notifiers; | std::list<std::unique_ptr<CZMQAbstractNotifier>> notifiers; | ||||
}; | }; | ||||
extern CZMQNotificationInterface *g_zmq_notification_interface; | extern CZMQNotificationInterface *g_zmq_notification_interface; | ||||
#endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H | #endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H |