Mailing Lists: Apple Mailing Lists

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

Re: "Kicking" the screensaver/display timers




On Jul 22, 2008, at 9:19 PM, Terry Lambert wrote:

On Jul 21, 2008, at 5:26 PM, Steve Checkoway wrote:
On Jul 21, 2008, at 1:47 PM, Ethan Bold wrote:
Until now, UpdateSystemActivity() was the only game in town, but please don't use it anymore! We've got a better alternative.

IOPMAssertionCreateWithName() doesn't seem to exist anywhere (google knows nothing about it). IOPMAssertionCreate() doesn't seem to exist in pre-10.5 and since I see no need to restrict to 10.5, that doesn't work for me.


* Prefer IOPMAssertionCreateWithName(), which lets you pass a string describing the purpose of the assertion (for debugging & diagnostic use for Apple & yourself) over the vanilla IOPMASsertionCreate. If you invoke IOPMAssertionCreate from multiple points in your code; naming the assertions differently will help identify leaks.


As I said, IOPMAssertionCreateWithName() doesn't seem to exist. Xcode doesn't know about it, google doesn't know about it, I can't find it on my system:
$ find /System/Library/Frameworks -name '*.h' -print0|xargs -0 grep IOPMAssertionCreateWithName
prints nothing.

Try IOPMAssertionCreate(); it's defined in the 10.4 and 10.5 SDK in IOKit.framework/Versions/A/Headers/pwr_mgt/IOPMLib.h. I think 10.4 was the first place it was published as non-private.


-- Terry

Terry,

Are you sure about that?

I just executed:

find /Developer/SDKs -name '*.h' -print0|xargs -0 grep IOPMAssertionCreate

and it only returned results in the 10.5 SDK [with no results for IOPMAssertionCreateWithName].


_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >"Kicking" the screensaver/display timers (From: "Shayne Wissler" <email@hidden>)
 >Re: "Kicking" the screensaver/display timers (From: Steve Checkoway <email@hidden>)
 >Re: "Kicking" the screensaver/display timers (From: Ethan Bold <email@hidden>)
 >Re: "Kicking" the screensaver/display timers (From: Steve Checkoway <email@hidden>)
 >Re: "Kicking" the screensaver/display timers (From: Terry Lambert <email@hidden>)



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.