Marble

StoragePolicy.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2007 Tobias Koenig <[email protected]>
4 // SPDX-FileCopyrightText: 2009 Bastian Holst <[email protected]>
5 //
6 
7 #ifndef MARBLE_STORAGEPOLICY_H
8 #define MARBLE_STORAGEPOLICY_H
9 
10 
11 #include <QObject>
12 
13 class QByteArray;
14 class QString;
15 
16 namespace Marble
17 {
18 
19 class StoragePolicy : public QObject
20 {
21  Q_OBJECT
22 
23  public:
24  explicit StoragePolicy( QObject *parent = nullptr );
25 
26  ~StoragePolicy() override {}
27 
28  virtual bool fileExists( const QString &fileName ) const = 0;
29 
30  /**
31  * Return true if file was written successfully.
32  */
33  virtual bool updateFile( const QString &fileName, const QByteArray &data ) = 0;
34 
35  virtual void clearCache() = 0;
36 
37  virtual QString lastErrorMessage() const = 0;
38 
39  Q_SIGNALS:
40  void cleared();
41  void sizeChanged( qint64 );
42 
43  private:
44  Q_DISABLE_COPY( StoragePolicy )
45 };
46 
47 }
48 
49 #endif
Q_OBJECTQ_OBJECT
Binds a QML item to a specific geodetic location in screen coordinates.
Q_SIGNALSQ_SIGNALS
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.