Further bindings stuff

Daniel P. Berrange dan at berrange.com
Thu Apr 6 05:58:45 PDT 2006


On Wed, Apr 05, 2006 at 09:13:59AM +0100, Matthew Johnson wrote:
> In a recent mailing list post[1] I suggested that there were some things
> that the bindings in DBus should standardize on for 1.0. Since I have
> had some time recently, I have started to write down some of these
> things. I'd appreciate comments on them:
> 
> http://mjj29.matthew.ath.cx/dbus.html

Looks pretty good...

Errors:

The list of error conditions you've defined covers all the general cases
I've got handling for in the Perl bindings, so it looks reasonable. If
anyone implements the org.freedesktop.DBus.Properties interface, then
I can recommend a couple more errors to be standardized:

  org.freedesktop.DBus.Properties.Error.AccessDenied
    - An attempt was made to write to a read-only property,
      or read a write-only property

  org.freedesktop.DBus.Properties.Error.UnknownProperty
    - There was no property with the requested name

  org.freedesktop.DBus.Properties.Error.PropertyFailed
    - The attempt to read or write the property was unsuccessful

Features:

I don't think it is particularly useful to define two explicit levels of
of feature support - if only because I don't think there is any practical
way to determine what the cut-over point should be. What would be useful,
however, is to take your list of features and write a test case (or two,
or three) for each one. Then we can put together a matrix with features
on one axis, and bindings on the other axis. So an app developer looking
to see whether a particular binding will do what they need can just
check against the compatability matrix.

Testing:

In general we should have tests for each feature in the matrix. Extra
tests also for all the various edge cases

 - Handling of empty arays
 - Send & receive of each basic data type
 - Send & receive of each compound data type
 - Compound data types with really deep nesting
 - Calls an unknown method
 - Calls a method with incorrect arguments 
 - Two interfaces on same object with methods of same name
 - Handling of methods called without specifying an interface
 - Un-registration of methods from the bus.
 - Registration of new object, with same path as a previously
   un-registered object.
 - Calling of remote methods from within a signal handler
 - Verify correct UTF-8 string handling - pick a string with has
   characters with high-bit set and make sure they are encoded
   in UTF-8 and not something bad like ISO-8859-1 (or whatever $LANG
   is set to)

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20060406/506917ab/attachment.pgp


More information about the dbus mailing list