upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:58:33 +0000 (16:58 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:58:33 +0000 (16:58 +0900)
CMakeLists.txt
capi-system-info.pc.in [changed mode: 0644->0755]
debian/changelog
debian/control
include/system_info.h
include/system_info_private.h
packaging/capi-system-info.spec [changed mode: 0644->0755]
src/system_info.c
src/system_info_network.c
src/system_info_platform.c

index ea19261..007e9b8 100755 (executable)
@@ -10,10 +10,11 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 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)
@@ -51,7 +52,7 @@ INSTALL(
         )
 
 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)
 
old mode 100644 (file)
new mode 100755 (executable)
index f758dbd..d0610b9
@@ -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 f4089f6..289593f 100755 (executable)
@@ -1,3 +1,20 @@
+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
index 061960c..ee18cd0 100755 (executable)
@@ -3,16 +3,16 @@ Source: capi-system-info
 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
index 7a3b2bf..ebf584b 100755 (executable)
@@ -60,7 +60,8 @@ typedef enum {
        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;
 
 /**
index a9ce27a..f2ae1a3 100755 (executable)
@@ -48,6 +48,7 @@ int system_info_get_screen_height(system_info_key_e key, system_info_data_type_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
 }
old mode 100644 (file)
new mode 100755 (executable)
index 4223b23..e7717ed
@@ -1,16 +1,18 @@
 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
 
@@ -31,9 +33,8 @@ Requires: %{name} = %{version}-%{release}
 
 
 %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}
@@ -48,10 +49,11 @@ rm -rf %{buildroot}
 
 
 %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
 
 
index d7fab7f..1ce72fb 100755 (executable)
@@ -156,6 +156,13 @@ system_info_s system_info_table[] = {
 },
 
 {
+        /**< 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
 }
 
index 0c9b461..7a563f5 100755 (executable)
@@ -14,7 +14,6 @@
  * limitations under the License. 
  */
 
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -22,6 +21,9 @@
 #include <vconf.h>
 #include <dlog.h>
 
+#include <TapiCommon.h>
+#include <ITapiMisc.h>
+
 #include <system_info.h>
 #include <system_info_private.h>
 
@@ -48,3 +50,27 @@ int system_info_get_network_type(system_info_key_e key, system_info_data_type_e
        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;
+}
+
index 9cabd70..7862d32 100755 (executable)
@@ -36,7 +36,7 @@
 
 #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"