Function
Valentpacket_get_string
unstable since: 1.0
Declaration [src]
gboolean
valent_packet_get_string (
JsonNode* packet,
const char* field,
const char** value
)
Description [src]
Lookup field
in the body of packet
and assign it to value
.
If field
is not found or it is not a non-empty string, FALSE
will be
returned and value
will not be set.
Available since: 1.0
Parameters
packet
-
Type:
JsonNode
A KDE Connect packet.
The data is owned by the caller of the function. field
-
Type:
const char*
Field name.
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. value
-
Type:
const char**
A string.
The argument will be set by the function. The argument can be set to NULL
by the function.The caller of the function takes ownership of the returned data, and is responsible for freeing it. The value is a NUL terminated UTF-8 string.