View unanswered posts | View active topics It is currently Wed Jun 19, 2013 12:29 am



Reply to topic  [ 4 posts ] 
 Wakeup notifications 
Author Message

Joined: Apr 07, 2008
Posts: 393
Post Wakeup notifications
What is the API model for dealing with the system going to sleep and waking up? I need to go around and recheck/retry network connections when we've woken (particularly when we moved elsewhere). Is there a hook?

Of course I can directly ask the OS for notifications, but that's not necessarily timed right - I want to know when Indigo has completely "woken up" so it's ready to play.

Cheers
-- perry


Wed Sep 14, 2011 8:33 am
Profile
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11814
Location: Texas
Post Re: Wakeup notifications
The next beta will have two optional methods your plugin can subclass:

Code: Select all
   def prepareToSleep(self):

   def wakeUp(self):

Sounds like you are most interested in wakeUp, but you can also get called before the Mac goes to sleep. But note that Indigo Server will only give the plugin about five seconds before it tells the OS to proceed with the sleep operation.

_________________
Image


Wed Sep 14, 2011 10:06 pm
Profile WWW

Joined: Apr 07, 2008
Posts: 393
Post Re: Wakeup notifications
Sounds like you are most interested in wakeUp, but you can also get called before the Mac goes to sleep. But note that Indigo Server will only give the plugin about five seconds before it tells the OS to proceed with the sleep operation.


Great. Five seconds should be plenty for going-to-sleep housekeeping.

Thanks
-- perry


Thu Sep 15, 2011 1:03 am
Profile

Joined: Apr 07, 2008
Posts: 393
Post Re: Wakeup notifications
Works great in beta 9. Thanks.
-- perry


Sat Sep 24, 2011 12:34 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.