20 #ifndef M_NODEMODEL_PROTOCOL_INTERFACE_H
21 #define M_NODEMODEL_PROTOCOL_INTERFACE_H
27 class QSslCertificate ;
41 bool aWasInitialGreeting =
false ) = 0 ;
46 virtual const QSslCertificate&
nodeCert()
const = 0 ;
48 virtual const QSslKey&
nodeKey()
const = 0 ;
52 unsigned aMaxNodes) = 0 ;
56 int aMaxInactivityMinutes = -1 ) = 0 ;
59 virtual QList<Node *>*
getHotNodes(
int aMaxNodes) = 0 ;
72 const QHostAddress& aAddr,
130 quint32 aTime ) = 0 ;
Node is a peer in network.
Definition: node.h:39
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
virtual const QSslCertificate & nodeCert() const =0
virtual Node * nodeByHash(const Hash &aHash)=0
Hash is class that carries 160-bit digest.
Definition: hash.h:37
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
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 addNodeToConnectionWishList(Node *aNode)=0
virtual void closeOldestInactiveConnection()=0
virtual Hash bucketEndHash(const Hash &aFingerPrintOfNodeAsking)=0
virtual bool isNodeAlreadyConnected(const Node &aNode) const =0
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:38
virtual QList< Node * > * getHotNodes(int aMaxNodes)=0
Class that represents a network connection.
Definition: connection.h:41
virtual void setListenPortOfThisNode(int port)=0
virtual QList< QPair< QHostAddress, int > > getHotAddresses()=0