kdeconnect-kde/plugins/mousepad/waylandremoteinput.h
Albert Vaca Cintora 59adbc2da4 Move all generated dbus interfaces to kdeconnectinterfaces exclude them from clazy
* Moves the XML definitions of DBus interfaces and code generation from the different plugins
  to kdeconnectinterfaces. Before each plugin had their own, some of them duplicated.
* Appends `// clazy:skip` to the generated interface files, so Clazy doesn't emit warnings
  about them because they are missing the NOTIFY/CONSTANT keywords on Q_PROPERTIES.
* Makes kdeconnectinterfaces static on Qt5 as well (removes a difference with Qt6).
* Moves the generated files to a `generated` directory and updates the includes so they are
  easily distinguished from other header files.
2023-07-24 12:18:47 +00:00

50 lines
1.2 KiB
C++

/**
* SPDX-FileCopyrightText: 2018 Albert Vaca Cintora <albertvaka@gmail.com>
* SPDX-FileCopyrightText: 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#pragma once
#include "abstractremoteinput.h"
#include "generated/systeminterfaces/remotedesktop.h"
#include <QDBusObjectPath>
class FakeInput;
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);
void handleXdpSessionFinished(uint code, const QVariantMap &results);
private:
};
class WaylandRemoteInput : public AbstractRemoteInput
{
Q_OBJECT
public:
explicit WaylandRemoteInput(QObject *parent);
bool handlePacket(const NetworkPacket &np) override;
bool hasKeyboardSupport() override
{
return true;
}
};