Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -r1bf8c894c5cc5ea6d62af0662fcf5a18e1a06459 -re7d731932dbc46bb459190e8a46cb9f7c4b54f01 --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 1bf8c894c5cc5ea6d62af0662fcf5a18e1a06459) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision e7d731932dbc46bb459190e8a46cb9f7c4b54f01) @@ -1,13 +1,13 @@ /*! * - * Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 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 CloudSyncController.h * \author (last) Behrouz NematiPour - * \date (last) 14-Aug-2023 + * \date (last) 20-Nov-2023 * \author (original) Behrouz NematiPour * \date (original) 14-Oct-2021 * @@ -79,6 +79,7 @@ bool _checkinRcvd = false; // id check-in received will set to true. bool _postPass = false; + bool _isWatching = false; enum Errors_Enum { // CS : 900 - 949 @@ -129,6 +130,9 @@ eError_OutFileEmpty = 971, // Out file has changed from CS2UI but the content is empty. eError_NotRegistered = 972, // avoid sending any message other than the device registration, when device is not registered. + + eError_LogNameNoParam = 973, // the received Log Name not provided + eError_LogNameEmpty = 974, // the received Log Name is empty }; typedef QHash MessageList; @@ -173,8 +177,13 @@ eMessageID_TxReport = 7, // [ UI(1007) -> CS(2007) ] TxReport Notify // Tx Code eMessageID_TxCodeDisplay = 8, // [ CS(2008) -> UI( ) ] Display TxCode Request + // Decommissioning + eMessageID_CSDecommissioning= 9, // [ UI(1009) <-> CS(2009) ] Decommissioning Request + // Log Upload + eMessageID_SendLogUpload = 10, // [ UI(1010) <-> CS(2010) ] Log Upload Request/Response + // Factory Reset + eMessageID_CSFactoryReset = 99, // [ UI(1009) <-> CS(2009) ] Factory Reset Request // NOT IMPLEMENTED - eMessageID_CSFactoryReset = 9, // [ UI(1009) <-> CS(2009) ] Factory Reset Request // // Subject to change so has been commented out for now // @@ -187,10 +196,11 @@ eMessageID_Count }; - QHash paramCount { + QHash paramCount { // Received message length { eMessageID_CredentialsSave , 3 }, { eMessageID_TxCodeDisplay , 1 }, { eMessageID_Error , 2 }, + { eMessageID_SendLogUpload , 1 }, }; enum DeviceInfo_Enum { @@ -214,15 +224,18 @@ private slots: void onWatchFileChange (const QString &vFile); void onActionReceive (GuiActionType vAction, const QVariantList &vData); - void onTxPending (const QString &vFileName ); + void onPendingTxr (const QString &vFileName ); + void onPendingLog (const QString &vFileName, const QString vChecksum ); void onInitComplete (); void onPOSTCloudSync (bool vPass ); void onCryptSetupMount (bool vPass ); void onFactoryReset (bool vPass ); + void onDecommissioning (bool vPass ); signals: void didInitComplete (); - void didTxCodeReceive (const QString &vTxCode); + void didTxCodeReceive (const QString &vTxCode ); + void didLogUpload (const QString &vFileName ); void didRegisterStart (bool vOK ); void didRegisterDone (bool vOK ); void didCloudSyncStatus (bool vReady ); @@ -285,7 +298,8 @@ // Factory Reset - void csFactoryReset (); // eMessageID_FactoryReset + bool csDecommissioning (); // eMessageID_CSDecommissioning + bool csFactoryReset (); // eMessageID_CSFactoryReset bool uiFactoryReset (); // eMessageID_FactoryReset bool sendFactoryReset (); // eMessageID_FactoryReset @@ -299,8 +313,12 @@ void testCheckIn (); bool takeCheckIn (); - // pending log - void sendPendingLog ( const QString &vFileName ); // eMessageID_TxReport + // pending Treatment log + void sendPendingTxr ( const QString &vFileName ); // eMessageID_TxReport bool sendTxCodeDisplay ( const Message &vMessage ); // eMessageID_TxCodeDisplay + // pending Treatment log + void sendPendingLog (const QString &vFileName , const QString vChecksum); // eMessageID_SendLogUpload + bool rcvdPendingLog (const Message &vMessage ); // eMessageID_SendLogUpload + };