2017-06-29 00:57:46 +01:00
|
|
|
/**
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-FileCopyrightText: 2018 Albert Vaca Cintora <albertvaka@gmail.com>
|
2020-01-23 15:57:08 +00:00
|
|
|
* SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
|
2017-06-29 00:57:46 +01:00
|
|
|
*
|
2020-08-17 10:48:10 +01:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
2017-06-29 00:57:46 +01:00
|
|
|
*/
|
|
|
|
|
2023-07-21 19:22:59 +01:00
|
|
|
#pragma once
|
2017-06-29 00:57:46 +01:00
|
|
|
|
2018-04-02 19:20:24 +01:00
|
|
|
#include "abstractremoteinput.h"
|
2023-07-24 13:18:47 +01:00
|
|
|
#include "generated/systeminterfaces/remotedesktop.h"
|
2020-01-23 15:57:08 +00:00
|
|
|
#include <QDBusObjectPath>
|
2017-06-29 00:57:46 +01:00
|
|
|
|
2022-04-12 15:31:08 +01:00
|
|
|
class FakeInput;
|
2017-06-29 00:57:46 +01:00
|
|
|
|
2020-01-23 15:57:08 +00:00
|
|
|
class RemoteDesktopSession : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
RemoteDesktopSession();
|
|
|
|
void createSession();
|
|
|
|
bool isValid() const
|
|
|
|
{
|
|
|
|
return m_connecting || !m_xdpPath.path().isEmpty();
|
|
|
|
}
|
|
|
|
OrgFreedesktopPortalRemoteDesktopInterface *const iface;
|
|
|
|
QDBusObjectPath m_xdpPath;
|
|
|
|
bool m_connecting = false;
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
void handleXdpSessionCreated(uint code, const QVariantMap &results);
|
|
|
|
void handleXdpSessionConfigured(uint code, const QVariantMap &results);
|
2024-01-28 14:00:05 +00:00
|
|
|
void handleXdpSessionStarted(uint code, const QVariantMap &results);
|
2020-01-23 15:57:08 +00:00
|
|
|
void handleXdpSessionFinished(uint code, const QVariantMap &results);
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
class WaylandRemoteInput : public AbstractRemoteInput
|
2017-06-29 00:57:46 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-09-10 22:23:52 +01:00
|
|
|
explicit WaylandRemoteInput(QObject *parent);
|
2018-04-02 19:20:24 +01:00
|
|
|
|
2022-09-10 22:23:52 +01:00
|
|
|
bool handlePacket(const NetworkPacket &np) override;
|
2020-01-23 15:57:08 +00:00
|
|
|
bool hasKeyboardSupport() override
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
2017-06-29 00:57:46 +01:00
|
|
|
};
|