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

0001 /*
0002     This file is part of the KDE libraries
0003     SPDX-FileCopyrightText: 2006-2008 Rafael Fernández López <ereslibre@kde.org>
0004     SPDX-FileCopyrightText: 2006-2008 Kevin Ottens <ervin@kde.org>
0005     SPDX-FileCopyrightText: 2000 Matej Koss <koss@miesto.sk>
0006     SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
0007     SPDX-FileCopyrightText: 2000 Stephan Kulow <coolo@kde.org>
0008 
0009     SPDX-License-Identifier: LGPL-2.0-or-later
0010 */
0011 
0012 #ifndef KUISERVERJOBTRACKER_P_H
0013 #define KUISERVERJOBTRACKER_P_H
0014 
0015 #include <memory>
0016 
0017 #include <QDBusServiceWatcher>
0018 
0019 #include "jobviewserverinterface.h"
0020 
0021 class Q_DECL_HIDDEN KSharedUiServerProxy : public QObject
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026     KSharedUiServerProxy();
0027     ~KSharedUiServerProxy() override;
0028 
0029     org::kde::JobViewServer *uiserver();
0030 
0031 Q_SIGNALS:
0032     void serverRegistered();
0033     void serverUnregistered();
0034 
0035 private:
0036     void uiserverOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner);
0037 
0038     std::unique_ptr<org::kde::JobViewServer> m_uiserver;
0039     std::unique_ptr<QDBusServiceWatcher> m_watcher;
0040 };
0041 
0042 #endif