remove TEMP_COMMENT_UNTIL_MM_SOUND_READY 77/42977/3 accepted/tizen/mobile/20150707.003548 accepted/tizen/tv/20150707.003607 accepted/tizen/wearable/20150707.003612 submit/tizen/20150706.130343
authorSeungbae Shin <seungbae.shin@samsung.com>
Mon, 6 Jul 2015 12:28:45 +0000 (21:28 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Mon, 6 Jul 2015 13:01:20 +0000 (22:01 +0900)
Change-Id: I01cd0d28afc2b19f3d201b30d4e038b26265e045

CMakeLists.txt
packaging/capi-media-sound-manager.spec
src/sound_manager.c
src/sound_manager_private.c

index bc278ab1e81bacc3d91f55cfe32f08b60cdb76f8..05a3d0aa66ce084d9e78ad89bf8ce670befbefe5 100755 (executable)
@@ -48,7 +48,7 @@ FOREACH(flag ${${fw_name}_CFLAGS})
 ENDFOREACH(flag)
 
 #SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -DTEMP_COMMENT_UNTIL_MM_SOUND_READY")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 
 IF("${ARCH}" STREQUAL "arm")
index e73d23084e3fe5796a50e08725752f93dde6573b..4bbbf9c97718e74f40f9a173fc4aa573c006aa72 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.2.27
+Version:    0.2.28
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 4f28ca8f0450465e7c97177359154519a37741ce..ca805e5a3434f6f26a2884e939a45172ecd1f250 100755 (executable)
@@ -113,21 +113,20 @@ int sound_manager_unset_current_sound_type(void)
 int sound_manager_set_volume_changed_cb(sound_manager_volume_changed_cb callback, void* user_data)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
+
        ret = mm_sound_add_volume_changed_callback((mm_sound_volume_changed_cb)callback, user_data);
        if (ret == MM_ERROR_NONE) {
                g_volume_changed_cb_table.user_cb = (sound_manager_volume_changed_cb)callback;
                g_volume_changed_cb_table.user_data = user_data;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_unset_volume_changed_cb(void)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
+
        if (g_volume_changed_cb_table.user_cb) {
                ret = mm_sound_remove_volume_changed_callback();
                if (ret == MM_ERROR_NONE) {
@@ -138,14 +137,12 @@ int sound_manager_unset_volume_changed_cb(void)
                ret = MM_ERROR_SOUND_INTERNAL;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_set_session_type(sound_session_type_e type)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int cur_session = -1;
        int new_session = MM_SESSION_TYPE_MEDIA;
 
@@ -216,14 +213,12 @@ int sound_manager_set_session_type(sound_session_type_e type)
        }
        LOGI("<< leave : type=%d, ret=0x%x", type, ret);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_session_type(sound_session_type_e *type)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int cur_session;
 
        if( type == NULL )
@@ -262,14 +257,12 @@ int sound_manager_get_session_type(sound_session_type_e *type)
 
        LOGI("returns : type=%d, ret=0x%x", *type, ret);
 
-#endif
        return 0;
 }
 
 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 ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_option = 0;
        int updated = 0;
@@ -344,14 +337,12 @@ int sound_manager_set_media_session_option(sound_session_option_for_starting_e s
                LOGI("<< leave : already set same option(%x), skip it", session_option);
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 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 ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_options = 0;
 
@@ -387,14 +378,12 @@ int sound_manager_get_media_session_option(sound_session_option_for_starting_e *
 
        LOGI("<< leave : option for starting=%d, for during play=%d", *s_option, *d_option);
 
-#endif
        return SOUND_MANAGER_ERROR_NONE;
 }
 
 int sound_manager_set_media_session_resumption_option(sound_session_option_for_resumption_e option)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_option = 0;
        int updated = 0;
@@ -446,14 +435,12 @@ int sound_manager_set_media_session_resumption_option(sound_session_option_for_r
                LOGI("<< leave : already set same option(%x), skip it", session_option);
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_media_session_resumption_option(sound_session_option_for_resumption_e *option)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_options = 0;
 
@@ -483,14 +470,12 @@ int sound_manager_get_media_session_resumption_option(sound_session_option_for_r
 
        LOGI("<< leave : option for resumption=%d (0:by system, 1:by system or media paused)", *option);
 
-#endif
        return SOUND_MANAGER_ERROR_NONE;
 }
 
 int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_options = 0;
 
@@ -598,14 +583,12 @@ int sound_manager_set_voip_session_mode(sound_session_voip_mode_e mode)
 
        LOGI("<< leave : session=%p, mode=%d, ret=0x%x", session, mode, ret);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        int session = 0;
        int session_options = 0;
        int subsession = 0;
@@ -676,7 +659,6 @@ int sound_manager_get_voip_session_mode(sound_session_voip_mode_e *mode)
 
        LOGI("returns : session=%p, mode=%d, ret=0x%x", session, *mode, ret);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
@@ -713,101 +695,82 @@ int sound_manager_unset_session_interrupted_cb(void)
 int sound_manager_get_current_device_list(sound_device_mask_e device_mask, sound_device_list_h *device_list)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_current_device_list((mm_sound_device_flags_e)device_mask, device_list);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_next_device (sound_device_list_h device_list, sound_device_h *device)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_next_device(device_list, device);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_prev_device (sound_device_list_h device_list, sound_device_h *device)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_prev_device(device_list, device);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_device_type (sound_device_h device, sound_device_type_e *type)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_device_type(device, (mm_sound_device_type_e*)type);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_device_io_direction (sound_device_h device, sound_device_io_direction_e *io_direction)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_device_io_direction(device, (mm_sound_device_io_direction_e*)io_direction);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_device_id (sound_device_h device, int *id)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_device_id(device, id);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_device_name (sound_device_h device, char **name)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_device_name(device, name);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_get_device_state (sound_device_h device, sound_device_state_e *state)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_get_device_state(device, (mm_sound_device_state_e*)state);
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_set_device_connected_cb (sound_device_mask_e device_mask, sound_device_connected_cb callback, void *user_data)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_add_device_connected_callback((mm_sound_device_flags_e)device_mask, (mm_sound_device_connected_cb)callback, user_data);
        if (ret == MM_ERROR_NONE) {
                g_device_connected_cb_table.user_cb = (sound_device_connected_cb)callback;
                g_device_connected_cb_table.user_data = user_data;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_unset_device_connected_cb (void)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        if (g_device_connected_cb_table.user_cb) {
                ret = mm_sound_remove_device_connected_callback();
                if (ret == MM_ERROR_NONE) {
@@ -818,28 +781,24 @@ int sound_manager_unset_device_connected_cb (void)
                ret = MM_ERROR_SOUND_INTERNAL;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_set_device_information_changed_cb (sound_device_mask_e device_mask, sound_device_information_changed_cb callback, void *user_data)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        ret = mm_sound_add_device_information_changed_callback((mm_sound_device_flags_e)device_mask, (mm_sound_device_info_changed_cb)callback, user_data);
        if (ret == MM_ERROR_NONE) {
                g_device_info_changed_cb_table.user_cb = (sound_device_information_changed_cb)callback;
                g_device_info_changed_cb_table.user_data = user_data;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
 int sound_manager_unset_device_information_changed_cb (void)
 {
        int ret = MM_ERROR_NONE;
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
        if (g_device_info_changed_cb_table.user_cb) {
                ret = mm_sound_remove_device_information_changed_callback();
                if (ret == MM_ERROR_NONE) {
@@ -850,7 +809,6 @@ int sound_manager_unset_device_information_changed_cb (void)
                ret = MM_ERROR_SOUND_INTERNAL;
        }
 
-#endif
        return __convert_sound_manager_error_code(__func__, ret);
 }
 
index fc5f2cecc6eb00bf7860a05728d9894ea415b5ad..7a8f15a269dce4293f350c8c7ac8a37191b1c780 100644 (file)
@@ -76,7 +76,6 @@ void __session_interrupt_cb(session_msg_t msg, session_event_t event, void *user
                if( msg == MM_SESSION_MSG_RESUME )
                        e = SOUND_SESSION_INTERRUPTED_COMPLETED;
                else{
-#ifndef TEMP_COMMENT_UNTIL_MM_SOUND_READY
                        switch(event){
                                case MM_SESSION_EVENT_MEDIA :
                                        e = SOUND_SESSION_INTERRUPTED_BY_MEDIA;
@@ -103,7 +102,6 @@ void __session_interrupt_cb(session_msg_t msg, session_event_t event, void *user
                                        e = SOUND_SESSION_INTERRUPTED_BY_MEDIA;
                                        break;
                        }
-#endif
                }
                g_session_interrupt_cb_table.user_cb(e, g_session_interrupt_cb_table.user_data);
        }