Re: Preventing system sleep
Re: Preventing system sleep
- Subject: Re: Preventing system sleep
- From: Jens Alfke <email@hidden>
- Date: Tue, 16 Feb 2010 13:34:16 -0800
On Feb 16, 2010, at 13:19, Joe Ranieri wrote:
Oops! The doc says it was introduced in 10.6 and I need to support
10.5. I guess I'll have to check "IOPMAssertionCreate"...
Curious. The header file says:
IOReturn IOPMAssertionCreateWithName(
CFStringRef AssertionType,
IOPMAssertionLevel AssertionLevel,
CFStringRef AssertionName,
IOPMAssertionID *AssertionID)
AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
Is the header wrong?
It could be a function that existed as private API in 10.5, was made
public in 10.6, and retroactively made public for 10.5. This means you
can call the function on 10.5 but it only exists in the headers in the
10.6+ SDK (even if you're building for 10.5)
If you still need to build with the 10.5 SDK, you can copy the
declaration from the newer SDK and paste it into your own code.
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden