Index: sources/device/DeviceView.cpp =================================================================== diff -u -r99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1 -rf0ffeb8c9ec7a838f039b904ce253b001561b5db --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 99e5b87f73c3b849ba33a212ec84cf4bf6ef38f1) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision f0ffeb8c9ec7a838f039b904ce253b001561b5db) @@ -144,3 +144,28 @@ emit bluetoothPairedQueryChanged(vData.mInfo); response(true); } + +// ================================================= Factory Reset +void VDevice::doInitFactoryReset() { + // Nothing for now. +} + +void VDevice::onAttributeResponse(const DeviceFactoryResetResponseData &vData) { + // DEBUG : qDebug() << "HERE Response " << Q_FUNCT_INFO ; + // this has to be called to let Gui to set to old value that device controller provided. + status(vData.mMessage); + factoryResetEnabled(vData.mAccepted); + + accepted(vData.mAccepted); + reason (vData.mReason ); + + // has to be the last one + response(true); +} + +void VDevice::factoryResetRequest(const QString &vCommand) { + Q_UNUSED(vCommand) + // DEBUG : qDebug() << "HERE Request" << vCommand; + DeviceFactoryResetRequestData data; + emit didAttributeRequest(data); +}