From: HyungKyu Song Date: Thu, 14 Feb 2013 13:08:29 +0000 (+0900) Subject: Tizen 2.0 Release X-Git-Tag: 2.0_release X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2F2.0_release;p=sdk%2Femulator-plugin-proxi.git Tizen 2.0 Release --- diff --git a/AUTHORS b/AUTHORS index 8acdf13..1722483 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,12 @@ -DongKyun Yun -Sungmin Ha +YeongKyoon Lee +DaiYoung Kim +SeokYeon Hwang +SangJin Kim +KiTae Kim +JinHyung Jo +SungMin Ha +MunKyu Im +JiHye Kim +GiWoong Kim +SooYoung Ha HyunGoo Kang diff --git a/CMakeLists.txt b/CMakeLists.txt index c9696bb..1e0578a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ MESSAGE("add -DTARGET") #add_definitions(-D_ESTIMATE_PERFORMANCE) #add_definitions(-D_DEFAULT_FONT_NAME="Vera") add_definitions(-Wall -O3 -omit-frame-pointer) -add_definitions(-Wall -g -D_DEBUG) +#add_definitions(-Wall -g -D_DEBUG) add_definitions(-Iinclude) add_library(${PROJECT_NAME} SHARED diff --git a/debian/changelog b/debian/changelog index f84a8a6..307abb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,69 +1,37 @@ -sf-plugin-proxi-emul (0.2.2) unstable; urgency=low - - * modified for build only i386 - - -- Sungmin Ha Sat, 18 Feb 2012 13:06:52 +0900 - -sf-plugin-proxi-emul (0.2.1) unstable; urgency=low - - -- Sungmin Ha Fri, 10 Feb 2012 14:00:00 +0900 - -sf-plugin-proxi-sim (0.1.2-2) unstable; urgency=low - - * some prevent-checking-bug fix (CID 14034 , 14033) - * Git:165.213.180.234:/git/slp/pkgs/sf-plugin-proxi-sim - * Tag:sf-plugin-proxi-sim_0.1.2-2 - - -- Yong-sul Oh Wed, 15 Sep 2010 18:44:53 +0900 +sf-plugin-proxi-emul (0.2.5) unstable; urgency=low -sf-plugin-proxi-sim (0.1.2-1) unstable; urgency=low + * modified get_struct_value for support OSP + * Git: slp/pkgs/e/emulator-plugin-proxi + * Tag: sf-plugin-proxi-emul_0.2.5 - * change get_struct_value() & get_property() - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-proxi-sim-0 - * Tag:sf-plugin-proxi-sim_0.1.2-1 + -- Sungmin Ha Mon, 25 Jun 2012 18:11:00 +0900 - -- Yong-sul Oh Tue, 15 Jun 2010 10:05:06 +0900 +sf-plugin-proxi-emul (0.2.4) unstable; urgency=low -sf-plugin-proxi-sim (0.1.1-1) unstable; urgency=low + * modified for get_struct_value bug fix + * Git: slp/pkgs/e/emulator-plugin-proxi + * Tag: sf-plugin-proxi-emul_0.2.4 - * change for new libslp-sensor APIs - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-proxi-sim-0 - * Tag:sf-plugin-proxi-sim_0.1.1-1 + -- Sungmin Ha Thu, 19 Apr 2012 18:00:00 +0900 - -- Yong-sul Oh Mon, 31 May 2010 01:23:20 +0900 +sf-plugin-proxi-emul (0.2.3) unstable; urgency=low -sf-plugin-proxi-sim (0.0.4-2) unstable; urgency=low + * modified for support updated libslp-sensor + * Git: slp/pkgs/e/emulator-plugin-proxi + * Tag: sf-plugin-proxi-emul_0.2.3 - * DAC rule changed - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-proxi-sim-0 - * Tag:sf-plugin-proxi-sim_0.0.4-2 + -- Jihye kim Fri, 6 Apr 2012 20:00:00 +0900 - -- Yong-sul Oh Mon, 10 May 2010 21:06:32 +0900 - -sf-plugin-proxi-sim (0.0.4-1) unstable; urgency=low - - * add {pkg_name}.postinst.in for permission control & add free() codes when it's class constructor returned with error - * Git:165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-proxi-sim-0 - * Tag:sf-plugin-proxi-sim_0.0.4-1 - - -- Yong-sul Oh Tue, 20 Apr 2010 13:16:52 +0900 - -sf-plugin-proxi-sim (0.0.3-1) unstable; urgency=low - - * add real-device checking routine (return NULL when a real-device does not exist) - * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/sf-plugin-proxi-sim-0 - * Tag: sf-plugin-proxi-sim_0.0.3-1 - - -- Yong-sul Oh Mon, 05 Apr 2010 13:57:18 +0900 - -sf-plugin-proxi-sim (0.0.2-1) unstable; urgency=low +sf-plugin-proxi-emul (0.2.2) unstable; urgency=low - * double-execute updating bug-fix & toolchain upgrade + * Update changelog version. + * Git: slp/pkgs/e/emulator-plugin-proxi + * Tag: sf-plugin-proxi-emul_0.2.2 - -- Yong-sul Oh Fri, 19 Mar 2010 14:31:15 +0900 + -- Kitae kim Thu, 27 Mar 2012 20:00:00 +0900 -sf-plugin-proxi-sim (0.0.1-1) unstable; urgency=low +sf-plugin-proxi-emul (0.2.1) unstable; urgency=low * Initial Release. - -- Yong-sul Oh Fri, 19 Feb 2010 21:34:27 +0900 + -- Sungmin Ha Thu, 15 Mar 2012 17:00:00 +0900s diff --git a/debian/control b/debian/control index b98e3b1..897cdb0 100644 --- a/debian/control +++ b/debian/control @@ -1,9 +1,9 @@ Source: sf-plugin-proxi-emul Section: misc Priority: extra -Maintainer: Sungmin ha +Maintainer:Sungmin ha ,Jihye Kim ,Yeongkyoon Lee Build-Depends: libsf-common-dev -Standards-Version: 0.2.1 +Standards-Version: 0.2.5 Package: sf-plugin-proxi-emul Section: misc diff --git a/debian/copyright b/debian/copyright index b6c081a..8b13789 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,21 +1 @@ -This is sf-plugin-gp2ap002proxi, written and maintained by Yongsul Oh -on Mon, 30 Nov 2009 16:09:50 +0900. -The original source can always be found at: - ftp://slp.samsung.net/dists/unstable/main/source/ - -Copyright Holder: $NAME - -License: - samsung - -/* - * Copyright (c) 2008 Samsung Electronics, Inc. - * All rights reserved. - * - * This software is a confidential and proprietary information - * of Samsung Electronics, Inc. ("Confidential Information"). You - * shall not disclose such Confidential Information and shall use - * it only in accordance with the terms of the license agreement - * you entered into with Samsung Electronics. - */ diff --git a/include/cproxi_sim.h b/include/cproxi_sim.h index f51592a..f4e0314 100644 --- a/include/cproxi_sim.h +++ b/include/cproxi_sim.h @@ -3,7 +3,9 @@ * * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * - * Contact: Sungmin Ha + * Contact: + * SooYoung Ha + * Sungmin Ha * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the @@ -30,6 +32,11 @@ public: PROXIMITY_DISTANCE_DATA_SET = (0x0008 << 16) | 0x0002 }; + enum proxi_sim_state_event_t { + PROXIMITY_STATE_FAR = 0, + PROXIMITY_STATE_NEAR = 1, + }; + enum cproxi_sim_cmd_property_t { PROPERTY_CMD_START = 0, PROPERTY_CMD_1, diff --git a/packaging/sf-plugin-proxi-emul.manifest b/packaging/sf-plugin-proxi-emul.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/sf-plugin-proxi-emul.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/sf-plugin-proxi-emul.spec b/packaging/sf-plugin-proxi-emul.spec new file mode 100644 index 0000000..e6d3133 --- /dev/null +++ b/packaging/sf-plugin-proxi-emul.spec @@ -0,0 +1,46 @@ +#git:/slp/pkgs/e/emulator-plugin-proxi +Name: sf-plugin-proxi-emul +Version: 0.2.6 +Release: 1 +Summary: GP2AP002 proximity Plugin for sensor framework +Group: System Environment/Libraries +License: GNUv2 +Source0: %{name}-%{version}.tar.gz +Source1001: packaging/sf-plugin-proxi-emul.manifest +BuildRequires: cmake +BuildRequires: pkgconfig(sf_common) + +%description + +%prep +%setup -q + +%build +export LDFLAGS+="-Wl,--rpath=%{_prefix}/lib -Wl,--as-needed" + +LDFLAGS="$LDFLAGS" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} + +make + +%install +rm -rf %{buildroot} +%make_install + +%clean +make clean +rm -rf CMakeCache.txt +rm -rf CMakeFiles +rm -rf cmake_install.cmake +rm -rf Makefile +rm -rf install_manifes.txt +rm -rf *.so + +%post + +%postun + +%files +%defattr(-,root,root,-) +%{_prefix}/lib/sensor_framework/*.so* + +%changelog diff --git a/src/cproxi_sim.cpp b/src/cproxi_sim.cpp index 61124e5..73be293 100644 --- a/src/cproxi_sim.cpp +++ b/src/cproxi_sim.cpp @@ -4,6 +4,7 @@ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: + * SooYoung Ha * Sungmin Ha * DongKyun Yun * @@ -54,6 +55,9 @@ #define DISTANCE_LIMIT 8 +#define SENSOR_NAME "Emul_ModelId_Proximity" +#define SENSOR_VENDOR "Emul_Vendor" + const char *cproxi_sim::m_port[] = {"vo","enable"}; cproxi_sim::cproxi_sim() @@ -466,23 +470,29 @@ long cproxi_sim::set_cmd(int type , int property , long input_value) int cproxi_sim::get_property(unsigned int property_level , void *property_data) { -#ifdef TARGET - if ( (property_level & 0xFFFF) == 1 ) { - base_property_struct *return_property; - return_property = (base_property_struct *)property_data; - return_property->sensor_unit_idx = IDX_UNIT_STATE_ON_OFF; - return_property->sensor_min_range = 0.; - return_property->sensor_max_range = 1.; - return_property->sensor_resolution = 1.; - return 0; - - } else { - ERR("Doesnot support property_level : %d\n",property_level); - return -1; - } -#endif - - return -1; + base_property_struct *return_property; + return_property = (base_property_struct *)property_data; + + if ( (property_level & 0xFFFF) == 1 ) { + base_property_struct *return_property; + return_property = (base_property_struct *)property_data; + return_property->sensor_unit_idx = IDX_UNIT_STATE_ON_OFF; + return_property->sensor_min_range = 0.; + return_property->sensor_max_range = 1.; + return_property->sensor_resolution = 1.; + snprintf(return_property->sensor_name, sizeof(return_property->sensor_name), SENSOR_NAME ); + snprintf(return_property->sensor_vendor, sizeof(return_property->sensor_vendor), SENSOR_VENDOR); + return 0; + } else if ( (property_level & 0xFFFF) == 2 ) { + return_property->sensor_unit_idx = IDX_UNIT_CENTIMETER; + return_property->sensor_min_range = 0; + return_property->sensor_max_range = 8; + return_property->sensor_resolution = 1; + return 0; + } else { + ERR("Doesnot support property_level : %d\n",property_level); + return -1; + } } int cproxi_sim::get_struct_value(unsigned int struct_type , void *struct_values) @@ -497,7 +507,10 @@ int cproxi_sim::get_struct_value(unsigned int struct_type , void *struct_values) return_struct_value->data_unit_idx = IDX_UNIT_STATE_ON_OFF; return_struct_value->time_stamp = m_fired_time ; return_struct_value->values_num = 1; - return_struct_value->values[0] = m_vo; + if(m_vo == 0) + return_struct_value->values[0] = PROXIMITY_STATE_FAR; + else + return_struct_value->values[0] = PROXIMITY_STATE_NEAR; return 0; } else {