capi-sensor: add sensor types for HRM sensor 65/35465/1
authorKibak Yoon <kibak.yoon@samsung.com>
Mon, 16 Feb 2015 07:25:48 +0000 (16:25 +0900)
committerKibak Yoon <kibak.yoon@samsung.com>
Mon, 16 Feb 2015 07:32:48 +0000 (16:32 +0900)
Heart Rate Monitor Sensor type is added and supported.

added the following types:
- SENSOR_HRM
- SENSOR_HRM_LED_GREEN
- SENSOR_HRM_LED_IR
- SENSOR_HRM_LED_RED

Signed-off-by: Kibak Yoon <kibak.yoon@samsung.com>
Change-Id: I5faf535c5c229809ff45ce53844a48f0bca7ff18

doc/sensor_doc.h
include/sensors.h
src/sensor.cpp

index 4a9ab19..bf3b708 100644 (file)
  *  - http://tizen.org/feature/sensor.linear_acceleration\n
  *  - http://tizen.org/feature/sensor.rotation_vector\n
  *  - http://tizen.org/feature/sensor.gravity\n
+ *  - http://tizen.org/feature/sensor.heart_rate_monitor\n
+ *  - http://tizen.org/feature/sensor.hrm_led_green\n
+ *  - http://tizen.org/feature/sensor.hrm_led_ir\n
+ *  - http://tizen.org/feature/sensor.hrm_led_red\n
  *
  * It is recommended to design feature related codes in your application for reliability.\n
  *
  *  - http://tizen.org/feature/sensor.linear_acceleration\n
  *  - http://tizen.org/feature/sensor.rotation_vector\n
  *  - http://tizen.org/feature/sensor.gravity\n
+ *  - http://tizen.org/feature/sensor.heart_rate_monitor\n
+ *  - http://tizen.org/feature/sensor.hrm_led_green\n
+ *  - http://tizen.org/feature/sensor.hrm_led_ir\n
+ *  - http://tizen.org/feature/sensor.hrm_led_red\n
  *
  * It is recommended to design feature related codes in your application for reliability.\n
  *
  *  - http://tizen.org/feature/sensor.linear_acceleration\n
  *  - http://tizen.org/feature/sensor.rotation_vector\n
  *  - http://tizen.org/feature/sensor.gravity\n
+ *  - http://tizen.org/feature/sensor.heart_rate_monitor\n
+ *  - http://tizen.org/feature/sensor.hrm_led_green\n
+ *  - http://tizen.org/feature/sensor.hrm_led_ir\n
+ *  - http://tizen.org/feature/sensor.hrm_led_red\n
  *
  * It is recommended to design feature related codes in your application for reliability.\n
  *
index ccd291e..f35c32d 100644 (file)
@@ -134,6 +134,10 @@ typedef enum
        SENSOR_ULTRAVIOLET,                      /**< Ultraviolet sensor */
        SENSOR_TEMPERATURE,                      /**< Temperature sensor */
        SENSOR_HUMIDITY,                         /**< Humidity sensor */
+       SENSOR_HRM,                              /**< Heart Rate Monitor sensor */
+       SENSOR_HRM_LED_GREEN,                    /**< HRM (LED Green) sensor */
+       SENSOR_HRM_LED_IR,                       /**< HRM (LED IR) sensor */
+       SENSOR_HRM_LED_RED,                      /**< HRM (LED RED) sensor */
        SENSOR_LAST,                             /**< End of sensor enum values */
        SENSOR_CUSTOM = 10000                    /**< Custom sensor */
 } sensor_type_e;
@@ -156,6 +160,8 @@ typedef enum
  * @brief Checks whether a given sensor type is available on a device.
  * @details Availability of a sensor should be checked first because this sensor may not be supported on the device.
  * @since_tizen 2.3
+ * @remarks For getting a handle of HRM Sensor(including HRM_LED_GREEN, HRM_LED_IR and HRM_LED_RED)
+ * the privilege should be set to, %http://tizen.org/privilege/healthinfo.
  *
  * @param[in]   type        The sensor type to check
  * @param[out]  supported   If @c true this sensor type is supported,
@@ -173,6 +179,8 @@ int sensor_is_supported(sensor_type_e type, bool *supported);
 /**
  * @brief Gets a specific sensor handle.
  * @since_tizen 2.3
+ * @remarks For getting a handle of HRM Sensor(including HRM_LED_GREEN, HRM_LED_IR and HRM_LED_RED)
+ * the privilege should be set to, %http://tizen.org/privilege/healthinfo.
  *
  * @param[in]  type     The sensor type
  * @param[out] sensor   The sensor handle
index aaf974d..37f9457 100644 (file)
@@ -59,6 +59,10 @@ sensor_type_t _TYPE[] = {
        ULTRAVIOLET_SENSOR,
        TEMPERATURE_SENSOR,
        HUMIDITY_SENSOR,
+       BIO_HRM_SENSOR,
+       BIO_LED_GREEN_SENSOR,
+       BIO_LED_IR_SENSOR,
+       BIO_LED_RED_SENSOR,
 };
 
 static int sensor_connect (sensor_h sensor, sensor_listener_h listener)