File indexing completed on 2023-09-24 04:02:48
0001 /* 0002 SPDX-FileCopyrightText: 2010-2016 Ivan Cukic <ivan.cukic(at)kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef ACTIVITIES_MANAGER_P 0008 #define ACTIVITIES_MANAGER_P 0009 0010 #include <common/dbus/org.kde.ActivityManager.Activities.h> 0011 0012 #include "activities_interface.h" 0013 #include "application_interface.h" 0014 #include "features_interface.h" 0015 #include "resources_interface.h" 0016 #include "resources_linking_interface.h" 0017 0018 #include <QDBusServiceWatcher> 0019 0020 namespace Service = org::kde::ActivityManager; 0021 0022 namespace KActivities 0023 { 0024 class Manager : public QObject 0025 { 0026 Q_OBJECT 0027 0028 public: 0029 static Manager *self(); 0030 0031 static bool isServiceRunning(); 0032 0033 static Service::Activities *activities(); 0034 static Service::Resources *resources(); 0035 static Service::ResourcesLinking *resourcesLinking(); 0036 static Service::Features *features(); 0037 0038 public Q_SLOTS: 0039 void serviceOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner); 0040 0041 Q_SIGNALS: 0042 void serviceStatusChanged(bool status); 0043 0044 private: 0045 Manager(); 0046 0047 QDBusServiceWatcher m_watcher; 0048 0049 static Manager *s_instance; 0050 0051 Service::Application *const m_service; 0052 Service::Activities *const m_activities; 0053 Service::Resources *const m_resources; 0054 Service::ResourcesLinking *const m_resourcesLinking; 0055 Service::Features *const m_features; 0056 bool m_serviceRunning; 0057 0058 friend class ManagerInstantiator; 0059 }; 0060 0061 } // namespace KActivities 0062 0063 #endif // ACTIVITIES_MANAGER_P