Show / Hide Table of Contents

    Class Power

    Definition

    Namespace:
    Tizen.System
    Assembly:
    Tizen.System.dll
    API Level:
    3
    Privilege Level:
    public
    Privilege:
    http://tizen.org/privilege/display

    The Power class provides methods to control the power service.

    public static class Power
    Inheritance
    Object
    Power
    Remarks

    The Power API provides the way to control the power service. It can be made to hold the specific state to avoid the CPU state internally.

    Methods

    View Source

    ReleaseCpuLock()

    Please do not use! This will be deprecated! Please use ReleaseLock instead!

    [Obsolete("Please do not use! this will be deprecated")]

    Declaration
    [Obsolete("Please do not use! This will be deprecated! Please use ReleaseLock instead!")]
    public static void ReleaseCpuLock()
    Exceptions
    Type Condition
    UnauthorizedAccessException

    If the privilege is not set.

    InvalidOperationException

    In case of any system error.

    API Level: 3
    View Source

    ReleaseLock(PowerLock)

    Releases the lock state.

    Declaration
    public static void ReleaseLock(PowerLock type)
    Parameters
    Type Name Description
    PowerLock type

    The power type to request lock.

    Examples
    Tizen.System.Power.ReleaseLock(Tizen.System.Power.PowerLock.Cpu);
    Exceptions
    Type Condition
    ArgumentException

    When an invalid parameter value is set.

    UnauthorizedAccessException

    If the privilege is not set.

    InvalidOperationException

    In case of any system error.

    API Level: 5
    View Source

    RequestCpuLock(Int32)

    Please do not use! This will be deprecated! Please use RequestLock instead!

    [Obsolete("Please do not use! this will be deprecated")]

    Declaration
    [Obsolete("Please do not use! This will be deprecated! Please use RequestLock instead!")]
    public static void RequestCpuLock(int timeout)
    Parameters
    Type Name Description
    Int32 timeout

    The positive number in milliseconds or 0 for the permanent lock. So you must release the permanent lock of the power state with ReleaseCpuLock() if timeout_ms is zero.

    Remarks

    If the process dies, then every lock will be removed.

    Exceptions
    Type Condition
    ArgumentException

    When an invalid parameter value is set.

    UnauthorizedAccessException

    If the privilege is not set.

    InvalidOperationException

    In case of any system error.

    API Level: 3
    View Source

    RequestLock(PowerLock, Int32)

    Locks the given lock state for a specified time. After the given timeout (in milliseconds), unlock the given lock state automatically.

    Declaration
    public static void RequestLock(PowerLock type, int timeout)
    Parameters
    Type Name Description
    PowerLock type

    The power type to request lock.

    Int32 timeout

    The positive number in milliseconds or 0 for the permanent lock. So you must release the permanent lock of the power state with ReleaseLock() if timeout_ms is zero.

    Remarks

    If the process dies, then every lock will be removed.

    Examples
    Tizen.System.Power.RequestLock(Tizen.System.Power.PowerLock.Cpu, 2000);
    Exceptions
    Type Condition
    ArgumentException

    When an invalid parameter value is set.

    UnauthorizedAccessException

    If the privilege is not set.

    InvalidOperationException

    In case of any system error.

    API Level: 5
    • View Source
    Back to top Copyright © 2016-2020 Samsung
    Generated by DocFX