Add more detailed APIs description.
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
{
private static readonly object s_lock = new object();
/// <summary>
- /// Gets the battery charge percentage.
+ /// Gets the current device's invalid battery charge percentage as an interger value.
/// </summary>
+ /// <remarks>
+ /// It returns an integer value from 0 to 100 that indicates remaining battery charge as a percentage of the maximum level.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <value>It returns an integer value from 0 to 100 that indicates the remaining
/// battery charge as a percentage of the maximum level.</value>
+ /// <example>
+ /// <code>
+ /// Console.WriteLine("battery Percent is: {0}", Tizen.System.Battery.Percent);
+ /// </code>
+ /// </example>
+ /// <seealso cref="BatteryPercentChangedEventArgs"/>
public static int Percent
{
get
}
}
/// <summary>
- /// Gets the current battery level.
+ /// Gets the current device's battery level status as a BatteryLevelStatus.
/// </summary>
+ /// <remarks>
+ /// Retrieves the current battery level status based on remaining battery capacity.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <value>The battery level status.</value>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// BatteryLevelStatus status = Battery.Level;
+ /// if (Battery.Percent == 0 && status == BatteryLevelStatus.Empty)
+ /// ...
+ /// ...
+ /// </code>
+ /// </example>
+ /// <seealso cref="BatteryLevelStatus"/>
+ /// <seealso cref="BatteryLevelChangedEventArgs"/>
public static BatteryLevelStatus Level
{
get
}
}
/// <summary>
- /// Gets the current charging state.
+ /// Gets the current device's charging state which the battery is charging.
/// </summary>
+ /// <remarks>
+ /// Checks whether the battery is currently being charged or not.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// bool charging = Battery.IsCharging;
+ /// ...
+ /// </code>
+ /// </example>
+ /// <seealso cref="BatteryChargingStateChangedEventArgs"/>
public static bool IsCharging
{
get
}
/// <summary>
- /// The number of available display devices.
+ /// The number of available display devices connected to current device.
/// </summary>
+ /// <remarks>
+ /// Retrieves the number of display devices connected to the system.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// Console.WriteLine("Total number of Displays are: {0}", Display.NumberOfDisplays);
+ /// </code>
+ /// </example>
+ /// <seealso cref="Display.MaxBrightness"/>
+ /// <seealso cref="Display.Brightness"/>
public static int NumberOfDisplays
{
get
/// <summary>
/// The maximum brightness value that can be set for the specific display.
/// </summary>
+ /// <remarks>
+ /// Retrieves the maximum brightness level of a specific display device.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <example>
/// <code>
}
/// <summary>
- /// The brightness value of the display.
+ /// The brightness value of the specific display device.
/// </summary>
/// <remarks>
/// The brightness value should be less than or equal to the MaxBrightness value.
/// <since_tizen> 3 </since_tizen>
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
+ /// <exception cref="InvalidOperationException">In case of any system error.</exception>
+ /// <exception cref="NotSupportedException">This exception can be due to device not supported.</exception>
/// <example>
/// <code>
/// Display display = Display.Displays[0];
/// Console.WriteLine("Display current Brightness is: {0}", display.Brightness);
/// </code>
/// </example>
+ /// <seealso cref="Display.MaxBrightness"/>
public int Brightness
{
get
}
}
/// <summary>
- /// The current device display state.
+ /// The current device display state, including normal, dim, and off states.
/// </summary>
+ /// <remarks>
+ /// When the display state is set, it should be checked the profile version and supported display state.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// DisplayState current = Display.State;
+ /// Console.WriteLine("Display current state is: {0}", current);
+ /// ...
+ /// Display.State = DisplayState.Normal;
+ /// ...
+ /// </code>
+ /// </example>
+ /// <seealso cref="Power.RequestLock"/>
+ /// <seealso cref="Power.ReleaseLock"/>
+ /// <seealso cref="DisplayState"/>
+ /// <seealso cref="DisplayStateChangedEventArgs"/>
public static DisplayState State
{
get
/// {
/// Console.WriteLine("Display State is: {0}", args.State);
/// }
- /// Battery.StateChanged += handler;
+ /// Display.StateChanged += handler;
/// await Task.Delay(20000);
/// }
/// </code>
Dispose(false);
}
/// <summary>
- /// Gets the number of the available vibrators.
+ /// Gets the number of the available vibrators available on the current device.
/// </summary>
+ /// <remarks>
+ /// Retrieves the total number of vibrators available on the device.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// Console.WriteLine("Total number of Vibrators are: {0}", Vibrator.NumberOfVibrators);
+ /// ...
+ /// </code>
+ /// </example>
public static int NumberOfVibrators
{
get
/// Vibrates during the specified time with a constant intensity.
/// This function can be used to start monotonous vibration for the specified time.
/// </summary>
+ /// <remarks>
+ /// To prevent unexpected sleep (suspend) during vibration, please check and use Power module.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <param name="duration">The play duration in milliseconds.</param>
/// <param name="feedback">The amount of the intensity variation (0 ~ 100).</param>
/// }
/// </code>
/// </example>
-
+ /// <seealso cref="Vibrator.Stop()"/>
+ /// <seealso cref="Vibrator.Dispose()"/>
public void Vibrate(int duration, int feedback)
{
IntPtr effect;
/// }
/// </code>
/// </example>
+ /// <seealso cref="Vibrator.Vibrate(int,int)"/>
public void Stop()
{
if (_hapticHandle != IntPtr.Zero)
/// Dispose API for closing the internal resources.
/// This function can be used to stop all the effects started by Vibrate().
/// </summary>
+ /// <remarks>
+ /// Internally, it disconnects the connection to the vibrator by Vibrate().
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// Vibrator vibrator = Vibrator.Vibrators[0];
+ /// vibrator.Vibrate(2000, 70);
+ /// ...
+ /// vibrator.Stop();
+ /// vibrator.Dispose();
+ /// </code>
+ /// </example>
+ /// <seealso cref="Vibrator.Vibrate(int,int)"/>
public void Dispose()
{
Dispose(true);
/// <summary>
/// Gets the information whether the IR module is available.
/// </summary>
+ /// <remarks>
+ /// Gets the boolean value whether the IR module is available on the device.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
+ /// <value>true if the IR module is available, otherwise false.</value>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// Console.WriteLine("IR availability for this device is: {0}", IR.IsAvailable);
+ /// </code>
+ /// </example>
public static bool IsAvailable
{
get
}
/// <summary>
- /// Transmits the IR command.
+ /// Transmits IR command with the specified carrier frequency and pattern.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="carrierFreequency">
/// }
/// </code>
/// </example>
+ /// <seealso cref="IR.IsAvailable"/>
public static void Transmit(int carrierFreequency, IList<int> pattern)
{
int[] patternArray = pattern.ToArray();
/// <summary>
/// Gets the maximum brightness value of the LED that is located next to the camera.
/// </summary>
+ /// <remarks>
+ /// Retrieves the maximum brightness level of the back camera flash.
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="NotSupportedException">In case the device does not support this behavior.</exception>
+ /// <example>
+ /// <code>
+ /// using Tizen.System;
+ /// ...
+ /// Console.WriteLine("Led MaxBrightness is: {0}", Led.MaxBrightness);
+ /// </code>
+ /// </example>
public static int MaxBrightness
{
get
}
/// <summary>
- /// Plays the LED that is located at the front of the device.
+ /// Plays the custom effect of the service LED that is located to the front of a device.
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <param name="on">Turn on time in milliseconds.</param>
/// }
/// </code>
/// </example>
+ /// <seealso cref="Led.Stop()"/>
public static void Play(int on, int off, Color color)
{
//looks like only blink option is supported. So hard coded to default blink option.
}
/// <summary>
- /// Stops the LED that is located at the front of the device.
+ /// Stops the custom effect of the service LED that is located to the front of a device.
/// </summary>
+ /// <remarks>
+ /// The custom effect was started by Led.Play(int,int,Color).
+ /// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
/// }
/// </code>
/// </example>
-
+ /// <seealso cref="Led.Play(int,int,Color)"/>
public static void Stop()
{
DeviceError res = (DeviceError)Interop.Device.DeviceLedStopCustom();
/// StateChanged is raised when the LED state is changed.
/// </summary>
/// <since_tizen> 3 </since_tizen>
+ /// <example>
+ /// <code>
+ /// public static async Task LedEventHandler()
+ /// {
+ /// EventHandler<LedBrightnessChangedEventArgs> handler = null;
+ /// handler = (object sender, LedBrightnessChangedEventArgs args) =>
+ /// {
+ /// Console.WriteLine("battery Level is: {0}", args.Brightness);
+ /// }
+ /// Led.BrightnessChanged += handler;
+ /// await Task.Delay(20000);
+ /// }
+ /// </code>
+ /// </example>
public static event EventHandler<LedBrightnessChangedEventArgs> BrightnessChanged
{
add
/// <summary>
/// Increase the cpu clock within timeout.
/// </summary>
+ /// <remarks>
+ /// The timeout parameter specifies the duration of the CPU boost in milliseconds.
+ /// If the timeout value exceeds 3000 milliseconds, it will automatically be set to 3000 milliseconds.
+ /// </remarks>
/// <param name="type">Performance Control Type</param>
/// <param name="timeout">Cpu clock increasing duration in milliseconds.</param>
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// <remarks>
/// If the process dies, then every lock will be removed.
/// </remarks>
+ /// <privilege>
+ /// http://tizen.org/privilege/display.state
+ /// </privilege>
/// <since_tizen> 5 </since_tizen>
/// <param name="type">
/// The power type to request lock.
/// Tizen.System.Power.RequestLock(Tizen.System.Power.PowerLock.Cpu, 2000);
/// </code>
/// </example>
+ /// <seealso cref="Power.ReleaseLock(PowerLock)"/>
+ /// <seealso cref="PowerLock"/>
public static void RequestLock(PowerLock type, int timeout)
{
DeviceError res = (DeviceError)Interop.Device.DevicePowerRequestLock((Interop.Device.PowerLock)type, timeout);
}
}
/// <summary>
- /// Releases the lock state.
+ /// Releases the given specific power lock type which was locked before.
/// </summary>
+ /// <remarks>
+ /// Releases the lock of specific power lock type that was previously acquired using Power.RequestLock(PowerLock,int).
+ /// </remarks>
+ /// <privilege>
+ /// http://tizen.org/privilege/display.state
+ /// </privilege>
/// <since_tizen> 5 </since_tizen>
/// <param name="type">
/// The power type to request lock.
/// Tizen.System.Power.ReleaseLock(Tizen.System.Power.PowerLock.Cpu);
/// </code>
/// </example>
+ /// <seealso cref="Power.RequestLock(PowerLock,int)"/>
+ /// <seealso cref="PowerLock"/>
public static void ReleaseLock(PowerLock type)
{
DeviceError res = (DeviceError)Interop.Device.DevicePowerReleaseLock((Interop.Device.PowerLock)type);
}
}
/// <summary>
- /// Power off the device.
+ /// Requests the current device's power state change to be changed to powered off.
/// </summary>
+ /// <remarks>
+ /// It operates synchronously and powers off the current device.
+ /// </remarks>
/// <privilege>http://tizen.org/privilege/reboot</privilege>
/// <privlevel>platform</privlevel>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// Tizen.System.Power.PowerOff();
/// </code>
/// </example>
+ /// <since_tizen> 9 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void PowerOff()
{
}
}
/// <summary>
- /// Reboot the device.
+ /// Sends a request to the deviced Rebooting the current device.
/// </summary>
+ /// <remarks>
+ /// It operates asynchronously.
+ /// </remarks>
/// <privilege>http://tizen.org/privilege/reboot</privilege>
/// <privlevel>platform</privlevel>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// Tizen.System.Power.Reboot(null);
/// </code>
/// </example>
+ /// <seealso cref="Power.CheckRebootAllowed()"/>
+ /// <since_tizen> 9 </since_tizen>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void Reboot(string reason)
{
/// }
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
+ /// <seealso cref="Power.CancelWaitCallback(UInt64)"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void ConfirmWaitCallback(UInt64 wait_callback_id)
{
/// }
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
+ /// <seealso cref="Power.ConfirmWaitCallback(UInt64)"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void CancelWaitCallback(UInt64 wait_callback_id)
{
///
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
+ /// <seealso cref="PowerState"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static void ChangeState(PowerState state, int timeout_sec)
{
#if !PROFILE_TV
/// <summary>
- /// Get wakeup reason.
+ /// Gets the reason for the last device wakeup based on the scenario.
/// </summary>
/// <remarks>
/// This api is not supported at TV profile.
/// PowerTransitionReason transition_reason = Power.GetWakeupReason();
/// </code>
/// </example>
+ /// <seealso cref="PowerTransitionReason"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static PowerTransitionReason GetWakeupReason()
{
#endif
/// <summary>
- /// Gets the status of power lock.
+ /// Gets the status of power lock is locked or not based on specific power lock type.
/// </summary>
+ /// <remarks>
+ /// Retrieves the status of a power lock.
+ /// </remarks>
/// <since_tizen> 10 </since_tizen>
/// <param name="type"> Type of power lock. </param>
/// <exception cref="ArgumentException">When an invalid parameter value is set.</exception>
/// PowerLockState lock_state = Power.GetLockState(PowerLock.Cpu);
/// </code>
/// </example>
+ /// <seealso cref="PowerLock"/>
+ /// <seealso cref="PowerLockState"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static PowerLockState GetLockState(PowerLock type)
{
/// Power.StartStateChangeRequestCallback += PowerStateChangeRequestCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateChangeRequestEventArgs> StartStateChangeRequestCallback
{
/// Power.SleepStateChangeRequestCallback += PowerStateChangeRequestCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateChangeRequestEventArgs> SleepStateChangeRequestCallback
{
/// Power.PoweroffStateChangeRequestCallback += PowerStateChangeRequestCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateChangeRequestEventArgs> PoweroffStateChangeRequestCallback
{
/// Power.RebootStateChangeRequestCallback += PowerStateChangeRequestCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateChangeRequestEventArgs> RebootStateChangeRequestCallback
{
/// Power.ExitStateChangeRequestCallback += PowerStateChangeRequestCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateChangeRequestEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateChangeRequestEventArgs> ExitStateChangeRequestCallback
{
/// Power.StartStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> StartStateWaitCallback
{
/// Power.NormalStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> NormalStateWaitCallback
{
/// Power.SleepStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> SleepStateWaitCallback
{
/// Power.PoweroffStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> PoweroffStateWaitCallback
{
/// Power.RebootStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> RebootStateWaitCallback
{
/// Power.ExitStateWaitCallback += PowerStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerStateWaitEventArgs> ExitStateWaitCallback
{
/// Power.TransientResumingEarlyStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingEarlyStateWaitCallback
{
/// Power.TransientResumingStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingStateWaitCallback
{
/// Power.TransientResumingLateStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientResumingLateStateWaitCallback
{
/// Power.TransientSuspendingEarlyStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingEarlyStateWaitCallback
{
/// Power.TransientSuspendingStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingStateWaitCallback
{
/// Power.TransientSuspendingLateStateWaitCallback += PowerTransientStateWaitCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerTransientStateWaitEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerTransientStateWaitEventArgs> TransientSuspendingLateStateWaitCallback
{
/// Power.CpuLockStateChangedCallback += PowerLockStateChangeCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerLockStateChangedEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerLockStateChangedEventArgs> CpuLockStateChangedCallback
{
/// Power.DisplayNormalLockStateChangedCallback += PowerLockStateChangeCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerLockStateChangedEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerLockStateChangedEventArgs> DisplayNormalLockStateChangedCallback
{
/// Power.DisplayDimLockStateChangedCallback += PowerLockStateChangeCallback;
/// </code>
/// </example>
+ /// <seealso cref="PowerLockStateChangedEventArgs"/>
[EditorBrowsable(EditorBrowsableState.Never)]
public static event EventHandler<PowerLockStateChangedEventArgs> DisplayDimLockStateChangedCallback
{