danicoin/tests/unit_tests/ICryptonoteProtocolQueryStub.h

28 lines
891 B
C
Raw Normal View History

// Copyright (c) 2011-2015 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
2014-09-15 10:48:45 +00:00
#pragma once
#include <cstdint>
#include "cryptonote_protocol/ICryptonoteProtocolObserver.h"
#include "cryptonote_protocol/ICryptonoteProtocolQuery.h"
2014-09-15 10:48:45 +00:00
class ICryptonoteProtocolQueryStub: public cryptonote::ICryptonoteProtocolQuery {
2014-09-15 10:48:45 +00:00
public:
ICryptonoteProtocolQueryStub() : peers(0), observedHeight(0) {}
2014-09-15 10:48:45 +00:00
virtual bool addObserver(cryptonote::ICryptonoteProtocolObserver* observer);
virtual bool removeObserver(cryptonote::ICryptonoteProtocolObserver* observer);
virtual uint64_t getObservedHeight() const;
virtual size_t getPeerCount() const;
void setPeerCount(uint32_t count);
void setObservedHeight(uint64_t height);
2014-09-15 10:48:45 +00:00
private:
size_t peers;
uint64_t observedHeight;
2014-09-15 10:48:45 +00:00
};