Messagelib

autocryptstorage.h
1 /*
2  SPDX-FileCopyrightText: 2020 Sandro Knauß <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagecore_export.h"
10 
11 #include "autocryptrecipient.h"
12 
13 #include <QSharedPointer>
14 
15 class AutocryptStorageTest;
16 class AutocryptUtilsTest;
17 
18 namespace MessageCore
19 {
20 class AutocryptStoragePrivate;
21 
22 class MESSAGECORE_EXPORT AutocryptStorage
23 {
24 public:
26  static AutocryptStorage::Ptr self();
27 
28  AutocryptRecipient::Ptr getRecipient(const QByteArray &addr);
29  void save();
30  AutocryptRecipient::Ptr addRecipient(const QByteArray &addr);
31  void deleteRecipient(const QByteArray &addr);
32 
33 private:
34  AutocryptStorage();
35  static AutocryptStorage::Ptr mSelf;
36 
37 private:
38  std::unique_ptr<AutocryptStoragePrivate> d_ptr;
39  Q_DECLARE_PRIVATE(AutocryptStorage)
40 
41  friend class ::AutocryptStorageTest;
42  friend class ::AutocryptUtilsTest;
43 };
44 }
const QList< QKeySequence > & save()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Mar 26 2023 04:08:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.