From: Marcel Holtmann <marcel@holtmann.org>
To: bluez-devel@lists.sourceforge.net
Subject: Re: [Bluez-devel] hcid D-Bus patch
Date: Thu, 22 Sep 2005 19:54:10 +0200 [thread overview]
Message-ID: <1127411650.12287.15.camel@blade> (raw)
In-Reply-To: <e1effdeb05092209516bbcb31a@mail.gmail.com>
Hi Claudio,
> Regarding the shared code I will analize the shared functions
> and move to the common directory.
>
>
> The D-Bus error is a message created based on a received message.
> There are 4 message types:
> 1. method call message
> 2. method reply message
> 3. error message
> 4. signal
>
> First of all you have to understand the difference bus name, path and
> interface. Read
> http://dbus.freedesktop.org/doc/dbus-faq.html#id2778454
> for more information. There is a FAQ with this topic.
this is one of my basic problems with D-Bus and object oriented
programming in general. They try to abstract and solve everything and
this is not working. The reality is always different. We now need to
find a way to make it usable in a sane way.
> After this discussion I would suggest the following structure:
>
> >>> Message Error Names:
> org.bluez.EFailed
> org.bluez.ENoMemory
> /* open to more error names */
>
> >>>org.bluez.EFailed
> This error message will have the signature(string+uint16+uint32).
> Where the first argument is the error description. The second is
> the error class and the third is the error code.
> The error class can be system error, D-Bus error or HCI errors.
> This structure mane possible return to the app clients any kind of
> error. System error includes socket error, IO, ENODEV... D-Bus error
> includes no service, no connection, security error and no method
> found.
> HCI errors are listed in the bluetooth specification.
We have three different categories of errors. The Bluetooth errors
defined in the specification. They are the same for the complete HCI.
Then we have the Unix/Linux error codes (errno) and we will have
additional codes defined by us. I don't like the idea of splitting the
errors into classes. This is confusing and not a nice API. We should
choose a base for the errors and these should be the Bluetooth error
codes defined in the HCI part specification. So for my point of view an
error org.bluez.error with string+uint16 is enough. The range 0x00-0xff
will be used by the Bluetooth errors and we define the rest for specific
errors that are currently not covered by the specification. This means
we have to match the Unix/Linux error codes somehow, but I don't see any
problems with that.
Regards
Marcel
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-09-22 17:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-16 14:42 [Bluez-devel] hcid D-Bus patch Claudio Takahasi
2005-09-19 14:31 ` [Bluez-devel] Re: hcid D-Bus patch (RSSI question) Claudio Takahasi
2005-09-20 11:39 ` Marcel Holtmann
2005-09-21 8:51 ` [Bluez-devel] hcid D-Bus patch Marcel Holtmann
2005-09-21 12:49 ` Claudio Takahasi
2005-09-21 13:19 ` P. Durante
2005-09-21 13:52 ` Claudio Takahasi
2005-09-22 14:13 ` Marcel Holtmann
2005-09-22 17:12 ` Claudio Takahasi
2005-09-22 14:17 ` Marcel Holtmann
2005-09-22 16:51 ` Claudio Takahasi
2005-09-22 17:54 ` Marcel Holtmann [this message]
2005-09-23 14:28 ` Claudio Takahasi
2005-09-23 17:15 ` Claudio Takahasi
2005-09-25 10:33 ` Marcel Holtmann
2005-09-26 11:59 ` Claudio Takahasi
2005-09-28 8:45 ` Marcel Holtmann
2005-09-28 9:08 ` [Bluez-devel] help: HIDD and HID2HCI Charles Majola
2005-09-28 19:19 ` [Bluez-devel] hcid D-Bus patch Claudio Takahasi
2005-09-28 19:53 ` Eduardo Rocha
2005-09-29 16:25 ` Marcel Holtmann
2005-09-29 19:26 ` Claudio Takahasi
2005-09-30 8:37 ` Marcel Holtmann
2005-09-30 14:52 ` Claudio Takahasi
2005-09-30 15:03 ` Marcel Holtmann
2005-10-02 11:52 ` P. Durante
2005-10-03 13:57 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1127411650.12287.15.camel@blade \
--to=marcel@holtmann.org \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).