job->start();
}
-void ClientSideEncryption::fetchFolderEncryptedStatus()
+void ClientSideEncryption::scheduleFolderEncryptedStatusJob(const QString &path)
{
- _refreshingEncryptionStatus = true;
- _folder2encryptedStatus.clear();
-
- auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, QString());
+ auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, path);
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
- this, &ClientSideEncryption::folderEncryptedStatusFetched);
+ this, &ClientSideEncryption::folderEncryptedStatusFetched);
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusError,
- this, &ClientSideEncryption::folderEncryptedStatusError);
+ this, &ClientSideEncryption::folderEncryptedStatusError);
getEncryptedStatus->start();
_folderStatusJobs.append(getEncryptedStatus);
}
+void ClientSideEncryption::fetchFolderEncryptedStatus()
+{
+ _refreshingEncryptionStatus = true;
+ _folder2encryptedStatus.clear();
+ scheduleFolderEncryptedStatusJob(QString());
+}
+
void ClientSideEncryption::folderEncryptedStatusFetched(const QHash<QString, bool>& result)
{
auto job = static_cast<GetFolderEncryptStatusJob *>(sender());
void folderEncryptedStatusFetchDone(const QHash<QString, bool> &values);
private:
+ void scheduleFolderEncryptedStatusJob(const QString &path);
void getPrivateKeyFromServer();
void getPublicKeyFromServer();
void decryptPrivateKey(const QByteArray &key);