Created attachment 82162 [details]
Ubuntu 13.10 Alpha with valac 0.20.1 and accountsservice 0.6.34.
I can't get the Vala bindings to work. I'm attaching a minimal test case.
$ valac --pkg accountsservice accountsservice-test.vala
accountsservice-test.vala.c: In function ‘_vala_main’:
accountsservice-test.vala.c:25:9: warning: assignment makes pointer from integer without a cast [enabled by default]
_tmp0_ = act_user_new ();
accountsservice-test.vala.c: In function ‘main’:
accountsservice-test.vala.c:45:2: warning: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]
/tmp/ccVZJNQM.o: In function `_vala_main':
accountsservice-test.vala.c:(.text+0x23): undefined reference to `act_user_new'
collect2: error: ld returned 1 exit status
error: cc exited with status 256
Compilation failed: 1 error(s), 0 warning(s)
Created attachment 82187 [details]
Ok, I slept on this and managed to figure it out.
The bug here is that there's not enough documentation or examples.
Note you also need to wait for the is-loaded property to toggle to "true" before checking properties on the user
The Vala bindings were removed:
But this issue is probably out of date anyway.