Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

kIOMessageCanSystemSleep



Under the "it worked once, I swear" category...

Got a question about the kIOMessageCanSystemSleep message.  I never get that message in the ::message() method.  I tried using registerPrioritySleepWakeInterest(), started getting the message, did the victory dance, merged some code in, re-compiled, went to yoga and I never got the kIOMessageCanSystemSleep message again.

I do see kIOMessageSystemWillSleep.  

Did I hallucinate seeing the desired behaviour?  Or have I done something wrong.  Here's a code snippet:

	if ( didStart )
	{
		AUTO_LOG( 5, "Starting!" );

		mpNotifier = registerPrioritySleepWakeInterest( SleepWakeHandler, this, 0 );
		AUTO_LOG( 5, "Created an mpNotifier = %p", mpNotifier );

		registerService();
	}

Should this work?  Have I done something painfully stupid?  Or do I have to go another route.  Thanks for any advice or info.

H.
_______________________________________________
usb mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/usb
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.