[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-dbus
Subject: Re: Escaping for paths
From: Havoc Pennington <hp () redhat ! com>
Date: 2006-06-21 22:52:20
Message-ID: 4499CDA4.30401 () redhat ! com
[Download RAW message or body]
Ross Burton wrote:
>
> dbus_bool_t dbus_validate_bus_name (const char *interface);
> dbus_bool_t dbus_validate_interface (const char *interface);
> dbus_bool_t dbus_validate_method_name (const char *interface);
> dbus_bool_t dbus_validate_path (const char *interface);
>
> char *dbus_escape_path (const char *path);
>
A question here is whether you want a DBusError to explain _why_ the
validation failed, e.g. if you're implementing dbus-send you'd want to
say "path does not start with slash" rather than "invalid path"
I would say yes; if people don't care about the why they can pass NULL
for the DBusError, but for validation I'd think you often want the
error, since it's likely to be a case where the user was specifically
supposed to provide a valid dbus path or name.
Havoc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic