Marble

FileStoragePolicy.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2007 Tobias Koenig <tokoe@kde.org>
4//
5
6#ifndef MARBLE_FILESTORAGEPOLICY_H
7#define MARBLE_FILESTORAGEPOLICY_H
8
9#include "StoragePolicy.h"
10
11namespace Marble
12{
13
14class FileStoragePolicy : public StoragePolicy
15{
17
18public:
19 /**
20 * Creates a new file storage policy.
21 *
22 * @param dataDirectory The directory where the data should go to.
23 * @param parent The parent object.
24 */
25 explicit FileStoragePolicy(const QString &dataDirectory = QString(), QObject *parent = nullptr);
26
27 /**
28 * Destroys the cache storage policy.
29 */
30 ~FileStoragePolicy() override;
31
32 /**
33 * Returns whether the @p fileName exists already.
34 */
35 bool fileExists(const QString &fileName) const override;
36
37 /**
38 * Updates the @p fileName with the given @p data.
39 */
40 bool updateFile(const QString &fileName, const QByteArray &data) override;
41
42 /**
43 * Clears the cache.
44 */
45 void clearCache() override;
46
47 /**
48 * Returns the last error message.
49 */
50 QString lastErrorMessage() const override;
51
52private:
53 Q_DISABLE_COPY(FileStoragePolicy)
54
55 QString m_dataDirectory;
56 QString m_errorMsg;
57};
58
59}
60
61#endif
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.