xbmc/xbmc — pull request #1653 by Memphiz (2012-10-21 11:24:49+00:00)
Title: [PM/osx] - allow the OS to got into sleep/suspend after shutdown timer was run out

Basically this adds a new target for the shutdowntime setting "AlloSuspend". Its implemented for OSX atm (i don't know if this is possible on the other platforms too - and i'm only aware of osx users which had problems with our current power management approaches).

So now we have the following possibilitys:

1. No shutdown timer - xbmc holds the pmassertion all the time while its running - preventing the os from going to sleep
2. Shutdowntimer with target "suspend" - after shutdown timer is zero we suspend the system without paying attention to any ongoing applications (this was the problem for people who run other applications/services on the os)
3. Shutdowntimer with new target "AllowSuspend" - after shutdown timer is zero wie release the pm assertion from the os. This allows any configured idle timers in the os to handle the pm. If there are no other applications running with holding a pm assertion the system will go to sleep. We regain the pm assertion from the os once someone wakes us up (reset screensaver).

I have had this tested by the users who wanted this behaviour and they confirmed it working.