summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2017-06-09 18:39:30 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2017-06-14 18:10:06 +0900
commitc64db312088425fd6ac87c1e32f83fe027a36b16 (patch)
tree10874941714020fdad1a871bcba51183920bccd7 /include
parent2543d8cbaa4dcfd802b410b9f5345fc8e3b957e2 (diff)
downloadcamera-c64db312088425fd6ac87c1e32f83fe027a36b16.tar.gz
camera-c64db312088425fd6ac87c1e32f83fe027a36b16.tar.bz2
camera-c64db312088425fd6ac87c1e32f83fe027a36b16.zip
The application can only get callback after interrupt is completed, it means that there is no way to know the internal interrupt handling status for application. This patch provides the APIs to get callback when interrupt is started. [Version] 0.3.2 [Profile] Common [Issue Type] Update [Dependency module] N/A [Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-unified_20170608.1] Change-Id: I3af3dedec3f1c195c0206e32b7509a368d84ee5e Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/camera.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/include/camera.h b/include/camera.h
index 5a8933c..c102af0 100644
--- a/include/camera.h
+++ b/include/camera.h
@@ -549,6 +549,7 @@ typedef void (*camera_device_state_changed_cb)(camera_device_e device, camera_de
/**
* @brief Called when the camera is interrupted by policy.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @remarks This callback is called after interrupt handling is completed.
* @param[in] policy The policy that interrupted the camera
* @param[in] previous The previous state of the camera
* @param[in] current The current state of the camera
@@ -558,6 +559,17 @@ typedef void (*camera_device_state_changed_cb)(camera_device_e device, camera_de
typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
/**
+ * @brief Called when the camera interrupt is started by policy.
+ * @since_tizen 4.0
+ * @remarks This callback is called before interrupt handling is started.
+ * @param[in] policy The policy that is interrupting the camera
+ * @param[in] state The current state of the camera
+ * @param[in] user_data The user data passed from the callback registration function
+ * @see camera_set_interrupt_started_cb()
+ */
+typedef void (*camera_interrupt_started_cb)(camera_policy_e policy, camera_state_e state, void *user_data);
+
+/**
* @brief Called when the camera focus state is changed.
* @details When the camera auto focus completes or a change to the focus state occurs,
* this callback is invoked. \n \n
@@ -1844,8 +1856,7 @@ int camera_unset_state_changed_cb(camera_h camera);
* @see camera_unset_interrupted_cb()
* @see camera_interrupted_cb()
*/
-int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
- void *user_data);
+int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
@@ -1862,6 +1873,31 @@ int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback,
int camera_unset_interrupted_cb(camera_h camera);
/**
+ * @brief Registers a callback function to be called when the camera interrupt is started by policy.
+ * @since_tizen 4.0
+ * @param[in] camera The handle to the camera
+ * @param[in] callback The callback function to register
+ * @param[in] user_data The user data to be passed to the callback function
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see camera_unset_interrupt_started_cb()
+ * @see camera_interrupt_started_cb()
+ */
+int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb callback, void *user_data);
+
+/**
+ * @brief Unregisters the callback function.
+ * @since_tizen 4.0
+ * @param[in] camera The handle to the camera
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #CAMERA_ERROR_NONE Successful
+ * @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
+ * @see camera_set_interrupt_started_cb()
+ */
+int camera_unset_interrupt_started_cb(camera_h camera);
+
+/**
* @brief Registers a callback function to be called when the auto-focus state changes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera