2008-06-30 13:15:12

by David Stockwell

[permalink] [raw]
Subject: Re: [Bluez-devel] Wizard patch


----- Original Message -----
From: "Bastien Nocera" <[email protected]>
To: "David Stockwell" <[email protected]>
Sent: Monday, June 30, 2008 3:18 AM
Subject: Re: [Bluez-devel] Wizard patch


> On Sun, 2008-06-29 at 20:03 -0500, David Stockwell wrote:
>> Out of curiosity, why not use C++ style (//) comments? Do you prefer
>> the older /*...*/ comments? Or is there some other reason.
>
> C++-style comments are for temporary comments. Almost all C codebases
> refuse to have C++-style comments in permanent code.

Fair enough. Also the case that C-compilers sometimes do not handle //
comments.
>
>> FWIW, it seems to me that most of the code (e.g, the DBus code) is
>> almost completely uncommented...hence very hard to figure out how
>> it actually works, or even how it is intended to work.
>
> There's documentation for D-Bus in */*.txt in bluez-utils. If the
> documentation isn't good enough, either send questions asking for
> clarifications, or patches.

I read the docs and when the code works as expected it is good enough.
However, I have had a number of problems making the code work (partially
implemented "experimental" 4.x features in release 3.33 and before).

Also, figuring out how to handle some of the formats (e.g., the "dict"
with variant) are a bit hard to figure out without a code example. SO,
I often have to dig into the actual code and figure out just what is
going on.
>
> BTW, could you please: reply to the list, quote properly, not
> top-post,
> and make sure lines are cut to 72 chars in length. I know it's hard
> using Outlook...
>

OK, I normally respond to the list (note that I have not contacted you
before, and will not again), but had a couple of questions about the
stylistic points you raised, which I had not seen before.

I think you will also see that this is plain text, cut to 72 chars.
Easy to do.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2008-06-30 22:27:00

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [Bluez-devel] Wizard patch

Hello David,

> I read the docs and when the code works as expected it is good enough.
> However, I have had a number of problems making the code work (partially
> implemented "experimental" 4.x features in release 3.33 and before).

You should first understand that the documentation in doc/ are dbus
specifications, they are not normal method calls or gobject signals.
You seems to be confused by using dbus-glib and not really knowing
what dbus is doing, we don't document how to use the API in terms of
language bindings, because it is open to the application developer to
choose between the bindings and the binding itself should document how
it map the different signatures.

> Also, figuring out how to handle some of the formats (e.g., the "dict"
> with variant) are a bit hard to figure out without a code example. SO,
> I often have to dig into the actual code and figure out just what is
> going on.

See my point here, just because dbus-glib maps the signature a{sv}
(that is the real "dict") to a GHashTable using a GValue doesn't mean
any other binding will do the same. It's up to the binding to provides
this kind of documentation not the dbus API which should not be tied
to a single binding.

This tutorial should cover what you want:
http://dbus.freedesktop.org/doc/dbus-tutorial.html

-- =

Luiz Augusto von Dentz
Engenheiro de Computa=E7=E3o

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel