summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeongmo Yang <jm80.yang@samsung.com>2016-08-22 14:08:07 +0900
committerJeongmo Yang <jm80.yang@samsung.com>2016-08-22 14:10:44 +0900
commit738e879e6aef282f087bc078a7628e5b7172a9f3 (patch)
tree0262d6152c76d8e17354c9577c3e1cadf70dd23f
parent61b32dedbdbfc5360e98afa7f42dcf32fd2b758c (diff)
downloadcamera-738e879e6aef282f087bc078a7628e5b7172a9f3.tar.gz
camera-738e879e6aef282f087bc078a7628e5b7172a9f3.tar.bz2
camera-738e879e6aef282f087bc078a7628e5b7172a9f3.zip
[Release version 0.2.68] Add warning message for deprecated API
Change-Id: I45506468a01eb3e5a7c94592be4a9141e82bf808 Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r--packaging/capi-media-camera.spec2
-rw-r--r--src/camera.c21
2 files changed, 22 insertions, 1 deletions
diff --git a/packaging/capi-media-camera.spec b/packaging/capi-media-camera.spec
index 690d971..1939c2e 100644
--- a/packaging/capi-media-camera.spec
+++ b/packaging/capi-media-camera.spec
@@ -1,6 +1,6 @@
Name: capi-media-camera
Summary: A Camera API
-Version: 0.2.67
+Version: 0.2.68
Release: 0
Group: Multimedia/API
License: Apache-2.0
diff --git a/src/camera.c b/src/camera.c
index 5e3bc83..baa060f 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -302,6 +302,13 @@ static int _client_wait_for_cb_return(muse_camera_api_e api, camera_cb_info_s *c
g_mutex_unlock(&(cb_info->api_mutex[api]));
+ if (ret == CAMERA_ERROR_SOUND_POLICY)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY is deprecated and will be removed from next release.");
+ else if (ret == CAMERA_ERROR_SOUND_POLICY_BY_CALL)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY_BY_CALL is deprecated and will be removed from next release.");
+ else if (ret == CAMERA_ERROR_SOUND_POLICY_BY_ALARM)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY_BY_ALARM is deprecated and will be removed from next release.");
+
return ret;
}
@@ -1064,6 +1071,13 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus
LOGD("INTERRUPTED - policy %d, state previous %d, current %d",
policy, previous, current);
+ if (policy == CAMERA_POLICY_SOUND)
+ LOGW("DEPRECATION WARNING: CAMERA_POLICY_SOUND is deprecated and will be removed from next release.");
+ else if (policy == CAMERA_POLICY_SOUND_BY_CALL)
+ LOGW("DEPRECATION WARNING: CAMERA_POLICY_SOUND_BY_CALL is deprecated and will be removed from next release.");
+ else if (policy == CAMERA_POLICY_SOUND_BY_ALARM)
+ LOGW("DEPRECATION WARNING: CAMERA_POLICY_SOUND_BY_ALARM is deprecated and will be removed from next release.");
+
((camera_interrupted_cb)cb_info->user_cb[event])((camera_policy_e)policy,
(camera_state_e)previous, (camera_state_e)current, cb_info->user_data[event]);
}
@@ -1121,6 +1135,13 @@ static void _client_user_callback(camera_cb_info_s *cb_info, char *recv_msg, mus
LOGE("ERROR - error 0x%x, current_state %d", error, current_state);
+ if (error == CAMERA_ERROR_SOUND_POLICY)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY is deprecated and will be removed from next release.");
+ else if (error == CAMERA_ERROR_SOUND_POLICY_BY_CALL)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY_BY_CALL is deprecated and will be removed from next release.");
+ else if (error == CAMERA_ERROR_SOUND_POLICY_BY_ALARM)
+ LOGW("DEPRECATION WARNING: CAMERA_ERROR_SOUND_POLICY_BY_ALARM is deprecated and will be removed from next release.");
+
((camera_error_cb)cb_info->user_cb[event])((camera_error_e)error,
(camera_state_e)current_state, cb_info->user_data[event]);
}