From 738e879e6aef282f087bc078a7628e5b7172a9f3 Mon Sep 17 00:00:00 2001 From: Jeongmo Yang Date: Mon, 22 Aug 2016 14:08:07 +0900 Subject: [Release version 0.2.68] Add warning message for deprecated API Change-Id: I45506468a01eb3e5a7c94592be4a9141e82bf808 Signed-off-by: Jeongmo Yang --- packaging/capi-media-camera.spec | 2 +- src/camera.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) 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]); } -- cgit v1.2.3