[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: Escaping for paths
From:       Ross Burton <ross () burtonini ! com>
Date:       2006-06-15 14:28:22
Message-ID: 1150381702.21825.47.camel () localhost ! localdomain
[Download RAW message or body]

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);

char *dbus_escape_path (const char *path);

Ross
-- 
Ross Burton                                 mail: ross@burtonini.com
                                          jabber: ross@burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic