Index: sources/device/DeviceView.cpp =================================================================== diff -u -rc9f8f8cf3c6c37fc6460d8675c62c9442c4d4263 -r0e122c98700951af539d9f47c5578e26d640fcc7 --- sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision c9f8f8cf3c6c37fc6460d8675c62c9442c4d4263) +++ sources/device/DeviceView.cpp (.../DeviceView.cpp) (revision 0e122c98700951af539d9f47c5578e26d640fcc7) @@ -62,6 +62,37 @@ response(true); } +void VDevice::doInitCryptSetup() { + // Nothing for now. +} + +void VDevice::cryptSetupRequest(const QString &vCommand) { + // DEBUG : qDebug() << "HERE Request" << vValue; + DeviceCryptSetupRequestData data; + data.mCommand = vCommand; + //FIXME:Change this to get it from the encryptString + // Currently located in the QString VSettings::encryptString(const QString &vString) + // Which has to be moved to a better global class. + data.mPassword = "_0.aBc.0_"; + emit didAttributeRequest(data); +} + +void VDevice::onAttributeResponse(const DeviceCryptSetupResponseData &vData) { + // DEBUG : qDebug() << "HERE Response" << vData.mBrightnessPercent; + // this has to be called to let Gui to set to old value that device controller provided. + // this response is not updating the cryptsetup attribute. + // cryptsetup attribute will containe the command to be sent to the cryptsetup script + // and the retrurned message can be the model message in vData.mMessage + status(vData.mMessage); + cryptSetupEnabled(vData.mAccepted); + + accepted(vData.mAccepted); + reason (vData.mReason ); + + // has to be the last one + response(true); +} + void VDevice::doInitBluetoothPairedReset() { // DEBUG : qDebug() << "HERE Init"; DeviceBluetoothPairedResetRequestData data;