Changeset View
Changeset View
Standalone View
Standalone View
plugins/ping/pingplugin.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | 68 | { | |||
---|---|---|---|---|---|
69 | NetworkPackage np(PACKAGE_TYPE_PING); | 69 | NetworkPackage np(PACKAGE_TYPE_PING); | ||
70 | if (!customMessage.isEmpty()) { | 70 | if (!customMessage.isEmpty()) { | ||
71 | np.set(QStringLiteral("message"), customMessage); | 71 | np.set(QStringLiteral("message"), customMessage); | ||
72 | } | 72 | } | ||
73 | bool success = sendPackage(np); | 73 | bool success = sendPackage(np); | ||
74 | qCDebug(KDECONNECT_PLUGIN_PING) << "sendPing:" << success; | 74 | qCDebug(KDECONNECT_PLUGIN_PING) << "sendPing:" << success; | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | void PingPlugin::connected() | | |||
78 | { | | |||
79 | QDBusConnection::sessionBus().registerObject(dbusPath(), this, QDBusConnection::ExportAllContents); | | |||
80 | } | | |||
81 | | ||||
82 | QString PingPlugin::dbusPath() const | 77 | QString PingPlugin::dbusPath() const | ||
83 | { | 78 | { | ||
84 | return "/modules/kdeconnect/devices/" + device()->id() + "/ping"; | 79 | return "/modules/kdeconnect/devices/" + device()->id() + "/ping"; | ||
85 | } | 80 | } | ||
86 | 81 | | |||
87 | #include "pingplugin.moc" | 82 | #include "pingplugin.moc" | ||
88 | 83 | |