Thread
:
Fundamental issues for a newbie when using Telepathy/DBus/Glib
View Single Post
mr_jrt
2011-06-17 , 13:04
Posts: 249 | Thanked: 277 times | Joined on May 2010 @ Brighton, UK
#
1
Ok, I'm working on my first Maemo5 project (QtCreator/C++) to get a feel for things, and the next stage is to query and preserve the status of all the accounts, disable them, then do stuff, and finally restore them.
Easy-peesy. DBus query to grab the state, DBus calls to disable them all, then DBus calls to restore the saved values.
Thing is, the version of Telepathy in the QtCreator SDK seems quite old, and doesn't have the convenience methods for getting and setting the DBus properties, so you have to use the generic DBus property methods.
My issue is that I've been mostly using Qt up to this point, with just a sprinkling of glib thrown in as required, so I have no idea if I'm missing something fundamental. The blocking calls (tp_cli_dbus_properties_run_get) are deprecated, and the async calls (tp_cli_dbus_properties_call_get) run from the event loop. Thus, the callbacks fire when the reply is received, but I've no idea what the correct way is to determine when this has completed.
It essentially becomes a bit more complicated due to the fact that there are two callbacks involved; the first to identify the accounts, and the second group are set up from that callback for each account to query the property values. I can (IMHO) bodge it by noting the number of accounts returned, and then waiting until I have that many property callbacks fired...but this seems a poor way of doing things, and I'm sure I must be missing something...
...any ideas?
Last edited by mr_jrt; 2011-06-17 at
13:25
.
Quote & Reply
|
mr_jrt
View Public Profile
Send a private message to mr_jrt
Find all posts by mr_jrt