Add privilege check code.
[platform/framework/native/appfw.git] / inc / FSysVibrator.h
index a1d7a04..33463c3 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -67,11 +66,11 @@ namespace Tizen { namespace System
  *             goto CATCH;
  *     }
  *
- *     // Initialize vibration pattern
+ *     // Initializes the vibration pattern
  *     IntensityDurationVibrationPattern patterns[4] = {{2000, 50}, {1000, 0}, {500, -1}, {1000, 80}};
  *     int length = sizeof(patterns);
 
- *     // Vibrate with a given pattern and repeat count
+ *     // Vibrates with a given pattern and repeats count
  *     vibrator.Start(patterns, length, 3);
  *
  *     return E_SUCCESS;
@@ -87,13 +86,13 @@ namespace Tizen { namespace System
  * @struct      IntensityDurationVibrationPattern
  * @brief       This struct has the specified duration and a vibration intensity level.
  *
- * This can be used with Vibrator::Start(IntensityDurationVibrationPattern[] patterns, int length, int count) as a custom pattern.
+ * The %IntensityDurationVibrationPattern struct has the specified duration and a vibration intensity level. This can be used with Vibrator::Start(IntensityDurationVibrationPattern[] patterns, int length, int repeatCount) as a custom pattern.
  *
  * @since 2.1
  */
-struct IntensityDurationVibrationPattern
+struct _OSP_EXPORT_ IntensityDurationVibrationPattern
 {
-       int duration; /**< The duration in milliseconds when the vibrator is on. @n
+       int duration; /**< The duration in milliseconds when the vibrator is on @n
                        *       The @c duration is not allowed a negative value.
                        */
        int intensity; /**< The vibration intensity [@c -1~ @c 100]: @n
@@ -143,22 +142,22 @@ public:
 
 
         /**
-         * Vibrates the device with the specified array pattern which has vibration intensity and duration. @n
-         * This method returns the result immediately so that the vibration occurs simultaneously as the device runs. @n
+         * Vibrates the device with a specified array pattern that has vibration intensity and duration. @n
+         * The %Start() method returns the result immediately so that the vibration occurs simultaneously as the device runs. @n
          * If this method is called again before the previous vibration stops, the previous vibration is canceled and the new vibration starts immediately. @n
          * If a new vibrator instance triggers the vibration, the vibrator merges the previous vibration pattern with the new one in the overlapped time. @n
          * If the system alert occurs such as ring vibration and a system event notification, the vibration can be interrupted. @n
          * If the application is terminated, the vibration is canceled.
          *
          * @since 2.1
-         *
-         * @privilege     http://tizen.org/privilege/vibrator
+        * @privlevel   public
+         * @privilege  %http://tizen.org/privilege/vibrator
          *
          * @return      An error code
          *
-         * @param[in]   patterns                        An array of @c IntensityDurationVibrationPattern.
-        * @param[in]   length                          The length of @c patterns.
-         * @param[in]   repeatCount                           The number of repeat for pattern. This value has to be between 1 to 100.
+         * @param[in]   patterns                        An array of @c IntensityDurationVibrationPattern
+        * @param[in]   length                          The length of @c patterns
+         * @param[in]   repeatCount                           The number of times the pattern repeats @n This value must be between @c 1 to @c 100.
          * @exception   E_SUCCESS           The method is successful.
          * @exception    E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
          * @exception   E_INVALID_ARG       A specified input parameter is invalid.
@@ -170,15 +169,14 @@ public:
 
        /**
         * Vibrates the device with the specified pattern and level. @n
-        * This method returns the result immediately so that the vibration occurs simultaneously as the device runs.
+        * The %Start() method returns the result immediately so that the vibration occurs simultaneously as the device runs.
         * If this method is called again before the previous vibration stops, the previous vibration is canceled and the new vibration starts immediately.
         *
+        * @brief       <i>[Deprecated]</i>
+        * @deprecated This method is deprecated. Instead of using this method, use Start(IntensityDurationVibrationPattern*, int, int).
         * @since 2.0
-        *
-        * @deprecated This method is deprecated. Instead of using this method, use Start(IntensityDurationVibrationPattern[] patterns, int length, int repeatCount).
-        *
         * @privlevel   public
-        * @privilege   http://tizen.org/privilege/vibrator
+        * @privilege   %http://tizen.org/privilege/vibrator
         *
         * @return      An error code
         * @param[in]   onPeriod    The period in milliseconds when the vibrator is on @n
@@ -188,7 +186,7 @@ public:
         * @param[in]   count       The number of times to execute the given pattern @n
         *                          It should be greater than @c 0.
         * @param[in]   level       The vibration level @n
-        *                          Ranges from [@c 0~ @c 100], where ' @c 0' is a special case indicating the system default level.
+        *                          Ranges from [@c 0~ @c 100], where '@c 0' is a special case indicating the system default level.
         * @exception   E_SUCCESS           The method is successful.
         * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
         * @exception   E_INVALID_ARG       A specified input parameter is invalid.
@@ -204,15 +202,14 @@ public:
 
        /**
         * Vibrates the device for the specified duration at the specified @c level. @n
-        * This method returns the result immediately so that the vibration occurs simultaneously as the device runs.
+        * The %Start() method returns the result immediately so that the vibration occurs simultaneously as the device runs.
         * If this method is called again before the previous vibration stops, the previous vibration is canceled and the new vibration starts immediately.
         *
+        * @brief       <i>[Deprecated]</i>
+        * @deprecated This method is deprecated. Instead of using this method, use Start(IntensityDurationVibrationPattern*, int, int).
         * @since       2.0
-        *
-        * @deprecated This method is deprecated. Instead of using this method, use Start(IntensityDurationVibrationPattern[] patterns, int length, int repeatCount).
-        *
         * @privlevel   public
-        * @privilege   http://tizen.org/privilege/vibrator
+        * @privilege   %http://tizen.org/privilege/vibrator
         *
         * @return      An error code
         * @param[in]   milliseconds    The duration for the vibration in milliseconds @n
@@ -236,9 +233,8 @@ public:
         * Turns the vibrator off.
         *
         * @since   2.0
-        *
         * @privlevel   public
-        * @privilege   http://tizen.org/privilege/vibrator
+        * @privilege   %http://tizen.org/privilege/vibrator
         *
         * @return      An error code
         * @exception   E_SUCCESS           The method is successful.