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 [new file with mode: 0755]
doc/wave_player_doc.h [deleted file]
include/wav_player.h
packaging/capi-media-wav-player.spec
src/wav_player.c
test/wav_player_test.c

diff --git a/doc/wav_player_doc.h b/doc/wav_player_doc.h
new file mode 100755 (executable)
index 0000000..6a04c2f
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License. 
+ */
+
+
+#ifndef __TIZEN_MEDIA_WAV_PLAYER_DOC_H__
+#define __TIZEN_MEDIA_WAV_PLAYER_DOC_H__
+
+
+/**
+ * @file wave_player_doc.h
+ * @brief This file contains high level documentation for the WAV Player API.
+ *
+ */
+
+/**
+ * @ingroup CAPI_MEDIA_FRAMEWORK
+ * @defgroup CAPI_MEDIA_WAV_PLAYER_MODULE WAV Player
+ */
+
+/**
+ * @ingroup CAPI_MEDIA_FRAMEWORK
+ * @addtogroup CAPI_MEDIA_WAV_PLAYER_MODULE
+ * @brief The @ref CAPI_MEDIA_WAV_PLAYER_MODULE API provides functions for playing the waveform audio file format(*.wav).
+  * @section CAPI_MEDIA_WAV_PLAYER_MODULE_HEADER Required Header
+ *    \#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 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.
+ */
+
+#endif /* __TIZEN_MEDIA_WAV_PLAYER_DOC_H__ */
+
+
diff --git a/doc/wave_player_doc.h b/doc/wave_player_doc.h
deleted file mode 100755 (executable)
index 3660786..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License. 
- */
-
-
-#ifndef __TIZEN_MEDIA_WAV_PLAYER_DOC_H__
-#define __TIZEN_MEDIA_WAV_PLAYER_DOC_H__
-
-
-/**
- * @file wave_player_doc.h
- * @brief This file contains high level documentation for the WAV Player API.
- *
- */
-
-/**
- * @ingroup CAPI_MEDIA_FRAMEWORK
- * @defgroup CAPI_MEDIA_WAV_PLAYER_MODULE WAV Player
- */
-
-/**
- * @ingroup CAPI_MEDIA_FRAMEWORK
- * @addtogroup CAPI_MEDIA_WAV_PLAYER_MODULE
- * @brief The @ref CAPI_MEDIA_WAV_PLAYER_MODULE API provides functions for playing the waveform audio file format(*.wav).
-  * @section CAPI_MEDIA_WAV_PLAYER_MODULE_HEADER Required Header
- *    \#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. 
- * When playing a wav file is finished, wav_player_playback_completed_cb() will be invoked.
- */
-
-#endif /* __TIZEN_MEDIA_WAV_PLAYER_DOC_H__ */
-
-
index e407f4082818207bf9bfd4ff161989a8d8ecd442..6d1adbabbfb0d129d24eca5ac5e2706d6df6b086 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 019f1a2834c47f86fe411ae64baa47bd79c4e652..4ddd87bb38850c200b8e789e536d0c5418859e81 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 5ef75291da8e923519ac53a2834e106f62fed8cf..45dc42d3d5eb145f2e5d0a0d837843a181698625 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 4732d11fc3f6b459dc5eaf6d0b701664397e81c1..522139cf48310cccc4f8d38d1000e736a9c2e06e 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;