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

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index a6d8f19..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
-Makefile
-*-test
-*-test_*
-*tester.c
old mode 100755 (executable)
new mode 100644 (file)
index 4bfc169..c99f3ec
@@ -11,6 +11,7 @@ SET(INC_DIR include)
 INCLUDE_DIRECTORIES(${INC_DIR})
 
 SET(dependents "dlog mm-radio capi-base-common")
+SET(pc_dependents "capi-base-common")
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(${fw_name} REQUIRED ${dependents})
@@ -51,7 +52,7 @@ 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}/media)
 
index 773d6677f6b38f6b94729b6fdce7465563546818..a77de18f84aef8275256647efccbd690c7a2132b 100644 (file)
@@ -11,5 +11,4 @@ Description: @PACKAGE_DESCRIPTION@
 Version: @VERSION@
 Requires: @PC_REQUIRED@ 
 Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
-
+Cflags: -I${includedir}
index 65611fcb56fa54d09dacd0fc3e455fc6f59f9c36..0c078a972cd1109b6315c36977c89cb3ce62683c 100644 (file)
@@ -1,3 +1,9 @@
+capi-media-radio (0.1.0-8) unstable; urgency=low
+
+  * Support to get signal strength 
+
+ -- Kangho Hur <kangho.hur@samsung.com>  Mon, 19 Mar 2012 17:44:22 +0900
+
 capi-media-radio (0.1.0-7) unstable; urgency=low
 
   * Use 'static' to local function which is limited to the current source file. 
index dca3075f8570a30118698d6c8267bcbba7662d7c..e5523d9e1eff3c69d6ecda528e71229522197a66 100644 (file)
@@ -7,12 +7,12 @@ Build-Depends: debhelper (>= 5), dlog-dev, libmm-radio-dev, capi-base-common-dev
 
 Package: capi-media-radio
 Architecture: any
-Depends: ${shilbs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: A Radio library in Tizen Native API
 
 Package: capi-media-radio-dev
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, capi-media-radio (= ${Source-Version}), dlog-dev, libmm-radio-dev, capi-base-common-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, capi-media-radio (= ${Source-Version}), capi-base-common-dev
 Description: A Radio library in Tizen Native API (DEV)
 
 Package: capi-media-radio-dbg
old mode 100755 (executable)
new mode 100644 (file)
index 4a0462b..57dfaa6
@@ -244,6 +244,17 @@ int radio_set_frequency(radio_h radio, int frequency);
  */
 int radio_get_frequency(radio_h radio, int *frequency);
 
+/**
+ * @brief Gets the current signal strength of radio.
+ * @param[in]   radio The handle to radio
+ * @param[out]  strength The current signal strength [0 ~ 65535] (dbuV)
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #RADIO_ERROR_NONE Successful
+ * @retval #RADIO_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #RADIO_ERROR_INVALID_OPERATION Invalid operation
+ */
+int radio_get_signal_strength(radio_h radio, int *strength);
+
 /**
  * @brief Starts scanning radio signals, asynchronously
  *
index cf67b0caf52190ce65a0df1ed8288e9a46a1a116..1d56ff69f7da47f85fa0920cae26b67777114d42 100644 (file)
@@ -1,35 +1,36 @@
 Name:       capi-media-radio
 Summary:    A Radio library in Tizen Native API
 Version:    0.1.0
-Release:    1.1
+Release:    8
 Group:      TO_BE/FILLED_IN
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
-BuildRequires:  cmake
+BuildRequires:  pkgconfig(dbus-glib-1)
 BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(mm-radio)
 BuildRequires:  pkgconfig(capi-base-common)
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
+BuildRequires:  cmake
+BuildRequires:  gettext-devel
 
 %description
+A Radio library in Tizen Native API
 
 
-%package devel
-Summary:  A Radio library in Tizen Native API (Development)
-Group:    TO_BE/FILLED_IN
-Requires: %{name} = %{version}-%{release}
+%package devel 
+Summary:    A Radio library in Tizen Native API (Developement)
+Group:      TO_BE_FILLED 
+Requires:   %{name} = %{version}-%{release}
 
 %description devel
+A Radio library in Tizen Native API (Developement)
 
 %prep
 %setup -q
 
-
 %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}
@@ -38,16 +39,17 @@ make %{?jobs:-j%jobs}
 rm -rf %{buildroot}
 %make_install
 
-%post -p /sbin/ldconfig
+%post
 
-%postun -p /sbin/ldconfig
+%postun
 
 
 %files
-%{_libdir}/libcapi-media-radio.so*
-
-%files devel
-%{_includedir}/media/*.h
-%{_libdir}/pkgconfig/*.pc
-
-
+%defattr(-,root,root,-)
+/usr/lib/libcapi-media-radio.so.*
+
+%files devel 
+%defattr(-,root,root,-)
+/usr/include/media/radio.h
+/usr/lib/pkgconfig/capi-media-radio.pc
+/usr/lib/libcapi-media-radio.so
index 9e4fe0202e2a60205033b81fd3c9e2f53add38ba..4b085b30effd2b4e9d165d78c9538d6385096b1d 100644 (file)
@@ -405,6 +405,24 @@ int radio_get_frequency(radio_h radio, int *frequency)
        }
 }      
 
+int radio_get_signal_strength(radio_h radio, int *strength)
+{
+       RADIO_INSTANCE_CHECK(radio);
+       radio_s * handle = (radio_s *) radio;
+
+       int _strength;
+       int ret = mm_radio_get_signal_strength(handle->mm_handle, &_strength);
+       if(ret != MM_ERROR_NONE)
+       {
+               return __convert_error_code(ret,(char*)__FUNCTION__);
+       }
+       else
+       {
+               *strength = _strength;
+               return RADIO_ERROR_NONE;
+       }
+}
+
 int radio_scan_start(radio_h radio, radio_scan_updated_cb callback, void *user_data)
 {
        RADIO_INSTANCE_CHECK(radio);