From 60db89ce74376370a8517234f58675087d1bdbc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 13 Jan 2020 09:35:26 +0100 Subject: [PATCH] Add assign operator for zigbee security configuration --- libnymea-zigbee/zigbeesecurityconfiguration.cpp | 7 +++++++ libnymea-zigbee/zigbeesecurityconfiguration.h | 1 + 2 files changed, 8 insertions(+) diff --git a/libnymea-zigbee/zigbeesecurityconfiguration.cpp b/libnymea-zigbee/zigbeesecurityconfiguration.cpp index c6d6ec0..e0507cd 100644 --- a/libnymea-zigbee/zigbeesecurityconfiguration.cpp +++ b/libnymea-zigbee/zigbeesecurityconfiguration.cpp @@ -48,6 +48,13 @@ void ZigbeeSecurityConfiguration::clear() m_globalTrustCenterLinkKey = "5A6967426565416C6C69616E63653039"; } +ZigbeeSecurityConfiguration &ZigbeeSecurityConfiguration::operator=(const ZigbeeSecurityConfiguration &other) +{ + m_networkKey = other.networkKey(); + 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;