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