Ran am2cmake.
[basket4.git] / src / archive.h
blobb7076e0c33e72dae60e5a987c2c81a5a9b28b9e8
1 /***************************************************************************
2 * Copyright (C) 2006 by Sébastien Laoût *
3 * slaout@linux62.org *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef ARCHIVE_H
22 #define ARCHIVE_H
24 #include <q3valuelist.h>
25 #include <qmap.h>
27 class Basket;
28 class Tag;
30 class QString;
31 class QStringList;
32 class QDomNode;
33 class KTar;
34 class KProgress;
36 /**
37 * @author Sébastien Laoût <slaout@linux62.org>
39 class Archive
41 public:
42 static void save(Basket *basket, bool withSubBaskets, const QString &destination);
43 static void open(const QString &path);
44 private:
45 // Convenient Methods for Saving:
46 static void saveBasketToArchive(Basket *basket, bool recursive, KTar *tar, QStringList &backgrounds, const QString &tempFolder, KProgress *progress);
47 static void listUsedTags(Basket *basket, bool recursive, Q3ValueList<Tag*> &list);
48 // Convenient Methods for Loading:
49 static void renameBasketFolders(const QString &extractionFolder, QMap<QString, QString> &mergedStates);
50 static void renameBasketFolder(const QString &extractionFolder, QDomNode &basketNode, QMap<QString, QString> &folderMap, QMap<QString, QString> &mergedStates);
51 static void renameMergedStatesAndBasketIcon(const QString &fullPath, QMap<QString, QString> &mergedStates, const QString &extractionFolder);
52 static void renameMergedStates(QDomNode notes, QMap<QString, QString> &mergedStates);
53 static void importBasketIcon(QDomElement properties, const QString &extractionFolder);
54 static void loadExtractedBaskets(const QString &extractionFolder, QDomNode &basketNode, QMap<QString, QString> &folderMap, Basket *parent);
55 static void importTagEmblems(const QString &extractionFolder);
56 static void importArchivedBackgroundImages(const QString &extractionFolder);
59 #endif