Virtual Method

ValentDevicePluginhandle_packet

unstable since: 1.0

Declaration [src]

void
handle_packet (
  ValentDevicePlugin* plugin,
  const char* type,
  JsonNode* packet
)

Description [src]

Handle a packet from the device the plugin is bound to.

This is called when the device receives a packet type included in the X-DevicePluginIncoming field of the .plugin file.

This is optional for implementations which do not register any incoming capabilities, such as plugins that do not provide packet-based functionality.

Available since: 1.0

Parameters

type

Type: const char*

A KDE Connect packet type.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
packet

Type: JsonNode

A KDE Connect packet.

The data is owned by the caller of the method.