File indexing completed on 2024-05-12 16:59:20
0001 /* 0002 * SPDX-FileCopyrightText: 2010-2016 Ivan Cukic <ivan.cukic@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 FEATURES_H 0008 #define FEATURES_H 0009 0010 // Qt 0011 #include <QDBusVariant> 0012 #include <QObject> 0013 #include <QString> 0014 0015 // Utils 0016 #include <utils/d_ptr.h> 0017 0018 // Local 0019 #include "Module.h" 0020 0021 /** 0022 * Features object provides one interface for clients 0023 * to access other objects' features 0024 */ 0025 class Features : public Module 0026 { 0027 Q_OBJECT 0028 Q_CLASSINFO("D-Bus Interface", "org.kde.ActivityManager.Features") 0029 0030 public: 0031 explicit Features(QObject *parent = nullptr); 0032 ~Features() override; 0033 0034 public Q_SLOTS: 0035 /** 0036 * Is the feature backend available? 0037 */ 0038 bool IsFeatureOperational(const QString &feature) const; 0039 0040 QStringList ListFeatures(const QString &module) const; 0041 0042 QDBusVariant GetValue(const QString &property) const; 0043 0044 void SetValue(const QString &property, const QDBusVariant &value); 0045 0046 private: 0047 D_PTR; 0048 }; 0049 0050 #endif // FEATURES_H