Keybuk | aha! | 00:00 |
---|---|---|
Keybuk | fails with insufficient memory inside the timer function | 00:00 |
Keybuk | which it should | 00:00 |
* Keybuk declares success for the night | 01:05 | |
ion_ | :-) | 01:08 |
Keybuk | ok... | 01:19 |
Keybuk | 526 of libnih, and 914 of upstart have the bare bones of D-Bus support | 01:19 |
Keybuk | no methods yet, but nearly all of the glue to make the methods trivial to add | 01:19 |
Keybuk | 525 of libnih, sorry | 01:20 |
Keybuk | if you want to play: | 01:21 |
Keybuk | 1) write an XML file in D-Bus Introspect format | 01:21 |
Keybuk | e.g. http://bazaar.launchpad.net/~keybuk/libnih/trunk/annotate/scott%40netsplit.com-20080425001233-8o0ta6dbia8r0plh?file_id=com.netsplit.nih.tes-20080421094354-men8yuazzjl3shgb-1 | 01:21 |
Keybuk | 2) generate C code from that | 01:21 |
Keybuk | nih-dbus-tool com.netsplit.Nih.Test.xml | 01:21 |
Keybuk | 3) write your own method handlers | 01:22 |
Keybuk | for 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 |
Keybuk | store return values in the latter pointers, for strings use the message argument as the nih_alloc context to attach them to | 01:23 |
Keybuk | return 0 if everything was ok, < 0 if you raise an error | 01:23 |
Keybuk | if you want to return a D-Bus error use nih_dbus_error_raise (NAME, MESSAGE) | 01:23 |
Keybuk | otherwise the generic FAILED will be returned (if you raise ENOMEM, you'll get looped :p) | 01:24 |
Keybuk | 4) compile and play | 01:24 |
ion_ | ion: tag | 01: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!