Skip to content

Commit

Permalink
[Feedback][Device][Add new vibration feature] (Samsung#319)
Browse files Browse the repository at this point in the history
Signed-off-by: pr.jung <[email protected]>
  • Loading branch information
prjung authored and hyotaekshim committed Jul 3, 2018
1 parent c35caa4 commit b2cd67e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/Tizen.System.Feedback/Feedback/Feedback.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ public class Feedback
/// Constructor of Feedback class
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <exception cref="NotSupportedException">Thrown when failed becuase the device (haptic, sound) is not supported.</exception>
/// <feature>
/// http://tizen.org/feature/feedback.vibration for FeedbackType.Vibration
/// </feature>
/// <exception cref="NotSupportedException">Thrown when failed because the devices (vibration and sound) are not supported.</exception>
/// <exception cref="InvalidOperationException">Thrown when failed because of a system error.</exception>
/// <privilege>http://tizen.org/privilege/haptic</privilege>
/// <example>
Expand Down Expand Up @@ -228,6 +231,9 @@ public Feedback()
/// <since_tizen> 3 </since_tizen>
/// <param name="type">The feedback type.</param>
/// <param name="pattern">The feedback pattern string.</param>
/// <feature>
/// http://tizen.org/feature/feedback.vibration for FeedbackType.Vibration
/// </feature>
/// <returns>Information whether a pattern is supported.</returns>
/// <exception cref="Exception">Thrown when failed because the feedback is not initialized.</exception>
/// <exception cref="ArgumentException">Thrown when failed because of an invalid arguament.</exception>
Expand Down Expand Up @@ -293,6 +299,9 @@ public bool IsSupportedPattern(FeedbackType type, String pattern)
/// <since_tizen> 3 </since_tizen>
/// <param name="type">The feedback type.</param>
/// <param name="pattern">The feedback pattern string.</param>
/// <feature>
/// http://tizen.org/feature/feedback.vibration for FeedbackType.Vibration
/// </feature>
/// <exception cref="Exception">Thrown when failed because feedback is not initialized.</exception>
/// <exception cref="ArgumentException">Thrown when failed because of an invalid arguament.</exception>
/// <exception cref="NotSupportedException">Thrown when failed because the device (haptic, sound) or a specific pattern is not supported.</exception>
Expand Down Expand Up @@ -355,6 +364,9 @@ public void Play(FeedbackType type, String pattern)
/// To stop vibration, the application should have http://tizen.org/privilege/haptic privilege.
/// </remarks>
/// <since_tizen> 3 </since_tizen>
/// <feature>
/// http://tizen.org/feature/feedback.vibration
/// </feature>
/// <exception cref="Exception">Thrown when failed because the feedback is not initialized.</exception>
/// <exception cref="ArgumentException">Thrown when failed because of an invalid arguament</exception>
/// <exception cref="NotSupportedException">Thrown when failed because the device (haptic, sound) or a specific pattern is not supported.</exception>
Expand Down
13 changes: 13 additions & 0 deletions src/Tizen.System/Device/Haptic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ namespace Tizen.System
/// <privilege>
/// http://tizen.org/privilege/haptic
/// </privilege>
/// <feature>
/// http://tizen.org/feature/feedback.vibration
/// </feature>
/// <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 creg="NotSupportedException">The required feature is not supported</exception>
/// <example>
/// <code>
/// Console.WriteLine("Total number of Vibrators are: {0}", Tizen.System.Vibrator.NumberOfVibrators);
Expand Down Expand Up @@ -117,6 +124,9 @@ private static IReadOnlyList<Vibrator> GetAllVibrators()
/// <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>
/// <feature>
/// http://tizen.org/feature/feedback.vibration
/// </feature>
/// <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>
Expand Down Expand Up @@ -158,6 +168,9 @@ public void Vibrate(int duration, int feedback)
/// This function can be used to stop all the effects started by Vibrate().
/// </summary>
/// <since_tizen> 3 </since_tizen>
/// <feature>
/// http://tizen.org/feature/feedback.vibration
/// </feature>
/// <exception cref="ArgumentException"> In case an invalid vibrator instance is used.</exception>
/// <exception cref="UnauthorizedAccessException">If the privilege is not set.</exception>
/// <exception cref="InvalidOperationException">In case of any system error.</exception>
Expand Down

0 comments on commit b2cd67e

Please sign in to comment.