Re: glibmm: Creating a DBus namespace?



Thanks, Chris, yes it is actually the other way around.

Also, your point about "Glib::Gio" seems pretty valid to me, but I guess it would be too much to ask for right now. (Does the existence of ::Gio still stem from the time when it was separate from Glib?)

Perhaps this could be an issue for 3.0 (to move ::Gio into Glib::)?

On Tue, Feb 15, 2011 at 1:53 PM, Chris Vine <chris cvine freeserve co uk> wrote:
On Tue, 15 Feb 2011 10:53:26 +0100
Milosz Derezynski <internalerror gmail com> wrote:
> The "namespacing" in the C layer is very confusing. First, GDBus is
> part of GIO, but types are named GDBus*, not GioDBus*.
>
> Then there are the "methods", which are named g_dbus_*, which would
> much rather suggest being a part of Glib itself, rather than GIO, but
> so is everything else in GIO (GFile*, g_file_*).
[snip]

That is how glib does it, rather than an inconsistency.  The glib
tarball comes with a number of other modules apart from gio, such as
gobject, gthread, gmodule, all with their own pkg-config *.pc set-up
files and (apart from gmodule) with their own separate documentation,
which also all use the G and g_ namespace prefixes.

It is glibmm which has an inconsistent usage, by separating off only
gio into a separate namespace (which incidentally is ::Gio, not
Glib::Gio), which may be the source of what you find confusing.  There
seems no particular reason why there should not be GThread, GObject and
GModule namespaces in glibmm: the defining feature of course is that gio
contains vastly more code than would these others namespaces.

However modularising glibmm is in my view a good thing, so Gio::DBus
sounds fine to me.  But why restrict this to just one subset of gio,
namely gdbus? As I say, there is a great deal more namespace modularity
which could sensibly be implemented in glib.

Chris






--
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
[Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge
jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]