1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2010 Martin Sandsmark <martin.sandsmark@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7*/
8#ifndef ATTICA_PRIVATEDATA_H
9#define ATTICA_PRIVATEDATA_H
10
11#include "provider.h"
12
13#include <QDateTime>
14#include <QList>
15#include <QMap>
16#include <QSharedDataPointer>
17#include <QUrl>
18
19#include "attica_export.h"
20
21namespace Attica
22{
23
24/**
25 * @class PrivateData privatedata.h <Attica/PrivateData>
26 *
27 * Represents private data.
28 */
29class ATTICA_EXPORT PrivateData
30{
31public:
32 class Parser;
33
34 typedef QList<PrivateData> List; // nonsense
35
36 PrivateData();
37 PrivateData(const PrivateData &other);
38 PrivateData &operator=(const PrivateData &other);
39 ~PrivateData();
40
41 /**
42 * Sets an attribute referenced by \key to \value.
43 */
44 void setAttribute(const QString &key, const QString &value);
45
46 /**
47 * Returns an attribute referenced by \key.
48 */
49 QString attribute(const QString &key) const;
50
51 /**
52 * Sets when an attribute last was changed (mostly for internal use).
53 */
54 void setTimestamp(const QString &key, const QDateTime &when);
55
56 /**
57 * Returns the date and time an attribute last was changed.
58 */
59 QDateTime timestamp(const QString &key) const;
60
61 /**
62 * Returns a list of fetched keys.
63 */
64 QStringList keys() const;
65
66private:
67 class Private;
68 QSharedDataPointer<Private> d;
69};
70
71}
72
73#endif // ATTICA_ATTRIBUTES_H
74

source code of attica/src/privatedata.h