diff options
Diffstat (limited to 'nci/jni/PowerSwitch.h')
-rwxr-xr-x | nci/jni/PowerSwitch.h | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/nci/jni/PowerSwitch.h b/nci/jni/PowerSwitch.h index 5c939ee..28362ba 100755 --- a/nci/jni/PowerSwitch.h +++ b/nci/jni/PowerSwitch.h @@ -45,6 +45,18 @@ public: /******************************************************************************* ** + ** Description: DISCOVERY: Discovery is enabled + ** SE_ROUTING: Routing to SE is enabled. + ** SE_CONNECTED: SE is connected. + ** + *******************************************************************************/ + typedef int PowerActivity; + static const PowerActivity DISCOVERY; + static const PowerActivity SE_ROUTING; + static const PowerActivity SE_CONNECTED; + + /******************************************************************************* + ** ** Description: Platform Power Level, copied from NativeNfcBrcmPowerMode.java. ** UNKNOWN_LEVEL: power level is unknown. ** POWER_OFF: The phone is turned OFF @@ -123,39 +135,40 @@ public: /******************************************************************************* ** - ** Function: isScreenOn + ** Function: setLevel ** - ** Description: Get the current screen state of the platform host. + ** Description: Set the controller's power level. + ** level: power level. ** - ** Returns: true if screen if on, (locked or unlocked). + ** Returns: True if ok. ** *******************************************************************************/ - bool isScreenOn (); + bool setLevel (PowerLevel level); /******************************************************************************* ** - ** Function: setLevel + ** Function: setModeOff ** - ** Description: Set the controller's power level. - ** level: power level. + ** Description: Set a mode to be deactive. ** - ** Returns: True if ok. + ** Returns: True if any mode is still active. ** *******************************************************************************/ - bool setLevel (PowerLevel level); + bool setModeOff (PowerActivity deactivated); + /******************************************************************************* ** - ** Function: setScreenState + ** Function: setModeOn ** - ** Description: Set the Platform's screen state - ** state: true for screen on, flase for screem off + ** Description: Set a mode to be active. ** - ** Returns: True if ok. + ** Returns: True if any mode is active. ** *******************************************************************************/ - bool setScreenState (bool state); + bool setModeOn (PowerActivity activated); + /******************************************************************************* ** @@ -202,6 +215,7 @@ private: static PowerSwitch sPowerSwitch; //singleton object static const UINT8 NFA_DM_PWR_STATE_UNKNOWN = -1; //device management power state power state is unknown SyncEvent mPowerStateEvent; + PowerActivity mCurrActivity; /******************************************************************************* |