Escaping for paths

Kimmo Hämäläinen kimmo.hamalainen at nokia.com
Thu Jun 15 08:11:46 PDT 2006


On Thu, 2006-06-15 at 17:28, ext Ross Burton wrote:
> On Thu, 2006-06-15 at 08:58 -0400, Havoc Pennington wrote:
> > Ross Burton wrote:
> > > I think it would be useful for DBus to contain a function that escaped
> > > an arbitrary string so that it could be used in an object path to avoid
> > > this needless wheel re-inventing.  Anyone else agree?
> > 
> > Why not propose a complete validation/escaping API, another recent 
> > thread mentioned validation also. Probably need validation for 
> > interfaces, method names, paths, bus names; escaping only for paths and 
> > perhaps bus names?
> 
> I'm not sure bus names would need escaping, but maybe somebody will
> surprise me.
> 
> OK, how about:
> 
> 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);

dbus_bool_t dbus_validate_message (const DBusMessage *m);

could be useful, too, but maybe it's more tricky to implement.

BR; Kimmo

> 
> char *dbus_escape_path (const char *path);
> 
> Ross


More information about the dbus mailing list