danicoin/src/P2p/IP2pNodeInternal.h

27 lines
798 B
C
Raw Normal View History

// Copyright (c) 2011-2016 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
2015-05-27 12:08:46 +00:00
#pragma once
2015-07-30 15:22:07 +00:00
#include <list>
#include "P2pProtocolDefinitions.h"
2015-05-27 12:08:46 +00:00
namespace CryptoNote {
2015-07-30 15:22:07 +00:00
class P2pContext;
2015-05-27 12:08:46 +00:00
2015-07-30 15:22:07 +00:00
class IP2pNodeInternal {
2015-05-27 12:08:46 +00:00
public:
2015-07-30 15:22:07 +00:00
virtual const CORE_SYNC_DATA& getGenesisPayload() const = 0;
virtual std::list<PeerlistEntry> getLocalPeerList() const = 0;
virtual basic_node_data getNodeData() const = 0;
virtual PeerIdType getPeerId() const = 0;
virtual void handleNodeData(const basic_node_data& node, P2pContext& ctx) = 0;
virtual bool handleRemotePeerList(const std::list<PeerlistEntry>& peerlist, time_t local_time) = 0;
virtual void tryPing(P2pContext& ctx) = 0;
2015-05-27 12:08:46 +00:00
};
2015-07-30 15:22:07 +00:00
}