OS X Mountain Lion power assertions

I'm trying to find some sample code or examples or good documentation on how to use power assertions on OS X programatically. Mountain lion seems to kill the network access on system sleep, so Apple recommends to use power assertions to keep the system awake and to preserve network access available. Appropriate command to modify power assertions is pmset, however I did not find any example on how to use it. As a sidenote, Snow Leo and Lion don't seem to be having this problem, so I'm guessing this must be some power optimization setting introduced with Mountain Lion. Any code samples/example/documentation on how to set a power assertion programatically for an application would be gladly welcomed.


Answering my own question :) . I've found a way to achieve this after doing some reading. IOKit framework seems to provide support for registering power assertions. More details on this address: IOPMLib library reference

Need Your Help

SQL - AND and OR Prededence

mysql sql tsql postgresql oracle11g

I have a SQL query, I am a bit confused which conditions in the WHERE clause is executed first. Can you give me the steps which are involved when executing the WHERE clause .Here is my query.

How to display text merging two languages (english+arabic)

html character-encoding arabic

From last 15 days or more am struggling with an strange issue.