Apply DEPRECATION macro and declare deprecation of sound_manager_unset_current_sound_... 52/89052/2
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 22 Sep 2016 01:50:14 +0000 (10:50 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 22 Sep 2016 02:30:59 +0000 (11:30 +0900)
[Version] 0.3.67
[Profile] Common
[Issue Type] Deprecation

Change-Id: I920e1002adb8e1bcf2355a8a2997363280c0f9dc
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/sound_manager.h
packaging/capi-media-sound-manager.spec
src/sound_manager.c

index 158ea92..60cd1c9 100644 (file)
@@ -513,7 +513,7 @@ int sound_manager_get_volume(sound_type_e type, int *volume);
  * @see sound_manager_get_current_sound_type()
  * @see sound_manager_unset_current_sound_type()
  */
-int sound_manager_set_current_sound_type(sound_type_e type);
+int sound_manager_set_current_sound_type(sound_type_e type) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Gets the type of the sound being currently played.
@@ -531,6 +531,7 @@ int sound_manager_set_current_sound_type(sound_type_e type);
 int sound_manager_get_current_sound_type(sound_type_e *type);
 
 /**
+ * @deprecated Deprecated since 3.0.
  * @brief Unsets the type of the sound being currently played.
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  * @return @c 0 on success,
@@ -540,7 +541,7 @@ int sound_manager_get_current_sound_type(sound_type_e *type);
  * @see sound_manager_set_current_sound_type()
  * @see sound_manager_get_current_sound_type()
  */
-int sound_manager_unset_current_sound_type(void);
+int sound_manager_unset_current_sound_type(void) TIZEN_DEPRECATED_API;
 
 /**
  * @brief Registers a callback function to be invoked when the volume level is changed.
@@ -1010,7 +1011,7 @@ int sound_manager_remove_focus_state_watch_cb(int id);
  * @see sound_manager_set_voip_session_mode()
  * @see sound_manager_get_voip_session_mode()
  */
-int sound_manager_set_session_type(sound_session_type_e type);
+int sound_manager_set_session_type(sound_session_type_e type) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0.
@@ -1029,7 +1030,7 @@ int sound_manager_set_session_type(sound_session_type_e type);
  * @see sound_manager_set_voip_session_mode()
  * @see sound_manager_get_voip_session_mode()
  */
-int sound_manager_get_session_type(sound_session_type_e *type);
+int sound_manager_get_session_type(sound_session_type_e *type) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1049,7 +1050,7 @@ int sound_manager_get_session_type(sound_session_type_e *type);
  * @see sound_manager_set_media_session_resumption_option()
  * @see sound_manager_get_media_session_resumption_option()
  */
-int sound_manager_set_media_session_option(sound_session_option_for_starting_e s_option, sound_session_option_for_during_play_e d_option);
+int sound_manager_set_media_session_option(sound_session_option_for_starting_e s_option, sound_session_option_for_during_play_e d_option) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1069,7 +1070,7 @@ int sound_manager_set_media_session_option(sound_session_option_for_starting_e s
  * @see sound_manager_set_media_session_resumption_option()
  * @see sound_manager_get_media_session_resumption_option()
  */
-int sound_manager_get_media_session_option(sound_session_option_for_starting_e *s_option, sound_session_option_for_during_play_e *d_option);
+int sound_manager_get_media_session_option(sound_session_option_for_starting_e *s_option, sound_session_option_for_during_play_e *d_option) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1088,7 +1089,7 @@ int sound_manager_get_media_session_option(sound_session_option_for_starting_e *
  * @see sound_manager_get_media_session_option()
  * @see sound_manager_get_media_session_resumption_option()
  */
-int sound_manager_set_media_session_resumption_option(sound_session_option_for_resumption_e option);
+int sound_manager_set_media_session_resumption_option(sound_session_option_for_resumption_e option) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1107,7 +1108,7 @@ int sound_manager_set_media_session_resumption_option(sound_session_option_for_r
  * @see sound_manager_get_media_session_option()
  * @see sound_manager_set_media_session_resumption_option()
  */
-int sound_manager_get_media_session_resumption_option(sound_session_option_for_resumption_e *option);
+int sound_manager_get_media_session_resumption_option(sound_session_option_for_resumption_e *option) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1126,7 +1127,7 @@ int sound_manager_get_media_session_resumption_option(sound_session_option_for_r
  * @see sound_manager_get_session_type()
  * @see sound_manager_get_voip_session_mode()
 */
-int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode);
+int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1145,7 +1146,7 @@ int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode);
  * @see sound_manager_get_session_type()
  * @see sound_manager_set_voip_session_mode()
 */
-int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode);
+int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0. Use sound_manager_create_stream_information() instead.
@@ -1162,7 +1163,7 @@ int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode);
  * @see sound_manager_unset_session_interrupted_cb()
  * @see sound_session_interrupted_cb()
  */
-int sound_manager_set_session_interrupted_cb(sound_session_interrupted_cb callback, void *user_data);
+int sound_manager_set_session_interrupted_cb(sound_session_interrupted_cb callback, void *user_data) TIZEN_DEPRECATED_API;
 
 /**
  * @deprecated Deprecated since 3.0.
@@ -1174,7 +1175,7 @@ int sound_manager_set_session_interrupted_cb(sound_session_interrupted_cb callba
  * @retval #SOUND_MANAGER_ERROR_INTERNAL Internal error inside the sound system
  * @see sound_manager_set_session_interrupted_cb()
  */
-int sound_manager_unset_session_interrupted_cb(void);
+int sound_manager_unset_session_interrupted_cb(void) TIZEN_DEPRECATED_API;
 
 /**
  * @}
index 9756204..99de805 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.3.66
+Version:    0.3.67
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index e2a31eb..4cc48b1 100644 (file)
@@ -95,6 +95,7 @@ int sound_manager_set_current_sound_type(sound_type_e type)
 {
        int ret = MM_ERROR_NONE;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
        if (type >= SOUND_TYPE_NUM || type < 0)
                return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
 
@@ -132,6 +133,7 @@ int sound_manager_unset_current_sound_type(void)
 {
        int ret = MM_ERROR_NONE;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
        ret = mm_sound_volume_primary_type_set(VOLUME_TYPE_UNKNOWN);
 
        return _convert_sound_manager_error_code(__func__, ret);
@@ -610,6 +612,7 @@ int sound_manager_set_session_type(sound_session_type_e type)
        int new_session = MM_SESSION_TYPE_MEDIA;
        bool mic_enable = false;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter : type=%d", type);
 
        if (type < SOUND_SESSION_TYPE_MEDIA || type >  SOUND_SESSION_TYPE_VOIP)
@@ -702,6 +705,7 @@ int sound_manager_get_session_type(sound_session_type_e *type)
        int ret = MM_ERROR_NONE;
        int cur_session;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
        if (type == NULL)
                return _convert_sound_manager_error_code(__func__, MM_ERROR_INVALID_ARGUMENT);
 
@@ -755,6 +759,7 @@ int sound_manager_set_media_session_option(sound_session_option_for_starting_e s
        int session_option = 0;
        int updated = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter : option for starting=%d, for during play=%d", s_option, d_option);
 
        if (s_option < 0 || s_option >  SOUND_SESSION_OPTION_PAUSE_OTHERS_WHEN_START)
@@ -836,6 +841,7 @@ int sound_manager_get_media_session_option(sound_session_option_for_starting_e *
        int session = 0;
        int session_options = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter");
 
        if (s_option == NULL || d_option == NULL)
@@ -879,6 +885,7 @@ int sound_manager_set_media_session_resumption_option(sound_session_option_for_r
        int session_option = 0;
        int updated = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter : option for resumption=%d (0:by system, 1:by system or media paused)", option);
 
        if (option < SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM || option > SOUND_SESSION_OPTION_RESUMPTION_BY_SYSTEM_OR_MEDIA_PAUSED)
@@ -937,6 +944,7 @@ int sound_manager_get_media_session_resumption_option(sound_session_option_for_r
        int session = 0;
        int session_options = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter");
 
        if (option == NULL)
@@ -975,6 +983,7 @@ int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode)
        int session = 0;
        int session_options = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        LOGI(">> enter : mode=%d", mode);
 
        ret = mm_session_get_current_information(&session, &session_options);
@@ -1005,6 +1014,7 @@ int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode)
        int session = 0;
        int session_options = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        if (mode == NULL) {
                LOGE("mode is null");
                ret = MM_ERROR_INVALID_ARGUMENT;
@@ -1035,6 +1045,7 @@ int sound_manager_set_session_interrupted_cb(sound_session_interrupted_cb callba
        int ret = MM_ERROR_NONE;
        unsigned int subs_id = 0;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use sound_manager_create_stream_information() instead.", __func__);
        SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&g_interrupt_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
 
        if (callback == NULL) {
@@ -1073,6 +1084,7 @@ int sound_manager_unset_session_interrupted_cb(void)
 {
        int ret = MM_ERROR_NONE;
 
+       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release.", __func__);
        SM_ENTER_CRITICAL_SECTION_WITH_RETURN(&g_interrupt_cb_mutex, SOUND_MANAGER_ERROR_INTERNAL);
 
        if (!g_session_interrupt_cb_table.user_cb) {