Provide access to the network device discovery cache

This commit is contained in:
Simon Stürz 2022-06-02 14:07:35 +02:00
parent 45081ad64e
commit 08d4599f01
3 changed files with 9 additions and 0 deletions

View File

@ -250,6 +250,11 @@ bool NetworkDeviceDiscoveryImpl::sendArpRequest(const QHostAddress &address)
return false;
}
QHash<MacAddress, NetworkDeviceInfo> NetworkDeviceDiscoveryImpl::cache() const
{
return m_networkInfoCache;
}
void NetworkDeviceDiscoveryImpl::setEnabled(bool enabled)
{
m_enabled = enabled;

View File

@ -78,6 +78,8 @@ public:
bool sendArpRequest(const QHostAddress &address) override;
QHash<MacAddress, NetworkDeviceInfo> cache() const override;
protected:
void setEnabled(bool enabled) override;

View File

@ -67,6 +67,8 @@ public:
virtual bool sendArpRequest(const QHostAddress &address) = 0;
virtual QHash<MacAddress, NetworkDeviceInfo> cache() const = 0;
signals:
void runningChanged(bool running);
void networkDeviceInfoCacheUpdated();