diff --git a/libnymea-zigbee/zigbeesecurityconfiguration.cpp b/libnymea-zigbee/zigbeesecurityconfiguration.cpp index c6d6ec0..5f0f37d 100644 --- a/libnymea-zigbee/zigbeesecurityconfiguration.cpp +++ b/libnymea-zigbee/zigbeesecurityconfiguration.cpp @@ -8,6 +8,7 @@ ZigbeeSecurityConfiguration::ZigbeeSecurityConfiguration() ZigbeeSecurityConfiguration::ZigbeeSecurityConfiguration(const ZigbeeSecurityConfiguration &other) { m_networkKey = other.networkKey(); + m_zigbeeSecurityMode = other.zigbeeSecurityMode(); m_globalTrustCenterLinkKey = other.networkKey(); } @@ -48,6 +49,14 @@ void ZigbeeSecurityConfiguration::clear() m_globalTrustCenterLinkKey = "5A6967426565416C6C69616E63653039"; } +ZigbeeSecurityConfiguration &ZigbeeSecurityConfiguration::operator=(const ZigbeeSecurityConfiguration &other) +{ + m_networkKey = other.networkKey(); + m_zigbeeSecurityMode = other.zigbeeSecurityMode(); + m_globalTrustCenterLinkKey = other.globalTrustCenterLinkKey(); + return *this; +} + bool ZigbeeSecurityConfiguration::operator==(const ZigbeeSecurityConfiguration &other) const { return m_networkKey == other.networkKey() && m_globalTrustCenterLinkKey == other.globalTrustCenterLinkKey() && m_zigbeeSecurityMode == other.zigbeeSecurityMode(); diff --git a/libnymea-zigbee/zigbeesecurityconfiguration.h b/libnymea-zigbee/zigbeesecurityconfiguration.h index ce46b7b..6a3da92 100644 --- a/libnymea-zigbee/zigbeesecurityconfiguration.h +++ b/libnymea-zigbee/zigbeesecurityconfiguration.h @@ -26,6 +26,7 @@ public: void clear(); + ZigbeeSecurityConfiguration &operator=(const ZigbeeSecurityConfiguration &other); bool operator==(const ZigbeeSecurityConfiguration &other) const; bool operator!=(const ZigbeeSecurityConfiguration &other) const;