Changeset View
Changeset View
Standalone View
Standalone View
plugins/remotecontrol/remotecontrolplugin.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | } | 52 | } | ||
53 | 53 | | |||
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() | | |||
61 | { | | |||
62 | QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportAllContents); | | |||
63 | } | | |||
64 | | ||||
65 | QString RemoteControlPlugin::dbusPath() const | 60 | QString RemoteControlPlugin::dbusPath() const | ||
66 | { | 61 | { | ||
67 | return "/modules/kdeconnect/devices/" + device()->id() + "/remotecontrol"; | 62 | return "/modules/kdeconnect/devices/" + device()->id() + "/remotecontrol"; | ||
68 | } | 63 | } | ||
69 | 64 | | |||
70 | #include "remotecontrolplugin.moc" | 65 | #include "remotecontrolplugin.moc" |