20 #ifndef MOCKUP_NODEMODEL_H
21 #define MOCKUP_NODEMODEL_H
22 #include "../mcontroller.h"
23 #include "../net/node.h"
24 #include "../datamodel/mmodelprotocolinterface.h"
25 #include "../datamodel/mnodemodelprotocolinterface.h"
45 bool aWasInitialGreeting =
false ) ;
48 virtual const QSslCertificate&
nodeCert()
const ;
50 virtual const QSslKey&
nodeKey()
const ;
58 int aMaxInactivityMinutes = -1 ) ;
75 const QHostAddress& aAddr,
virtual Node * nextConnectionWishListItem()
virtual QString getDnsName()
virtual bool nodeGreetingReceived(Node &aNode, bool aWasInitialGreeting=false)
virtual void closeOldestInactiveConnection()
Node is a peer in network.
Definition: node.h:39
Hash * iFingerPrintOfThisNode
Definition: mockup_nodemodel.h:124
virtual QList< QPair< QHostAddress, int > > getHotAddresses()
virtual QList< Node * > * getNodesAfterHash(const Hash &aHash, int aMaxNodes, int aMaxInactivityMinutes=-1)
virtual const QSslKey & nodeKey() const
virtual bool updateNodeLastConnectTimeInDb(Node &aNode)
MockUpNodeModel(MController *aMController)
Hash is class that carries 160-bit digest.
Definition: hash.h:37
virtual bool updateNodeLastMutualConnectTimeInDb(const Hash &aNodeFp, quint32 aTime)
virtual QByteArray * getNextItemToSend(Connection &aConnection)
Node * iLastNodeReceived
Definition: mockup_nodemodel.h:121
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:39
virtual bool isNodeAlreadyConnected(const Node &aNode) const
virtual void setDnsName(QString aName)
virtual void addNodeFromBroadcast(const Hash &aNodeFingerPrint, const QHostAddress &aAddr, int aPort)
virtual int listenPortOfThisNode()
virtual Node * nodeByHash(const Hash &aHash)
virtual Hash bucketEndHash(const Hash &aFingerPrintOfNodeAsking)
virtual QList< Node * > * getNodesBeforeHash(const Hash &aHash, int aMaxNodes)
virtual QList< Node * > * getHotNodes(int aMaxNodes)
virtual const QSslCertificate & nodeCert() const
virtual void addNodeToConnectionWishList(Node *aNode)
virtual Hash & nodeFingerPrint()
QString iDnsName
Definition: mockup_nodemodel.h:125
Pure-virtual interface of nodemodel.
Definition: mnodemodelprotocolinterface.h:38
MController * iController
Definition: mockup_nodemodel.h:123
Class that represents a network connection.
Definition: connection.h:41
virtual void setListenPortOfThisNode(int port)
not a real part datamodel. debugging aid.
Definition: mockup_nodemodel.h:31