1 // Copyright (c) 2015-2016 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
6 #define BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H
8 #include "zmqabstractnotifier.h"
12 class CZMQAbstractPublishNotifier
: public CZMQAbstractNotifier
15 uint32_t nSequence
; //!< upcounting per message sequence number
19 /* send zmq multipart message
23 * message sequence number
25 bool SendMessage(const char *command
, const void* data
, size_t size
);
27 bool Initialize(void *pcontext
);
31 class CZMQPublishHashBlockNotifier
: public CZMQAbstractPublishNotifier
34 bool NotifyBlock(const CBlockIndex
*pindex
);
37 class CZMQPublishHashTransactionNotifier
: public CZMQAbstractPublishNotifier
40 bool NotifyTransaction(const CTransaction
&transaction
);
43 class CZMQPublishRawBlockNotifier
: public CZMQAbstractPublishNotifier
46 bool NotifyBlock(const CBlockIndex
*pindex
);
49 class CZMQPublishRawTransactionNotifier
: public CZMQAbstractPublishNotifier
52 bool NotifyTransaction(const CTransaction
&transaction
);
55 #endif // BITCOIN_ZMQ_ZMQPUBLISHNOTIFIER_H