Archive for July, 2010

Exporting javascript objects

July 16, 2010

gateway.py, the script that is part of my little ofono web-based client which I mentioned before, now lets its clients export their own objects as D-bus objects.  While not very practical, a full D-bus service can be written in javascript that way.  I added this capability mainly because ofono will now start using agent interfaces as part of its D-bus interface and other daemons, like connman and bluez, already have agents, so you need to be able to export an object to make a UI.

All other types of http requests remain as listed here.  The new (GET) requests are:

  • /path/to/object/export/<n>/ObjectName[;Interface.MethodOrSignalName,<in_signature>[,<out_signature>][;…]] – This looks complex but it just creates a D-bus object with the given name (arbitrary string, used just internally), and a given list of members on given interfaces. Members list is ;-delimited, each member is a signal or a method depending on whether it has an out signature.  New calls with their parameters are sent to the client in replies to the “idle” request using the same syntax as for signals from remote objects.  In turn signals from exported objects are emitted using the same syntax as method calls on remote objects.
  • /path/to/object/Interface.MethodName/return/[<value>[,…]] – Return a (possibly empty) tuple of values to a pending call sent in an “idle” request earlier.
  • /path/to/object/Interface.MethodName/error/<string> – Return an exception / error constant to a pending call sent in an “idle” request earlier.

Certified

July 5, 2010

I took one more of those silly, but sometimes recognised, language exams, because my university let me do it for free due to some programme.  This one was in Turkish, and now I’m certified.  But because the exam was for the “A2” level, I think it’s fair to say I’m a certified Turkish non-speaker.  A2 really really means you can’t speak the language. (So what’s the point?)

I also have these certificates in Spanish and English  (both corresponding to level C2 according to wikipedia chart) that say that I can actually speak, and even teach the basics of these languages (but don’t worry.. I have not the slightest idea about teaching), and I guess these could be useful — but have never been useful so far.