upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:58:32 +0000 (16:58 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:58:32 +0000 (16:58 +0900)
.gitignore [deleted file]
CMakeLists.txt
capi-media-sound-manager.pc.in
debian/control
include/sound_manager.h
packaging/capi-media-sound-manager.spec
src/sound_manager.c

diff --git a/.gitignore b/.gitignore
deleted file mode 100755 (executable)
index f884ceb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-CMakeCache.txt
-*/CMakeFiles/*
-*.cmake
-CMakeFiles*
-*.a
-*.so
-Testing
-cmake.depends
-cmake.check_depends
-cmake.check_cache
-core
-core.*
-gmon.out
-install_manifest.txt
-*~
-.kdev_include_paths
-src.kdev4
-.cproject
-.project
-tet_captured
-tet_lock
-*.pc
-*-test
-*-test_*
-*tester.c
-TC/config
index 9bf2444..09a0ed6 100755 (executable)
@@ -25,6 +25,7 @@ SET(submodule "sound-manager")
 
 # for package file
 SET(dependents "mm-sound dlog capi-base-common mm-session")
+SET(pc_dependents "capi-base-common")
 
 # for deb
 SET(deb_dependents "libdlog-0 libmm-sound-0")
@@ -80,9 +81,8 @@ INSTALL(
         )
 
 SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${dependents})
+SET(PC_REQUIRED ${pc_dependents})
 SET(PC_LDFLAGS -l${fw_name})
-SET(PC_CFLAGS -I\${includedir}/${service})
 
 CONFIGURE_FILE(
     ${fw_name}.pc.in
index 773d667..5d02f8d 100755 (executable)
@@ -11,5 +11,5 @@ Description: @PACKAGE_DESCRIPTION@
 Version: @VERSION@
 Requires: @PC_REQUIRED@ 
 Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
+Cflags: -I${includedir}
 
index aa0019d..7e86f64 100755 (executable)
@@ -7,12 +7,12 @@ Build-Depends: debhelper (>= 5), libmm-sound-dev , capi-base-common-dev , dlog-d
 
 Package: capi-media-sound-manager
 Architecture: any
-Depends: ${shilbs:Depends}, ${misc:Depends} , libmm-sound-0, libmm-session-0
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: A Sound Manager library in Tizen Native API
 
 Package: capi-media-sound-manager-dev
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, capi-media-sound-manager (= ${Source-Version}), dlog-dev, capi-base-common-dev, libmm-sound-dev, libmm-session-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, capi-media-sound-manager (= ${Source-Version}), capi-base-common-dev
 Description: A Sound Manager library in Tizen Native API (DEV)
 
 Package: capi-media-sound-manager-dbg
index e048c69..630929e 100755 (executable)
@@ -11,7 +11,7 @@
 * 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. 
+* limitations under the License.
 */
 
 
@@ -52,6 +52,19 @@ typedef enum
     SOUND_TYPE_CALL,            /**< Sound type for call */
 } sound_type_e;
 
+/**
+ * @brief Enumerations of volume key type
+ */
+typedef enum
+{
+    VOLUME_KEY_TYPE_NONE=-1,          /**< Volume key type for current played sound */
+    VOLUME_KEY_TYPE_SYSTEM=0,          /**< Volume key type for system sound */
+    VOLUME_KEY_TYPE_NOTIFICATION,    /**< Volume key type for notifications sound*/
+    VOLUME_KEY_TYPE_ALARM,           /**< Volume key type for alarm sound */
+    VOLUME_KEY_TYPE_RINGTONE,        /**< Volume key type for ringtones sound */
+    VOLUME_KEY_TYPE_MEDIA,           /**< Volume key type for media sound */
+    VOLUME_KEY_TYPE_CALL,            /**< Volume key type for call sound */
+} volume_key_type_e;
 
 /**
  * @brief Enumerations of sound route policy
@@ -251,22 +264,22 @@ void sound_manager_unset_route_policy_changed_cb(void);
 /**
  * @brief Gets the A2DP activation information.
  * @remarks If @a connected is @c true,  @a bt_name must be released with free() by you. If @a connected is @c false, @a bt_name is set to NULL.
- * @param[out] connected The Bluetooth A2DP connection status (@c true = connected, @c false = disconnected) 
+ * @param[out] connected The Bluetooth A2DP connection status (@c true = connected, @c false = disconnected)
  * @param[out] bt_name The Bluetooth A2DP connected device name
  * @return 0 on success, otherwise a negative error value.
  * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter 
- * @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation  
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SOUND_MANAGER_ERROR_INVALID_OPERATION Invalid operation
  */
 int sound_manager_get_a2dp_status(bool *connected, char **bt_name);
 
 
-/** 
+/**
  * @brief Sets the application's sound session type
  * @param[in] type The session type to set
  * @return 0 on success, otherwise a negative error value.
  * @retval #SOUND_MANAGER_ERROR_NONE Success
- * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter 
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
  */
 int sound_manager_set_session_type(sound_session_type_e type);
 
@@ -278,7 +291,7 @@ int sound_manager_set_session_type(sound_session_type_e type);
  * @retval #SOUND_MANAGER_ERROR_NONE Success
  * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
  * @post  sound_session_notify_cb() will be invoked
- * @see sound_manager_unset_session_notify_cb() 
+ * @see sound_manager_unset_session_notify_cb()
  * @see sound_session_notify_cb()
  */
 int sound_manager_set_session_notify_cb(sound_session_notify_cb callback, void *user_data);
@@ -289,6 +302,14 @@ int sound_manager_set_session_notify_cb(sound_session_notify_cb callback, void *
  */
 void sound_manager_unset_session_notify_cb(void);
 
+/**
+ * @brief Sets the volume key type
+ * @param[in] type The volume key type to set
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #SOUND_MANAGER_ERROR_NONE Success
+ * @retval #SOUND_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int sound_manager_set_volume_key_type(volume_key_type_e type);
 
 
 /**
index f646f82..bba5fa2 100755 (executable)
@@ -1,7 +1,7 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
 Version:    0.1.0
-Release:    1.1
+Release:    8
 Group:      TO_BE/FILLED_IN
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
@@ -29,9 +29,9 @@ A Sound Manager library in Tizen Native API (DEV)
 
 
 %build
-FULLVER=%{version}
-MAJORVER=`echo ${FULLVER} | cut -d '.' -f 1`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+
 
 make %{?jobs:-j%jobs}
 
@@ -45,10 +45,11 @@ rm -rf %{buildroot}
 
 
 %files
-%{_libdir}/libcapi-media-sound-manager.so*
+%{_libdir}/libcapi-media-sound-manager.so.*
 
 %files devel
 %{_includedir}/media/sound_manager.h
 %{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-media-sound-manager.so
 
 
index 1999079..9179195 100755 (executable)
@@ -283,3 +283,16 @@ void sound_manager_unset_session_notify_cb(void){
        g_session_notify_cb_table.user_data  = NULL;
 }
 
+
+int sound_manager_set_volume_key_type(volume_key_type_e type){
+       if( type < VOLUME_KEY_TYPE_NONE || type > VOLUME_KEY_TYPE_CALL )
+               return __convert_sound_manager_error_code(__func__, SOUND_MANAGER_ERROR_INVALID_PARAMETER);
+       int ret;
+       if( type == VOLUME_KEY_TYPE_NONE )
+               ret = mm_sound_volume_primary_type_clear();
+       else
+               ret = mm_sound_volume_primary_type_set(type);
+
+       return __convert_sound_manager_error_code(__func__, ret);
+}
+