File indexing completed on 2024-12-01 08:10:31
0001 /* 0002 * SPDX-FileCopyrightText: 2017 Ivan Cukic <ivan.cukic (at) kde.org> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef PLASMAVAULT_PLASMA_VAULTSMODEL_P_H 0008 #define PLASMAVAULT_PLASMA_VAULTSMODEL_P_H 0009 0010 #include <QDBusInterface> 0011 #include <QDBusServiceWatcher> 0012 0013 #include "plasmavault_interface.h" 0014 #include <common/vaultinfo.h> 0015 0016 class VaultsModel::Private : public QObject 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit Private(VaultsModel *parent); 0022 QStringList vaultKeys; 0023 QMap<QString, PlasmaVault::VaultInfo> vaults; 0024 0025 public Q_SLOTS: 0026 void onVaultAdded(const PlasmaVault::VaultInfo &vaultData); 0027 void onVaultRemoved(const QString &device); 0028 void onVaultChanged(const PlasmaVault::VaultInfo &vaultData); 0029 0030 void loadData(); 0031 void clearData(); 0032 0033 public: 0034 org::kde::plasmavault service; 0035 QDBusServiceWatcher serviceWatcher; 0036 0037 QSet<QString> busyVaults; 0038 QSet<QString> errorVaults; 0039 0040 VaultsModel *const q; 0041 }; 0042 0043 #endif // include guard