site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 30, 2007, at 2:51 AM, Andrew James wrote: Again, however you cannot prevent any user-initiated sleep. Brian Bergstrand <http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2 _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... The users are 100% fine with the idea and all i want to know is if its possible and if so how, it seems no matter where i ask this question i am confronted with other developers views and not a solution _______________________________________________ I gave you a solution, just for the wrong environment (since you didn't specify). For the kernel, you will need to be an IOKit driver to get power events (there may be someway to get them from a "normal" kext as well). With some basic searching on Google you would have found: http://developer.apple.com/documentation/DeviceDrivers/Conceptual/IOKitFunda... /apple_ref/doc/uid/TP0000020-SW3 However, it does not look like you can prevent sleep at the kernel level (even idle sleep) when receiving these events. You may have to resort to some hackery to tickle an event stream to trick the system into thinking it's not idle - thus preventing idle sleep. Probably the easiest thing to do would be to have a user-land daemon launch when your kext loads and you can then use the solution I gave in my previous email. When your kext unloads, have the daemon quit. This email sent to site_archiver@lists.apple.com
participants (1)
-
Brian Bergstrand