[Release version 0.2.68] Add warning message for deprecated API 90/84690/1
authorJeongmo Yang <jm80.yang@samsung.com>
Mon, 22 Aug 2016 05:08:07 +0000 (14:08 +0900)
committerJeongmo Yang <jm80.yang@samsung.com>
Mon, 22 Aug 2016 05:10:44 +0000 (14:10 +0900)
Change-Id: I45506468a01eb3e5a7c94592be4a9141e82bf808
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
packaging/capi-media-camera.spec
src/camera.c

index 690d971..1939c2e 100644 (file)
@@ -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
index 5e3bc83..baa060f 100644 (file)
@@ -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]);
                }