[ACR-1754] Add new APIs for camera settings
[platform/core/api/camera.git] / include / camera.h
index 5f070e0..d9d35b9 100644 (file)
@@ -480,11 +480,13 @@ typedef enum {
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
 typedef enum {
-       CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,   /**< Off */
-       CAMERA_ATTR_EXPOSURE_MODE_ALL,       /**< All mode */
-       CAMERA_ATTR_EXPOSURE_MODE_CENTER,    /**< Center mode */
-       CAMERA_ATTR_EXPOSURE_MODE_SPOT,      /**< Spot mode */
-       CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,    /**< Custom mode */
+       CAMERA_ATTR_EXPOSURE_MODE_OFF = 0,          /**< Off */
+       CAMERA_ATTR_EXPOSURE_MODE_ALL,              /**< All mode */
+       CAMERA_ATTR_EXPOSURE_MODE_CENTER,           /**< Center mode */
+       CAMERA_ATTR_EXPOSURE_MODE_SPOT,             /**< Spot mode */
+       CAMERA_ATTR_EXPOSURE_MODE_CUSTOM,           /**< Custom mode */
+       CAMERA_ATTR_EXPOSURE_MODE_SHUTTER_PRIORITY, /**< Shutter priority mode (Since 7.5) */
+       CAMERA_ATTR_EXPOSURE_MODE_APERTURE_PRIORITY /**< Aperture priority mode (Since 7.5) */
 } camera_attr_exposure_mode_e;
 
 /**
@@ -3067,6 +3069,74 @@ int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
 int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
 
 /**
+ * @brief Sets the gain level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[in] level  The gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_INVALID_STATE Invalid state
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
+ * @see camera_attr_get_gain()
+ * @see camera_attr_get_gain_range()
+ * @see camera_attr_get_gain_step()
+ */
+int camera_attr_set_gain(camera_h camera, int level);
+
+/**
+ * @brief Gets the gain level.
+ * @since_tizen 7.5
+ * @param[in]  camera The handle to the camera
+ * @param[out] level  The gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_gain()
+ * @see camera_attr_get_gain_range()
+ * @see camera_attr_get_gain_step()
+ */
+int camera_attr_get_gain(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available gain level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in]  camera The handle to the camera
+ * @param[out] min    The minimum gain level
+ * @param[out] max    The maximum gain level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_gain()
+ * @see camera_attr_get_gain()
+ * @see camera_attr_get_gain_step()
+ */
+int camera_attr_get_gain_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Gets the gain level step.
+ * @since_tizen 7.5
+ * @param[in]  camera The handle to the camera
+ * @param[out] step   The gain level step
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_gain()
+ * @see camera_attr_get_gain()
+ * @see camera_attr_get_gain_range()
+ */
+int camera_attr_get_gain_step(camera_h camera, int *step);
+
+/**
  * @}
  */
 
@@ -3358,6 +3428,166 @@ int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whi
 int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
 
 /**
+ * @brief Sets the white balance temperature.
+ * @since_tizen 7.5
+ * @param[in] camera      The handle to the camera
+ * @param[in] temperature The white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_get_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature_range()
+ * @see camera_attr_get_whitebalance_temperature_step()
+ */
+int camera_attr_set_whitebalance_temperature(camera_h camera, int temperature);
+
+/**
+ * @brief Gets the white balance temperature.
+ * @since_tizen 7.5
+ * @param[in]  camera      The handle to the camera
+ * @param[out] temperature The white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature_range()
+ * @see camera_attr_get_whitebalance_temperature_step()
+ */
+int camera_attr_get_whitebalance_temperature(camera_h camera, int *temperature);
+
+/**
+ * @brief Gets the available white balance temperature.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in]  camera The handle to the camera
+ * @param[out] min    The minimum white balance temperature
+ * @param[out] max    The maximum white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature_step()
+ */
+int camera_attr_get_whitebalance_temperature_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Gets the step of white balance temperature.
+ * @since_tizen 7.5
+ * @param[in]  camera The handle to the camera
+ * @param[out] step   The step of white balance temperature
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature()
+ * @see camera_attr_get_whitebalance_temperature_range()
+ */
+int camera_attr_get_whitebalance_temperature_step(camera_h camera, int *step);
+
+/**
+ * @brief Sets the saturation level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[in] level  The saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_get_saturation()
+ * @see camera_attr_get_saturation_range()
+ */
+int camera_attr_set_saturation(camera_h camera, int level);
+
+/**
+ * @brief Gets the saturation level.
+ * @since_tizen 7.5
+ * @param[in]  camera The handle to the camera
+ * @param[out] level  The saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_saturation()
+ * @see camera_attr_get_saturation_range()
+ */
+int camera_attr_get_saturation(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available saturation level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in]  camera The handle to the camera
+ * @param[out] min    The minimum saturation level
+ * @param[out] max    The maximum saturation level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_saturation()
+ * @see camera_attr_get_saturation()
+ */
+int camera_attr_get_saturation_range(camera_h camera, int *min, int *max);
+
+/**
+ * @brief Sets the sharpness level.
+ * @since_tizen 7.5
+ * @param[in] camera The handle to the camera
+ * @param[in] level  The sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_get_sharpness()
+ * @see camera_attr_get_sharpness_range()
+ */
+int camera_attr_set_sharpness(camera_h camera, int level);
+
+/**
+ * @brief Gets the sharpness level.
+ * @since_tizen 7.5
+ * @param[in]  camera The handle to the camera
+ * @param[out] level  The sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_sharpness()
+ * @see camera_attr_get_sharpness_range()
+ */
+int camera_attr_get_sharpness(camera_h camera, int *level);
+
+/**
+ * @brief Gets the available sharpness level.
+ * @since_tizen 7.5
+ * @remarks If the min value is greater than the max value, it means that this feature is not supported.
+ * @param[in]  camera The handle to the camera
+ * @param[out] min    The minimum sharpness level
+ * @param[out] max    The maximum sharpness level
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
+ * @see camera_attr_set_sharpness()
+ * @see camera_attr_get_sharpness()
+ */
+int camera_attr_get_sharpness_range(camera_h camera, int *min, int *max);
+
+/**
  * @}
  */