Function

GLibVariantis_object_path

Declaration

gboolean
g_variant_is_object_path (
  const gchar* string
)

Description

Determines if a given string is a valid D-Bus object path. You should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path().

A valid object path starts with / followed by zero or more sequences of characters separated by / characters. Each sequence must contain only the characters [A-Z][a-z][0-9]_. No sequence (including the one following the final / character) may be empty.

Available since:2.24

Parameters

string const gchar*
 

A normal C nul-terminated string.

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

Return value

Returns: gboolean
 

TRUE if string is a D-Bus object path.