/srv/irclogs.ubuntu.com/2008/04/25/#upstart.txt

Keybukaha!00:00
Keybukfails with insufficient memory inside the timer function00:00
Keybukwhich it should00:00
* Keybuk declares success for the night01:05
ion_:-)01:08
Keybukok...01:19
Keybuk526 of libnih, and 914 of upstart have the bare bones of D-Bus support01:19
Keybukno methods yet, but nearly all of the glue to make the methods trivial to add01:19
Keybuk525 of libnih, sorry01:20
Keybukif you want to play:01:21
Keybuk1) write an XML file in D-Bus Introspect format01:21
Keybuke.g. http://bazaar.launchpad.net/~keybuk/libnih/trunk/annotate/scott%40netsplit.com-20080425001233-8o0ta6dbia8r0plh?file_id=com.netsplit.nih.tes-20080421094354-men8yuazzjl3shgb-101:21
Keybuk2) generate C code from that01:21
Keybuknih-dbus-tool com.netsplit.Nih.Test.xml01:21
Keybuk3) write your own method handlers01:22
Keybukfor that StrToInt you would need to write a function with the prototype:01:22
Keybuk  int dbus_str_to_init (void *data, NihDBusMessage *message, const char *input, int32_t *output);01:23
Keybukstore return values in the latter pointers, for strings use the message argument as the nih_alloc context to attach them to01:23
Keybukreturn 0 if everything was ok, < 0 if you raise an error01:23
Keybukif you want to return a D-Bus error use nih_dbus_error_raise (NAME, MESSAGE)01:23
Keybukotherwise the generic FAILED will be returned (if you raise ENOMEM, you'll get looped :p)01:24
Keybuk4) compile and play01:24
ion_ion: tag01:32
ion_Now i'll find this piece of log easily. :-)01:33
=== ion__ is now known as ion_

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!