Function

Valentpacket_serialize

unstable since: 1.0

Declaration [src]

char*
valent_packet_serialize (
  JsonNode* packet
)

Description [src]

Convenience function that updates the timestamp of a packet before returning a serialized string with newline ending, ready to be written to a stream.

Available since: 1.0

Parameters

packet

Type: JsonNode

A complete KDE Connect packet.

The data is owned by the caller of the function.

Return value

Type: char*

The serialized packet.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.