tone-player : Change APIs based on Tizen 2.3 52/33952/6 tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common accepted/tizen/common/20150122.095545 accepted/tizen/mobile/20150123.091439 accepted/tizen/tv/20150123.004445 accepted/tizen/wearable/20150122.104136 submit/tizen/20150115.120604 submit/tizen/20150122.071700
authordh8210.kim <dh8210.kim@samsung.com>
Mon, 19 Jan 2015 05:27:40 +0000 (14:27 +0900)
committerdh8210.kim <dh8210.kim@samsung.com>
Mon, 19 Jan 2015 06:43:10 +0000 (15:43 +0900)
Signed-off-by: dh8210.kim <dh8210.kim@samsung.com>
Change-Id: I2d183477a3c816c4f7409485aedd57a730d36102

AUTHORS
CMakeLists.txt
doc/tone_player_doc.h [new file with mode: 0755]
include/tone_player.h [changed mode: 0644->0755]
packaging/capi-media-tone-player.spec
src/tone_player.c

diff --git a/AUTHORS b/AUTHORS
index d123f55..7678990 100755 (executable)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,2 @@
-JongHyuk Choi <jhchoi.choi at samsung dot com>
-YoungHun Kim <yh8004.kim at samsung dot com>
+Seungbae Shin <seungbae.shin at samsung dot com>
+DooHwan Kim <dh8210.kim at samsung dot com>
index 92b6ab8..8c37f5e 100755 (executable)
@@ -44,7 +44,7 @@ FOREACH(flag ${${fw_name}_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 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")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 
 IF("${ARCH}" MATCHES "^arm.*")
diff --git a/doc/tone_player_doc.h b/doc/tone_player_doc.h
new file mode 100755 (executable)
index 0000000..2655858
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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_TONE_PLAYER_DOC_H__
+#define __TIZEN_MEDIA_TONE_PLAYER_DOC_H__
+
+
+/**
+ * @file tone_player_doc.h
+ * @brief This file contains high level documentation for the Tone Player API.
+ *
+ */
+
+/**
+ * @ingroup CAPI_MEDIA_FRAMEWORK
+ * @defgroup CAPI_MEDIA_TONE_PLAYER_MODULE Tone Player
+ */
+
+/**
+ * @ingroup CAPI_MEDIA_FRAMEWORK
+ * @addtogroup CAPI_MEDIA_TONE_PLAYER_MODULE
+ * @brief The @ref CAPI_MEDIA_TONE_PLAYER_MODULE API provides functions for playing the tone.
+  * @section CAPI_MEDIA_TONE_PLAYER_MODULE_HEADER Required Header
+ *    \#include <tone_player.h>
+ *
+ * @section CAPI_MEDIA_TONE_PLAYER_OVERVIEW Overview
+ * The @ref CAPI_MEDIA_TONE_PLAYER_MODULE API allows you to play and stop playing the tone. To play a particular type of tone(#tone_type_e), use tone_player_start(). To stop playing the tone, call tone_player_stop().
+ */
+
+#endif /* __TIZEN_MEDIA_TONE_PLAYER_DOC_H__ */
+
old mode 100644 (file)
new mode 100755 (executable)
index 21031b6..6089933
@@ -162,8 +162,10 @@ typedef enum
        TONE_TYPE_CDMA_CALLDROP_LITE,     /**< CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms */
        TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT,   /**< CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF. */
        TONE_TYPE_CDMA_ABBR_ALERT,      /**< CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON */
-       TONE_TYPE_CDMA_SIGNAL_OFF    /**< CDMA_SIGNAL_OFF - silent tone */
-       
+       TONE_TYPE_CDMA_SIGNAL_OFF,    /**< CDMA_SIGNAL_OFF - silent tone */
+       TONE_TYPE_USER_DEFINED_LOW_FRE,                    /**< User Defined Tone: 100Hz continuous */
+       TONE_TYPE_USER_DEFINED_MED_FRE,                    /**< User Defined Tone: 200Hz continuous */
+       TONE_TYPE_USER_DEFINED_HIGH_FRE                   /**< User Defined Tone: 300Hz continuous */
 } tone_type_e;
 
 
index 69d4188..1b0b46c 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-tone-player
 Summary:    A tone player library in Tizen C API
-Version:    0.1.0
+Version:    0.1.1
 Release:    16
 Group:      Multimedia/API
 License:    Apache-2.0
index b258f6c..8447e30 100755 (executable)
@@ -49,25 +49,25 @@ static int __convert_tone_player_error_code(const char *func, int code){
                        ret = TONE_PLAYER_ERROR_INVALID_OPERATION;
                        errorstr = "INVALID_OPERATION";
                        break;
-       }       
+       }
        LOGE( "[%s] %s(0x%08x) : core frameworks error code(0x%08x)",func, errorstr, ret, code);
        return ret;
 }
 
-
 int tone_player_start(tone_type_e tone, sound_type_e type, int duration, int *id){
-       int ret;
-       int player;
-       if( tone < TONE_TYPE_DEFAULT || tone > TONE_TYPE_CDMA_SIGNAL_OFF )
-               return __convert_tone_player_error_code(__func__, TONE_PLAYER_ERROR_INVALID_PARAMETER);
-       
-       ret = mm_sound_play_tone(tone, type , 1, duration, &player);
+        int ret;
+        int player;
+        if( tone < TONE_TYPE_DEFAULT || tone > TONE_TYPE_USER_DEFINED_HIGH_FRE )
+                return __convert_tone_player_error_code(__func__, TONE_PLAYER_ERROR_INVALID_PARAMETER);
+
+        ret = mm_sound_play_tone(tone, type , 1, duration, &player);
 
-       if( ret == 0 && id != NULL)
-               *id = player;           
-       return __convert_tone_player_error_code(__func__, ret);
+        if( ret == 0 && id != NULL)
+                *id = player;
+        return __convert_tone_player_error_code(__func__, ret);
 }
 
+
 int tone_player_stop(int id){
        return __convert_tone_player_error_code(__func__, mm_sound_stop_sound(id));
 }