Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -r5967e3c458599ea7af0f298e844eef89004acb03 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 5967e3c458599ea7af0f298e844eef89004acb03) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -7,7 +7,7 @@ * * \file CloudSyncController.h * \author (last) Behrouz NematiPour - * \date (last) 19-Dec-2022 + * \date (last) 07-Apr-2023 * \author (original) Behrouz NematiPour * \date (original) 14-Oct-2021 * @@ -16,7 +16,6 @@ // Qt #include -#include #include // Project @@ -75,6 +74,7 @@ QString _deviceInfoDG = ""; QString _deviceInfoUI = ""; + bool _postPass = false; enum Errors_Enum { // CS : 900 - 949 @@ -105,11 +105,10 @@ eError_LogFolder = 962, eError_LogFileInp = 963, - eError_CredentialMake = 964, // the UI vault folder for cloudsync credentials can't be created. + eError_CredentialPath = 964, // the UI vault folder for cloudsync credentials is not what is expected. eError_CredentialFile = 965, // the credential files sent to UI can't be find or read or doesn't exist.. - eError_CredentialCopy = 966, // the credential files sent to UI can't be copied to UI vault. - eError_CredentialRemove = 967, // the credential files sent to UI can't be removed. - eError_CredentialEmpty = 968, // the UI folder doesn't have credential files. + eError_CredentialCount = 966, // No credential file sent to UI in the message. + eError_CredentialEmpty = 967, // the UI folder doesn't have credential files. eError_TxCodeNoParam = 969, // the received Tx Code not provided eError_TxCodeEmpty = 970, // the received Tx Code is empty @@ -152,8 +151,8 @@ eMessageID_DeviceRegister = 1, // [ UI(1001) -> CS( ) ] Device Registration Request eMessageID_DeviceInfo = 2, // [ CS(2002) <-> UI(1002) ] Device information Request - eMessageID_CredentialsSave = 3, // [ CS(2003) -> UI( ) ] Save Credentials Request - eMessageID_CredentialsSend = 4, // [ CS(2004) <-> UI(1004) ] Send Credentials Request + eMessageID_CredentialsSave = 3, // [ CS(2003) <-> UI(1003) ] Save Credentials Request/Response + // Removed CredentialsSend = 4, // [ CS(2004) <-> UI(1004) ] Send Credentials Request eMessageID_ResetFactory = 5, // [ CS(2005) <-> UI(1005) ] Reset Factory Request // Deployment eMessageID_DeviceState = 6, // [ CS(2006) <-> UI(1006) ] Device State Request @@ -196,15 +195,22 @@ bool init(QThread &vThread); void quit(); + void doRegister (); + private slots: void onWatchFileChange (const QString &vFile); void onActionReceive (GuiActionType vAction, const QVariantList &vData); void onTxPending (const QString &vFileName ); void onInitComplete (); + void onPOSTCloudSync (bool vPass ); + void onCryptSetupMount (bool vPass ); signals: void didInitComplete (); void didTxCodeReceive (const QString &vTxCode); + void didRegisterStart (bool vOK ); + void didRegisterDone (bool vOK ); + void didCloudSyncStatus (bool vReady ); private: void initConnections(); @@ -253,8 +259,8 @@ // device registration request bool sendDeviceRegister (); // eMessageID_DeviceRegister - bool testDeviceRegister (); // eMessageID_DeviceRegister bool isRegistered (); + void testReady(); // device state report bool saveDeviceState (const QVariantList &vData); @@ -265,7 +271,6 @@ bool sendResetFactory (); // eMessageID_ResetFactory bool sendCredentialsSave (const Message &vMessage); // eMessageID_SaveCredentials - bool sendCredentialsSend (); // eMessageID_SendCredentials bool sendCredentialsResponse(); bool sendTxCodeDisplay (const Message &vMessage); // eMessageID_TxCodeDisplay