Battery Status

How does an application get access to the status of the battery (whether it's charging or not charging) on an iphone/ipad?

Battery Status
 
 
Q