21 #ifndef M_NODEMODEL_PROTOCOL_INTERFACE_H 22 #define M_NODEMODEL_PROTOCOL_INTERFACE_H 28 class QSslCertificate ;
53 bool aWasInitialGreeting =
false ) = 0 ;
58 virtual const QSslCertificate&
nodeCert()
const = 0 ;
60 virtual const QSslKey&
nodeKey()
const = 0 ;
64 unsigned aMaxNodes) = 0 ;
68 int aMaxInactivityMinutes = -1 ) = 0 ;
71 virtual QList<Node *>*
getHotNodes(
int aMaxNodes) = 0 ;
84 const QHostAddress& aAddr,
144 quint32 aTime ) = 0 ;
virtual void offerNodeToRecentlyFailedList(const Hash &aFailedNodeHash)=0
virtual QList< HostConnectQueueItem > getHotAddresses()=0
Hash iNodeHash
Definition: mnodemodelprotocolinterface.h:49
Node is a peer in network.
Definition: node.h:40
virtual QByteArray * getNextItemToSend(Connection &aConnection)=0
virtual void addNodeFromBroadcast(const Hash &aNodeFingerPrint, const QHostAddress &aAddr, int aPort)=0
virtual QList< Node * > * getNodesBeforeHash(const Hash &aHash, unsigned aMaxNodes)=0
int iPort
Definition: mnodemodelprotocolinterface.h:48
virtual const QSslCertificate & nodeCert() const =0
Definition: mnodemodelprotocolinterface.h:46
virtual Node * nodeByHash(const Hash &aHash)=0
bool operator==(const struct HostConnectQueueItemStructure &a) const
Hash is class that carries 160-bit digest.
Definition: hash.h:38
virtual bool updateNodeLastMutualConnectTimeInDb(const Hash &aNodeFp, quint32 aTime)=0
virtual QList< Node * > * getNodesAfterHash(const Hash &aHash, unsigned aMaxNodes, int aMaxInactivityMinutes=-1)=0
virtual int listenPortOfThisNode()=0
virtual QString getDnsName()=0
virtual const QSslKey & nodeKey() const =0
struct MNodeModelProtocolInterface::HostConnectQueueItemStructure HostConnectQueueItem
virtual Hash & nodeFingerPrint()=0
virtual Node * nextConnectionWishListItem()=0
virtual bool updateNodeLastConnectTimeInDb(Node &aNode)=0
virtual bool nodeGreetingReceived(Node &aNode, bool aWasInitialGreeting=false)=0
virtual void setDnsName(QString aName)=0
virtual void closeOldestInactiveConnection()=0
QHostAddress iAddress
Definition: mnodemodelprotocolinterface.h:47
virtual Hash bucketEndHash(const Hash &aFingerPrintOfNodeAsking)=0
virtual bool isNodeAlreadyConnected(const Node &aNode) const =0
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:39
virtual QList< Node * > * getHotNodes(int aMaxNodes)=0
Class that represents a network connection.
Definition: connection.h:43
virtual bool addNodeToConnectionWishList(Node *aNode)=0
virtual void setListenPortOfThisNode(int port)=0