File indexing completed on 2024-12-08 03:41:13

0001 /*
0002     This file is part of the KDE project
0003     SPDX-FileCopyrightText: 2021 Kai Uwe Broulik <kde@broulik.de>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef KUISERVERV2JOBTRACKER_P_H
0009 #define KUISERVERV2JOBTRACKER_P_H
0010 
0011 #include <memory>
0012 
0013 #include <QDBusServiceWatcher>
0014 
0015 #include "jobviewserverv2interface.h"
0016 
0017 class Q_DECL_HIDDEN KSharedUiServerV2Proxy : public QObject
0018 {
0019     Q_OBJECT
0020 
0021 public:
0022     KSharedUiServerV2Proxy();
0023     ~KSharedUiServerV2Proxy() override;
0024 
0025     org::kde::JobViewServerV2 *uiserver();
0026 
0027 Q_SIGNALS:
0028     void serverRegistered();
0029     void serverUnregistered();
0030 
0031 private:
0032     void uiserverOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner);
0033 
0034     std::unique_ptr<org::kde::JobViewServerV2> m_uiserver;
0035     std::unique_ptr<QDBusServiceWatcher> m_watcher;
0036 };
0037 
0038 #endif