Christophe Nowicki

July 10, 2006

D-BUS for Mozilla project progress #3

Here is my current progress on my project :

  • All basic arguments are supported, you can call a method with as many arguments as you want :
        ret = iface.callWithArguments("MethodName", ['arg1', 42, 43.1], 3)
    
  • Array support is limited to basic array (without mixed type)
    // var arg = new Array(1, 'string', 2.3) // does not work yet 
    var arg = new Array(1, 2, 3)
    ret = iface.callWithArguments("MethodName", [arg], 1)
    
  • I’ve started working on callback fonctions for asynchronous call and signals, but without sucess.
  • Exception are now supported
    try {
       ret = iface.call("SomethingGoesWrong")
    } catch (e) {
       e.name // error name, ex: org.freedesktop.DBus.Python.dbus.exceptions.UnknownMethodException
       e.message // error details, ex: SomethingGoesWrong is not a valid method of interface...
    }
    

    It’s working, but I thing that a more precise exception handling system is needed.

  • I continue to work on :

    • callback and signals
    • documentation

    I will release version 0.1 next week.

    Filed under: Google Summer of Code — Tags:, — cscm @ 08:51

    2 responses to “D-BUS for Mozilla project progress #3”

    1. Matthew Johnson says:

      Have you thought at all about security issues here? Who will have access to these XPCOM objects? Your posts mention Javascript, presumably this won’t be scripts from random web pages?

      Also, you should introduce yourself on the dbus mailing list, people will be interested in this.

      Reply by email would be great,

      Matt

    2. cscm says:

      > Have you thought at all about security issues here? Who will have access to > these XPCOM objects? Your posts mention Javascript, presumably this won’t be > scripts from random web pages?

      No, the Mozilla source code is a mix between Javascript and C++, all the GUI in written in XUL/Javascript.
      The goal of my project is to provide a component for Mozilla. This component can’t be used from a Web Page.

    Powered by WordPress