Re: g_build_filename and members
- From: Emmanuele Bassi <ebassi gmail com>
- To: GTK Development List <gtk-devel-list gnome org>
- Subject: Re: g_build_filename and members
- Date: Sun, 06 Jan 2008 23:08:58 +0000
On Sun, 2008-01-06 at 23:30 +0100, Xavier Bestel wrote:
> Le dimanche 06 janvier 2008 à 22:14 +0000, Emmanuele Bassi a écrit :
> > On Sun, 2008-01-06 at 21:43 +0100, Mikael Hermansson wrote:
> > > Hmm just saw that g_build_filename does not work for GIO Uris
> >
> > as the name implies, and the documentation specifies, g_build_filename()
> > is meant for filenames, not URIs.
> >
> > > maybe there should be an g_build_uri? or similar?
> >
> > different schemes might have different specifications, without even
> > counting the non-standard or custom ones; creating a generic API might
> > prove more difficult than it's worth. for instance: the ftp: and http:
> > schemes allow information like username, password and even connection
> > port: that would be quite difficult to define in a single API call.
>
> IIRC, all URI have a normal form:
>
> [scheme] :// [pass] : [user] @ host / [path]
that's a URL.
URIs as described by RFC 2396[1] have the form of:
<scheme>:<scheme-specific-part>
and, more precisely:
The URI syntax does not require that the scheme-specific-part have
any general structure or set of semantics which is common among all
URI.
a scheme for server-based naming authorities (the authority is part of
the scheme specific part) should have the form of:
<userinfo>@<host>:<port>
but it's just for a subset of URIs.
ciao,
Emmanuele.
[1] http://www.ietf.org/rfc/rfc2396.txt
--
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]