+++ /dev/null
-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
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})
)
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)
Version: @VERSION@
Requires: @PC_REQUIRED@
Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
-
+Cflags: -I${includedir}
+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.
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
*/
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
*
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}
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
}
}
+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);