Den 03. feb. 2014 09:04, skrev Thomas Perl:
On 01 Feb 2014, at 21:32, Ove Kåven <o...@arcticnet.no> wrote:
If a synchronization starts with the screen off, there's a chance that the phone enters 
"deep suspend" during the synchronization. If so, the other side might time out 
and the sync will fail.

So I want prevent the CPU from suspending before the synchronization is 
complete, which might take a few seconds (and there might not be network 
activity all the time while it's running). I've read that to get periodic 
wakeups, you could use libiphb or maybe timed, but what's the recommended way 
to temporarily prevent suspending completely for a few seconds?

You can talk to MCE via the system D-Bus, this is quite low-level, but works 
already:

https://github.com/nemomobile/mce-dev/blob/master/include/mce/dbus-names.h#L329

Ah, thank you. I'll try this next time I get time for hacking on this.

But for scheduled wakeups (say I want the next synchronization to occur after 6 hours), I suppose the best option is to use "timed"?

(Then again, maybe that won't be of much use anyway, as the internet connection might be a problem if the phone has been suspended...)

_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to