File indexing completed on 2024-05-05 04:22:03

0001 /* SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <blackie@kde.org>
0002 
0003    SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 #ifndef XMLHANDLER_H
0006 #define XMLHANDLER_H
0007 
0008 #include "Export.h" // ImageFileLocation
0009 
0010 #include <DB/ImageInfoPtr.h>
0011 #include <kpabase/FileNameList.h>
0012 
0013 #include <QDomDocument>
0014 #include <QDomElement>
0015 #include <QString>
0016 
0017 namespace Utilities
0018 {
0019 class UniqFilenameMapper;
0020 }
0021 
0022 namespace ImportExport
0023 {
0024 class XMLHandler
0025 {
0026 public:
0027     QByteArray createIndexXML(
0028         const DB::FileNameList &images,
0029         const QString &baseUrl,
0030         ImageFileLocation location,
0031         Utilities::UniqFilenameMapper *nameMap);
0032 
0033 protected:
0034     QDomElement save(QDomDocument doc, const DB::ImageInfoPtr &info);
0035     void writeCategories(QDomDocument doc, QDomElement elm, const DB::ImageInfoPtr &info);
0036 };
0037 
0038 }
0039 
0040 #endif /* XMLHANDLER_H */
0041 
0042 // vi:expandtab:tabstop=4 shiftwidth=4: