Changeset View
Changeset View
Standalone View
Standalone View
plugins/remotecontrol/remotecontrolplugin.cpp
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
54 | void RemoteControlPlugin::sendCommand(const QString &name, bool val) | 54 | void RemoteControlPlugin::sendCommand(const QString &name, bool val) | ||
55 | { | 55 | { | ||
56 | NetworkPackage np(PACKAGE_TYPE_MOUSEPAD_REQUEST, {{name, val}}); | 56 | NetworkPackage np(PACKAGE_TYPE_MOUSEPAD_REQUEST, {{name, val}}); | ||
57 | sendPackage(np); | 57 | sendPackage(np); | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | void RemoteControlPlugin::connected() | 60 | void RemoteControlPlugin::connected() | ||
61 | { | 61 | { | ||
62 | QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportAllContents); | 62 | QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportScriptableInvokables); | ||
63 | } | 63 | } | ||
64 | 64 | | |||
65 | QString RemoteControlPlugin::dbusPath() const | 65 | QString RemoteControlPlugin::dbusPath() const | ||
66 | { | 66 | { | ||
67 | return "/modules/kdeconnect/devices/" + device()->id() + "/remotecontrol"; | 67 | return "/modules/kdeconnect/devices/" + device()->id() + "/remotecontrol"; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | #include "remotecontrolplugin.moc" | 70 | #include "remotecontrolplugin.moc" |