Index: sources/device/DeviceView.h =================================================================== diff -u -r47c8f13876317ba36500400f894d96c9bce9eb17 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/device/DeviceView.h (.../DeviceView.h) (revision 47c8f13876317ba36500400f894d96c9bce9eb17) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file DeviceView.h * \author (last) Behrouz NematiPour - * \date (last) 01-Jun-2021 + * \date (last) 11-Nov-2021 * \author (original) Behrouz NematiPour - * \date (original) 01-Jun-2021 + * \date (original) 03-Jun-2021 * */ #pragma once @@ -47,6 +47,25 @@ ATTRIBUTE ( quint8 , bluetoothPairedReset, 0, BluetoothPairedReset ) ATTRIBUTE ( QStringList , bluetoothPairedQuery, {}, BluetoothPairedQuery ) + ATTRIBUTE ( QString , cryptSetup , "", CryptSetup ) + PROPERTY ( bool , cryptSetupEnabled , true ) + + ATTRIBUTE ( bool , rootSSHAccess , false, RootSSHAccess ) + + ATTRIBUTE ( QString , factoryReset , "", FactoryReset ) + PROPERTY ( bool , factoryResetEnabled , true ) + + ATTRIBUTE ( QString , decommission , "", Decommission ) + PROPERTY ( bool , decommissionEnabled , true ) + VIEW_DEC_CLASS(VDevice) + +private: + bool isCompleteResponse(Model::MDeviceResponseBase::Data vData) { + // Either the script exited successfully or the script failed and the reason is provided + // There are situations that the script is using the attribute response to update the UI + // but it is not the final/completed response + return vData.mAccepted || (!vData.mAccepted && vData.mReason != 0 ); + } }; }