Remove 3.0 deprecated API 79/160279/5 submit/tizen/20180227.071248
authorSeungbae Shin <seungbae.shin@samsung.com>
Wed, 15 Nov 2017 07:55:47 +0000 (16:55 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 26 Jan 2018 10:32:52 +0000 (19:32 +0900)
Please refer following deprecation policy.

https://developer.tizen.org/development/training/native-application/understanding-tizen-programming/api-versioning-and-deprecation-policy-tizen-platform

[Version] 0.2.0
[Issue Type] Deprecation

Change-Id: I12ca26e413963ee98ec1c0c904a06cdf8f860e94

doc/wav_player_doc.h [moved from doc/wave_player_doc.h with 96% similarity]
include/wav_player.h
packaging/capi-media-wav-player.spec
src/wav_player.c
test/wav_player_test.c

similarity index 96%
rename from doc/wave_player_doc.h
rename to doc/wav_player_doc.h
index 3660786..6a04c2f 100755 (executable)
@@ -38,7 +38,7 @@
  *    \#include <wav_player.h>
  *
  * @section CAPI_MEDIA_WAV_PLAYER_OVERVIEW Overview
- * The @ref CAPI_MEDIA_WAV_PLAYER_MODULE API allows you to simply play and stop a wav file. To play a certain wav file, call wave_player_start() with a path to the .wav file. 
+ * The @ref CAPI_MEDIA_WAV_PLAYER_MODULE API allows you to simply play and stop a wav file. To play a certain wav file, call wav_player_start_new() with a path to the .wav file. 
  * When playing a wav file is finished, wav_player_playback_completed_cb() will be invoked.
  */
 
index e407f40..6d1adba 100644 (file)
@@ -68,38 +68,10 @@ typedef enum {
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  * @param[in] id       The completed wav player ID
  * @param[in] user_data        The user data passed from the callback registration function
- * @see wav_player_start()
+ * @see wav_player_start_new()
  */
 typedef void (*wav_player_playback_completed_cb)(int id, void *user_data);
 
-
-/**
- * @deprecated Deprecated since 3.0. Use wav_player_start_new() instead.
- * @brief Plays a WAV file.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @remarks Sound can be mixed with other sounds if you don't control the sound session in sound-manager module since 3.0.\n
- *     You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE.
- *
- * @param[in] path     The file path to play
- * @param[in] type     The sound type
- * @param[in] callback The callback function to invoke when a WAV file is finished playing
- * @param[in] user_data        The user data to be passed to the callback function
- * @param[out] id      The WAV player ID ( can be set to NULL )
- *
- * @return @c 0 on success,
- *         otherwise a negative error value
- * @retval #WAV_PLAYER_ERROR_NONE Successful
- * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
- * @retval #WAV_PLAYER_ERROR_FORMAT_NOT_SUPPORTED Not supported format
- *
- * @post       It invokes wav_player_playback_completed_cb() when a WAV file has finished playing.
- * @see wav_player_stop()
- * @see wav_player_playback_completed_cb()
- */
-int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb callback, void *user_data, int *id) TIZEN_DEPRECATED_API;
-
 /**
  * @brief Plays a WAV file with stream information of sound-manager.
  * @since_tizen 3.0
@@ -138,7 +110,7 @@ int wav_player_start_new(const char *path, sound_stream_info_h stream_info, wav_
  * @retval #WAV_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #WAV_PLAYER_ERROR_INVALID_OPERATION Invalid operation
  *
- * @see        wav_player_start()
+ * @see        wav_player_start_new()
  */
 int wav_player_stop(int id);
 
index 019f1a2..4ddd87b 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-wav-player
 Summary:    A wav player library in Tizen C API
-Version:    0.1.26
+Version:    0.2.0
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 5ef7529..45dc42d 100755 (executable)
 #include "wav_player.h"
 #include "wav_player_private.h"
 
-#define DEPRECATED_WARN_INSTEAD(msg) do { \
-       LOGW("DEPRECATION WARNING: %s() is deprecated and will be removed from next release. Use %s() instead.", __func__, msg); \
-} while (0)
-
-int wav_player_start(const char *path, sound_type_e type, wav_player_playback_completed_cb cb, void *user_data,  int *id)
-{
-       int ret = MM_ERROR_NONE;
-       int player = -1;
-       char m_path[PATH_MAX];
-       void (*_completed_cb)(void *, int);
-       _completed_cb = NULL;
-       _cb_data *cb_data = NULL;
-
-       DEPRECATED_WARN_INSTEAD("wav_player_start_new");
-
-       if (path == NULL)
-               return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
-
-       if (type >= SOUND_TYPE_NUM)
-               return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
-
-       m_path[0] = '\0';
-       if (path[0] != '/') {
-               if (getcwd(m_path, PATH_MAX) != NULL)
-                       strncat(m_path, "/", PATH_MAX - strlen(m_path) - 1);
-       }
-       strncat(m_path, path, PATH_MAX - strlen(m_path) - 1);
-
-       if (cb) {
-               _completed_cb = _internal_complete_cb;
-               cb_data = (_cb_data *)malloc(sizeof(_cb_data));
-               if (cb_data == NULL)
-                       return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_OPERATION);
-               cb_data->cb = cb;
-               cb_data->user_data = user_data;
-       }
-
-       ret = mm_sound_play_sound(m_path, type, _completed_cb , cb_data, &player);
-       if (ret == 0 && id != NULL)
-               *id = player;
-
-       if (ret != 0 && cb_data != NULL)
-               free(cb_data);
-
-       return _convert_wav_player_error_code(__func__, ret);
-}
-
 int wav_player_start_new(const char *path, sound_stream_info_h stream_info, wav_player_playback_completed_cb callback, void *user_data, int *id)
 {
        return _start_with_stream_info(path, stream_info, 1, callback, user_data, id);
index 4732d11..522139c 100644 (file)
@@ -97,7 +97,7 @@ void wav_play_test(const char* file_path, int iterate, int stream_type)
 
        printf("Play Wav, File Path : %s, Iterate : %d\n", file_path, iterate);
        ret = wav_player_start_loop(file_path, stream_info, iterate, _player_stop_cb, (void*)stream_info, &gid);
-       printf("wav_player_start(id=%d) ret = %d\n", gid, ret);
+       printf("wav_player_start_loop(id=%d) ret = %d\n", gid, ret);
        if (ret) {
                sound_manager_destroy_stream_information(stream_info);
                return;