File indexing completed on 2025-01-05 04:47:12
0001 /* 0002 SPDX-FileCopyrightText: 2009 Volker Krause <vkrause@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "akonadi-xml_export.h" 0010 // AkonadiCore 0011 #include "akonadi/collection.h" 0012 #include "akonadi/job.h" 0013 0014 #include <memory> 0015 0016 namespace Akonadi 0017 { 0018 class Collection; 0019 class XmlWriteJobPrivate; 0020 0021 /** 0022 Serializes a given Akonadi collection into a XML file. 0023 */ 0024 class AKONADI_XML_EXPORT XmlWriteJob : public Job 0025 { 0026 Q_OBJECT 0027 public: 0028 XmlWriteJob(const Collection &root, const QString &fileName, QObject *parent = nullptr); 0029 XmlWriteJob(const Collection::List &roots, const QString &fileName, QObject *parent = nullptr); 0030 ~XmlWriteJob() override; 0031 0032 protected: 0033 /* reimpl. */ void doStart() override; 0034 0035 private: 0036 void done(); 0037 0038 private: 0039 friend class XmlWriteJobPrivate; 0040 std::unique_ptr<XmlWriteJobPrivate> const d; 0041 }; 0042 0043 }