Add g_dbus_utils_object_path_escape and g_dbus_utils_object_path_unescape

These two APIs are useful to publish an object which path content is not
controlled (e.g. dynamically built or coming from external source).

Closes #968

(Rebased and tweaked by Frederic Martinsons)

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
This commit is contained in:
MARTINSONS Frederic
2021-01-20 13:23:24 +00:00
committed by Philip Withnall
parent 86aec50c0a
commit 47355c358d
4 changed files with 177 additions and 0 deletions

View File

@@ -49,6 +49,12 @@ void g_dbus_gvariant_to_gvalue (GVariant *value,
GLIB_AVAILABLE_IN_ALL
GVariant *g_dbus_gvalue_to_gvariant (const GValue *gvalue,
const GVariantType *type);
GLIB_AVAILABLE_IN_2_68
gchar *g_dbus_escape_object_path_bytestring (const guint8 *bytes);
GLIB_AVAILABLE_IN_2_68
gchar *g_dbus_escape_object_path (const gchar *s);
GLIB_AVAILABLE_IN_2_68
guint8 *g_dbus_unescape_object_path (const gchar *s);
G_END_DECLS