Commit 4363ea8f authored by Albert Vaca Cintora's avatar Albert Vaca Cintora

Device class now stores the protocolVersion of the device

parent 44f5c709
......@@ -44,10 +44,9 @@ Device::Device(const NetworkPackage& identityPackage, DeviceLink* dl)
m_deviceId = identityPackage.get<QString>("deviceId");
m_deviceName = identityPackage.get<QString>("deviceName");
int protocolVersion = identityPackage.get<int>("protocolVersion");
if (protocolVersion != NetworkPackage::ProtocolVersion) {
qDebug() << m_deviceName << "- warning, device uses a different protocol version" << protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
//TODO: Do something
m_protocolVersion = identityPackage.get<int>("protocolVersion");
if (m_protocolVersion != NetworkPackage::ProtocolVersion) {
qWarning() << m_deviceName << "- warning, device uses a different protocol version" << m_protocolVersion << "expected" << NetworkPackage::ProtocolVersion;
}
addLink(dl);
......
......@@ -102,10 +102,12 @@ Q_SIGNALS:
Q_SCRIPTABLE void unpaired();
private:
//TODO: Replace device id by public key
QString m_deviceId;
QString m_deviceName;
QCA::PublicKey m_publicKey;
PairStatus m_pairStatus;
int m_protocolVersion;
QList<DeviceLink*> m_deviceLinks;
QMap<QString, KdeConnectPlugin*> m_plugins;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment