File indexing completed on 2024-12-22 05:05:26
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 "importcalendarjobinterfaceimpl.h" 0008 #include "archivestorage.h" 0009 0010 #include <PimCommonAkonadi/CreateResource> 0011 0012 #include <KArchive> 0013 #include <KArchiveDirectory> 0014 #include <KArchiveEntry> 0015 0016 #include "resourceconverterimpl.h" 0017 #include <MailCommon/MailUtil> 0018 #include <QStandardPaths> 0019 0020 ImportCalendarJobInterfaceImpl::ImportCalendarJobInterfaceImpl(QObject *parent, 0021 Utils::StoredTypes typeSelected, 0022 ArchiveStorage *archiveStorage, 0023 int numberOfStep) 0024 : ImportCalendarJobInterface(parent, typeSelected, archiveStorage, numberOfStep) 0025 { 0026 } 0027 0028 ImportCalendarJobInterfaceImpl::~ImportCalendarJobInterfaceImpl() = default; 0029 0030 QString ImportCalendarJobInterfaceImpl::adaptResourcePath(const KSharedConfigPtr &resourceConfig, const QString &storedData) 0031 { 0032 ResourceConverterImpl converter; 0033 return converter.adaptResourcePath(resourceConfig, storedData); 0034 } 0035 0036 Akonadi::Collection::Id ImportCalendarJobInterfaceImpl::convertFolderPathToCollectionId(const QString &path) 0037 { 0038 ResourceConverterImpl converter; 0039 return converter.convertFolderPathToCollectionId(path); 0040 } 0041 0042 QString 0043 ImportCalendarJobInterfaceImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree) 0044 { 0045 return mCreateResource->createResource(resources, name, settings, synchronizeTree); 0046 } 0047 0048 void ImportCalendarJobInterfaceImpl::synchronizeResource(const QStringList &lst) 0049 { 0050 startSynchronizeResources(lst); 0051 } 0052 0053 QString ImportCalendarJobInterfaceImpl::adaptNewResourceUrl(bool overwriteResources, const KSharedConfig::Ptr &resourceConfig, const QString &storePath) 0054 { 0055 ResourceConverterImpl converter; 0056 return converter.adaptNewResourceUrl(overwriteResources, resourceConfig, storePath); 0057 } 0058 0059 #include "moc_importcalendarjobinterfaceimpl.cpp"