Commit 8829e679 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more virtual method

parent 09f877b0
......@@ -82,6 +82,13 @@ QVector<Utils::AkonadiInstanceInfo> ExportMailJobInterfaceTestImpl::listOfResour
return {};
}
QString ExportMailJobInterfaceTestImpl::storeResources(KZip *archive, const QString &identifier, const QString &path)
{
//TODO
return {};
}
ExportMailJobInterfaceTest::ExportMailJobInterfaceTest(QObject *parent)
: QObject(parent)
{
......@@ -111,3 +118,4 @@ QString ExportMailJobInterfaceTestImpl::convertToFullCollectionPath(const qlongl
ResourceConverterTest converter;
return converter.convertToFullCollectionPath(collectionValue);
}
......@@ -47,6 +47,7 @@ protected:
Q_REQUIRED_RESULT QString convertToFullCollectionPath(const qlonglong collectionValue) override;
void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) override;
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString storeResources(KZip *archive, const QString &identifier, const QString &path) override;
};
class ExportMailJobInterfaceTest : public QObject
......
......@@ -650,7 +650,7 @@ void ExportMailJobInterface::backupResources()
//Store just pop3/imap/kolab/gmail account. Store other config when we copy data.
if (identifier.contains(QLatin1String("pop3")) || identifier.contains(QLatin1String("imap"))
|| identifier.contains(QLatin1String("_kolab_")) || identifier.contains(QLatin1String("_gmail_"))) {
const QString errorStr = Utils::storeResources(archive(), identifier, Utils::resourcesPath());
const QString errorStr = storeResources(archive(), identifier, Utils::resourcesPath());
if (!errorStr.isEmpty()) {
Q_EMIT error(errorStr);
}
......@@ -663,4 +663,3 @@ void ExportMailJobInterface::backupResources()
Q_EMIT info(i18n("Resources backup done."));
}
......@@ -55,6 +55,7 @@ protected:
void slotCheckBackupResources();
virtual void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) = 0;
virtual Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() = 0;
virtual Q_REQUIRED_RESULT QString storeResources(KZip *archive, const QString &identifier, const QString &path) = 0;
private:
void slotCheckBackupIdentity();
void slotCheckBackupMailTransport();
......
......@@ -117,3 +117,7 @@ void ExportMailJobInterfaceImpl::exportResourceToArchive(const QString &archiveP
resourceJob->start();
}
QString ExportMailJobInterfaceImpl::storeResources(KZip *archive, const QString &identifier, const QString &path)
{
return Utils::storeResources(archive, identifier, path);
}
......@@ -44,6 +44,7 @@ protected:
Q_REQUIRED_RESULT QString convertToFullCollectionPath(const qlonglong collectionValue) override;
void exportResourceToArchive(const QString &archivePath, const QString &url, const QString &identifier) override;
Q_REQUIRED_RESULT QVector<Utils::AkonadiInstanceInfo> listOfResource() override;
Q_REQUIRED_RESULT QString storeResources(KZip *archive, const QString &identifier, const QString &path) override;
};
#endif // ExportMailJob_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment