Function

ValentDevicevalidate_name

unstable since: 1.0

Declaration [src]

gboolean
valent_device_validate_name (
  const char* name
)

Description [src]

Validate a KDE Connect device name.

A compliant device name matches the pattern /^[^"',;:.!?()\[\]<>]{1,32}$/, containing none of "',;:.!?()[]<> with a length of 1-32 characters, with at least one non-whitespace character.

This became a requirement in version 8 or the KDE Connect protocol.

Available since: 1.0

Parameters

name

Type: const char*

A KDE Connect device name.

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: gboolean

TRUE if valid, or FALSE.