WiFi Framework C++ Edition
CwclPowerEventsMonitor Class Reference

The class allows an application to receive power state changes notifications. More...

#include <wclPowerEvents.h>

Public Member Functions

 CwclPowerEventsMonitor ()
 Creates new object of the TwclPowerEventsMonitor class.
 
virtual ~CwclPowerEventsMonitor ()
 Free the object.
 
int Close ()
 Stops listening for the power events and releases all resources.
 
int Open ()
 Opens the power state changes monitor and starts listening for events.
 
int GetPowerStatus (wclPowerStatus &Status)
 Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, how much battery life remains, and if battery saver is on or off.
 
bool GetActive () const
 Gets the monitor's state.
 
 __declspec (property(get=GetActive)) bool Active
 Gets the monitor's state.
 
wclMessageProcessingMethod GetMessageProcessing () const
 Gets the monitor's message processing method.
 
void SetMessageProcessing (const wclMessageProcessingMethod Value)
 Sets the monitor's message processing method.
 
 __declspec (property(get=GetMessageProcessing, put=SetMessageProcessing)) wclMessageProcessingMethod MessageProcessing
 Gets and sets the monitor's message processing method.
 
__event void OnPowerStateChanged (void *Sender, const wclPowerState State)
 The event fires when the system's power state has been changed.
 

Protected Member Functions

virtual void MessageReceived (const CwclMessage *const Message)
 The method called when a new notification message received.
 
virtual void DoPowerStateChanged (const wclPowerState State)
 Fires the OnChanged event.
 

Detailed Description

The class allows an application to receive power state changes notifications.