2014-11-18 18:06:32 +01:00
|
|
|
// Copyright (c) 2015 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
|
|
|
|
#define BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
|
|
|
|
|
|
|
|
#include "validationinterface.h"
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
|
2015-09-16 16:42:23 +02:00
|
|
|
class CBlockIndex;
|
2014-11-18 18:06:32 +01:00
|
|
|
class CZMQAbstractNotifier;
|
|
|
|
|
|
|
|
class CZMQNotificationInterface : public CValidationInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~CZMQNotificationInterface();
|
|
|
|
|
|
|
|
static CZMQNotificationInterface* CreateWithArguments(const std::map<std::string, std::string> &args);
|
|
|
|
|
2015-11-01 19:09:17 +01:00
|
|
|
protected:
|
2014-11-18 18:06:32 +01:00
|
|
|
bool Initialize();
|
|
|
|
void Shutdown();
|
|
|
|
|
2015-11-01 19:09:17 +01:00
|
|
|
// CValidationInterface
|
2015-07-27 15:33:03 +02:00
|
|
|
void SyncTransaction(const CTransaction& tx, const CBlockIndex *pindex, const CBlock* pblock);
|
2015-09-16 16:42:23 +02:00
|
|
|
void UpdatedBlockTip(const CBlockIndex *pindex);
|
2014-11-18 18:06:32 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
CZMQNotificationInterface();
|
|
|
|
|
|
|
|
void *pcontext;
|
|
|
|
std::list<CZMQAbstractNotifier*> notifiers;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BITCOIN_ZMQ_ZMQNOTIFICATIONINTERFACE_H
|