File indexing completed on 2024-11-24 04:49:37
0001 /* 0002 kleo/keygroupconfig.h 0003 0004 This file is part of libkleopatra, the KDE keymanagement library 0005 SPDX-FileCopyrightText: 2021 g10 Code GmbH 0006 SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include "kleo_export.h" 0014 0015 #include <memory> 0016 #include <vector> 0017 0018 class QString; 0019 0020 namespace GpgME 0021 { 0022 class Key; 0023 } 0024 0025 namespace Kleo 0026 { 0027 class KeyGroup; 0028 0029 class KLEO_EXPORT KeyGroupConfig 0030 { 0031 public: 0032 explicit KeyGroupConfig(const QString &filename); 0033 ~KeyGroupConfig(); 0034 0035 std::vector<KeyGroup> readGroups() const; 0036 0037 void writeGroups(const std::vector<KeyGroup> &groups); 0038 0039 KeyGroup writeGroup(const KeyGroup &group); 0040 0041 bool removeGroup(const KeyGroup &group); 0042 0043 private: 0044 class Private; 0045 std::unique_ptr<Private> d; 0046 }; 0047 0048 }