SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-SET(dependents "dlog capi-base-common vconf iniparser x11")
+SET(requires "dlog capi-base-common vconf iniparser x11 tapi")
+SET(pc_requires "capi-base-common")
INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${dependents})
+pkg_check_modules(${fw_name} REQUIRED ${requires})
FOREACH(flag ${${fw_name}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
)
SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${dependents})
+SET(PC_REQUIRED ${pc_requires})
SET(PC_LDFLAGS -l${fw_name})
SET(PC_CFLAGS -I\${includedir}/system)
Version: @VERSION@
Requires: @PC_REQUIRED@
Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
+Cflags: -I${includedir}
+capi-system-info (0.1.0-12) unstable; urgency=low
+
+ * Updated Tizen version
+ * Git: api/system-info
+ * Tag: capi-system-info_0.1.0-12
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Mon, 19 Mar 2012 19:25:53 +0900
+
+capi-system-info (0.1.0-11) unstable; urgency=low
+
+ * Updated build configuration
+ * Added SYSTEM_INFO_KEY_MOBILE_DEVICE_ID
+ * Git: api/system-info
+ * Tag: capi-system-info_0.1.0-11
+
+ -- Junghyuk Park <junghyuk.park@samsung.com> Thu, 15 Mar 2012 11:41:29 +0900
+
capi-system-info (0.1.0-9) unstable; urgency=low
* Updated tizen version
Section: libs
Priority: extra
Maintainer: Woongsuk Cho <ws77.cho@samsung.com>, Kyuhun Jung <kyuhun.jung@samsung.com>
-Build-Depends: debhelper (>= 5), dlog-dev, capi-base-common-dev, libvconf-dev, iniparser-dev, libx11-dev
+Build-Depends: debhelper (>= 5), dlog-dev, capi-base-common-dev, libvconf-dev, iniparser-dev, libx11-dev, libslp-tapi-dev
Package: capi-system-info
Architecture: any
-Depends: ${shilbs:Depends}, ${misc:Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
Description: A System Information library in Tizen Native API
Package: capi-system-info-dev
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, capi-system-info (= ${Source-Version}), dlog-dev, capi-base-common-dev, libvconf-dev, iniparser-dev, libx11-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}, capi-system-info (= ${Source-Version}), capi-base-common-dev
Description: A System Information library in Tizen Native API (DEV)
Package: capi-system-info-dbg
SYSTEM_INFO_KEY_SCREEN_HEIGHT, /**< The height of the screen in pixels */
SYSTEM_INFO_KEY_SCREEN_WIDTH, /**< The width of the screen in pixels */
SYSTEM_INFO_KEY_TVOUT_SUPPORTED, /**< Indicates whether the device supports TV-out */
- SYSTEM_INFO_KEY_WIFI_SUPPORTED /**< Indicates whether the device supports Wi-Fi */
+ SYSTEM_INFO_KEY_WIFI_SUPPORTED, /**< Indicates whether the device supports Wi-Fi */
+ SYSTEM_INFO_KEY_MOBILE_DEVICE_ID, /**< The unique ID to identify GSM, UMTS and CDMA mobile devices */
} system_info_key_e;
/**
int system_info_get_screen_width(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_tvout_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_wifi_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
+int system_info_get_mobile_device_id(system_info_key_e key, system_info_data_type_e data_type, void **value);
#ifdef __cplusplus
}
Name: capi-system-info
Summary: A System Information library in Tizen Native API
Version: 0.1.0
-Release: 1
+Release: 12
Group: TO_BE/FILLED_IN
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(iniparser)
-BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(iniparser)
+BuildRequires: pkgconfig(x11)
+BuildRequires: pkgconfig(tapi)
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%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}
%files
-%{_libdir}/libcapi-system-info.so*
+%{_libdir}/libcapi-system-info.so.*
%files devel
%{_includedir}/system/system_info.h
%{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-system-info.so
},
{
+ /**< The unique ID to identify GSM, and UMTS mobile devices */
+ SYSTEM_INFO_KEY_MOBILE_DEVICE_ID,
+ SYSTEM_INFO_DATA_TYPE_STRING,
+ system_info_get_mobile_device_id
+},
+
+{
SYSTEM_INFO_MAX, -1, NULL
}
* limitations under the License.
*/
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vconf.h>
#include <dlog.h>
+#include <TapiCommon.h>
+#include <ITapiMisc.h>
+
#include <system_info.h>
#include <system_info_private.h>
return SYSTEM_INFO_ERROR_NONE;
}
+int system_info_get_mobile_device_id(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ TelMiscSNInformation imei = {0,};
+
+ if (tel_init() != TAPI_API_SUCCESS)
+ {
+ LOGE("[%s] IO_ERROR(0x%08x)", __FUNCTION__, SYSTEM_INFO_ERROR_IO_ERROR);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ }
+
+ if (tel_get_misc_me_sn(TAPI_MISC_ME_IMEI, &imei) != TAPI_API_SUCCESS)
+ {
+ tel_deinit();
+ LOGE("[%s] IO_ERROR(0x%08x)", __FUNCTION__, SYSTEM_INFO_ERROR_IO_ERROR);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ }
+
+ *value = strdup((char*)imei.szNumber);
+
+ tel_deinit();
+
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
#define LOG_TAG "TIZEN_N_SYSTEM_INFO"
-#define TIZEN_VERSION "Beta"
+#define TIZEN_VERSION "1.0"
#define DEVICE_MODEL "SDK"
#define LIB_GLES_V1 "/usr/lib/libGLESv1_CM.so"
#define LIB_GLES_V2 "/usr/lib/libGLESv2.so"