RemoteControlPlugin::RemoteControlPlugin(QObject *parent, const QVariantList &args)
: KdeConnectPlugin(parent, args)
{
}
RemoteControlPlugin::~RemoteControlPlugin()
{
}
void RemoteControlPlugin::moveCursor(const QPoint &p)
{
NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, {{QStringLiteral("dx"), p.x()}, {QStringLiteral("dy"), p.y()}});
sendPacket(np);
}
void RemoteControlPlugin::sendCommand(const QVariantMap &body)
{
if (body.isEmpty())
return;
NetworkPacket np(PACKET_TYPE_MOUSEPAD_REQUEST, body);
sendPacket(np);
}
QString RemoteControlPlugin::dbusPath() const
{
return QStringLiteral("/modules/kdeconnect/devices/") + device()->id() + QStringLiteral("/remotecontrol");
}