File indexing completed on 2024-12-22 05:05:23
0001 /* 0002 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "importalarmjobinterfaceimpl.h" 0008 #include "archivestorage.h" 0009 0010 #include <MailCommon/MailUtil> 0011 #include <PimCommonAkonadi/CreateResource> 0012 0013 #include <KArchive> 0014 #include <KArchiveEntry> 0015 0016 #include "resourceconverterimpl.h" 0017 #include <QStandardPaths> 0018 0019 ImportAlarmJobInterfaceImpl::ImportAlarmJobInterfaceImpl(QObject *parent, Utils::StoredTypes typeSelected, ArchiveStorage *archiveStorage, int numberOfStep) 0020 : ImportAlarmJobInterface(parent, typeSelected, archiveStorage, numberOfStep) 0021 { 0022 } 0023 0024 ImportAlarmJobInterfaceImpl::~ImportAlarmJobInterfaceImpl() = default; 0025 0026 Akonadi::Collection::Id ImportAlarmJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path) 0027 { 0028 ResourceConverterImpl converter; 0029 return converter.convertFolderPathToCollectionId(path); 0030 } 0031 0032 QString ImportAlarmJobInterfaceImpl::adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) 0033 { 0034 ResourceConverterImpl converter; 0035 return converter.adaptResourcePath(resourceConfig, storedData); 0036 } 0037 0038 QString 0039 ImportAlarmJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) 0040 { 0041 return mCreateResource->createResource(resources, name, settings, synchronizeTree); 0042 } 0043 0044 QString ImportAlarmJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) 0045 { 0046 ResourceConverterImpl converter; 0047 return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath); 0048 } 0049 0050 void ImportAlarmJobInterfaceImpl::synchronizeResource(const QStringList &lst) 0051 { 0052 startSynchronizeResources(lst); 0053 } 0054 0055 #include "moc_importalarmjobinterfaceimpl.cpp"