Re: Preventing system sleep

2010-02-17 Thread James Bucanek
On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:27, Sean McBride wrote: > On 2/16/10 4:19 PM, Joe Ranieri said: > >> Curious. The header file says: >> IOReturn IOPMAssertionCreateWithName( >>CFStringRef AssertionType, >>IOPMAssertionLevel AssertionLevel, >>

Re: Preventing system sleep

2010-02-16 Thread Jens Alfke
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 Assertio

Re: Preventing system sleep

2010-02-16 Thread Sean McBride
On 2/16/10 4:19 PM, Joe Ranieri said: >Curious. The header file says: >IOReturn IOPMAssertionCreateWithName( > CFStringRef AssertionType, > IOPMAssertionLevel AssertionLevel, > CFStringRef AssertionName, >

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:19, Joe Ranieri wrote: > On 2/16/10 4:18 PM, Laurent Daudelin wrote: >> On Feb 16, 2010, at 13:13, Joe Ranieri wrote: >> >>> On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: > I'm working on a an app that at so

Re: Preventing system sleep

2010-02-16 Thread Joe Ranieri
On 2/16/10 4:18 PM, Laurent Daudelin wrote: On Feb 16, 2010, at 13:13, Joe Ranieri wrote: On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
On Feb 16, 2010, at 13:13, Joe Ranieri wrote: > On 2/16/10 4:10 PM, Neil Allain wrote: >> >> On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: >> >>> I'm working on a an app that at some point might start transferring a large >>> file to a USB device. Apparently, if the system is set to go t

Re: Preventing system sleep

2010-02-16 Thread Laurent Daudelin
Thanks, Joe, I'll have a look! -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@gmail.com Photo Gallery Store: http://laurentdaudeli

Re: Preventing system sleep

2010-02-16 Thread Joe Ranieri
On 2/16/10 4:10 PM, Neil Allain wrote: On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: I'm working on a an app that at some point might start transferring a large file to a USB device. Apparently, if the system is set to go to sleep, the transfer will fail. I was thinking of using the

Re: Preventing system sleep

2010-02-16 Thread Sean McBride
On 2/16/10 12:57 PM, Laurent Daudelin said: >I'm working on a an app that at some point might start transferring a >large file to a USB device. Apparently, if the system is set to go to >sleep, the transfer will fail. You can temporarily disable sleep using IOPMAssertionCreateWithName() on 10.6 o

Re: Preventing system sleep

2010-02-16 Thread Neil Allain
On Feb 16, 2010, at 2:57 PM, Laurent Daudelin wrote: > I'm working on a an app that at some point might start transferring a large > file to a USB device. Apparently, if the system is set to go to sleep, the > transfer will fail. > > I was thinking of using the NSWorkspace extendPowerOffBy: bu