diff options
author | Sergey Pisarchik <pisarchik@mapswithme.com> | 2014-05-09 11:09:31 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:15:23 +0300 |
commit | a29feb454b74a0bfe89c17aba990eeb9f21ee6f9 (patch) | |
tree | eb342e31633be1acbdc6d0e1d9e02c62f909ece5 /tizen/MapsWithMe | |
parent | abb43bd61afa3d374fe159e498f672aa57998dd2 (diff) |
[Tizen] Add GPS location
Diffstat (limited to 'tizen/MapsWithMe')
-rw-r--r-- | tizen/MapsWithMe/.cproject | 208 | ||||
-rw-r--r-- | tizen/MapsWithMe/inc/MapsWithMeForm.hpp | 16 | ||||
-rw-r--r-- | tizen/MapsWithMe/manifest.xml | 2 | ||||
-rw-r--r-- | tizen/MapsWithMe/src/MapsWithMeForm.cpp | 167 |
4 files changed, 345 insertions, 48 deletions
diff --git a/tizen/MapsWithMe/.cproject b/tizen/MapsWithMe/.cproject index d8f15e26bc..5db0752fee 100644 --- a/tizen/MapsWithMe/.cproject +++ b/tizen/MapsWithMe/.cproject @@ -5,6 +5,9 @@ <storageModule moduleId="org.eclipse.cdt.core.settings"> <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733"> <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733" moduleId="org.eclipse.cdt.core.settings" name="Debug"> + <macros> + <stringMacro name="omim_lib_incude" type="VALUE_TEXT" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug"/> + </macros> <externalSettings/> <extensions> <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> @@ -126,25 +129,25 @@ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/> </option> <option id="gnu.cpp.link.option.userobjs.1909778618" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libmap.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libsearch.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libgui.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libgraphics.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libstorage.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libanim.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libplatform.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libindexer.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libgeometry.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libcoding.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libbase.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libexpat.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libfreetype.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libfribidi.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libzlib.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libbzip2.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libjansson.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libtomcrypt.a"/> - <listOptionValue builtIn="false" value="/Users/Sergey/GitHub/omim-tizen-emulator-debug/out/debug/libprotobuf.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libmap.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libsearch.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgui.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgraphics.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libstorage.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libanim.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libplatform.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libindexer.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgeometry.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libcoding.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libbase.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libexpat.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libfreetype.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libfribidi.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libzlib.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libbzip2.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libjansson.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libtomcrypt.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libprotobuf.a"/> </option> <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2034360714" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> @@ -451,6 +454,173 @@ </storageModule> <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> </cconfiguration> + <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733.970161470"> + <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733.970161470" moduleId="org.eclipse.cdt.core.settings" name="Debug-Device"> + <macros> + <stringMacro name="omim_lib_incude" type="VALUE_TEXT" value="/Users/Sergey/GitHub/omim-tizen-device-debug"/> + </macros> + <externalSettings/> + <extensions> + <extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/> + <extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.MakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + <extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> + </extensions> + </storageModule> + <storageModule moduleId="cdtBuildSystem" version="4.0.0"> + <configuration artifactExtension="exe" artifactName="MapsWithMe" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733.970161470" name="Debug-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug"> + <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.1818098733.970161470." name="/" resourcePath=""> + <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.785840277" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug"> + <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.1480337301" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/> + <builder autoBuildTarget="all" buildPath="${workspace_loc:/MapsWithMe/Debug}" enableAutoBuild="true" id="org.tizen.nativecpp.target.sbi.gnu.builder.84661065" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Tizen Application Builder" superClass="org.tizen.nativecpp.target.sbi.gnu.builder"/> + <tool id="org.tizen.nativecpp.tool.sbi.gnu.archiver.913739191" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/> + <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.583992374" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler"> + <option id="gnu.cpp.compiler.option.optimization.level.934481145" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/> + <option id="sbi.gnu.cpp.compiler.option.debugging.level.1676655801" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/> + <option id="sbi.gnu.cpp.compiler.option.debug.applog.1272680591" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog" value="true" valueType="boolean"/> + <option id="sbi.gnu.cpp.compiler.option.1446268964" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs"> + <listOptionValue builtIn="false" value="tizen-device-2.2.native_llvm31.armel.cpp.app"/> + </option> + <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.519938769" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp" valueType="includePath"> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""/Users/Sergey/tizen-sdk/library""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/> + </option> + <option id="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp.993274757" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList"> + <listOptionValue builtIn="false" value="-target arm-tizen-linux-gnueabi -gcc-toolchain /Users/Sergey/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.5/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Wno-gnu"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + </option> + <option id="gnu.cpp.compiler.option.include.paths.799705233" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + <listOptionValue builtIn="false" value=""/> + </option> + <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.790958047" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs"> + <listOptionValue builtIn="false" value="osp"/> + </option> + <option id="gnu.cpp.compiler.option.preprocessor.def.641054435" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="_DEBUG"/> + <listOptionValue builtIn="false" value="OMIM_OS_TIZEN"/> + </option> + <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1954615253" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/> + </tool> + <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1226701349" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler"> + <option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.1393629303" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/> + <option id="sbi.gnu.c.compiler.option.debugging.level.770435936" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/> + <option id="sbi.gnu.c.compiler.option.debug.applog.1170737379" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog" value="true" valueType="boolean"/> + <option id="sbi.gnu.c.compiler.option.348779124" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs"> + <listOptionValue builtIn="false" value="tizen-device-2.2.native_llvm31.armel.cpp.app"/> + </option> + <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1165844680" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.cpp" valueType="includePath"> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> + <listOptionValue builtIn="false" value=""/Users/Sergey/tizen-sdk/library""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/osp""/> + </option> + <option id="sbi.gnu.c.compiler.option.frameworks_cflags.cpp.1905530392" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList"> + <listOptionValue builtIn="false" value="-target arm-tizen-linux-gnueabi -gcc-toolchain /Users/Sergey/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.5/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Wno-gnu"/> + <listOptionValue builtIn="false" value=" -fPIE"/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + </option> + <option id="gnu.c.compiler.option.include.paths.1871406794" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/> + </option> + <option id="sbi.gnu.c.compiler.option.frameworks.cpp.473226395" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs"> + <listOptionValue builtIn="false" value="osp"/> + </option> + <option id="gnu.c.compiler.option.preprocessor.def.symbols.196015330" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"> + <listOptionValue builtIn="false" value="_DEBUG"/> + </option> + <inputType id="sbi.gnu.c.compiler.tizen.inputType.1898434336" superClass="sbi.gnu.c.compiler.tizen.inputType"/> + </tool> + <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1328189064" name="C Linker" superClass="org.tizen.nativeide.tool.sbi.gnu.c.linker.base"/> + <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.1240965066" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker"> + <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.525293019" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList"> + <listOptionValue builtIn="false" value="-target arm-tizen-linux-gnueabi -gcc-toolchain /Users/Sergey/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.5/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Xlinker --as-needed"/> + <listOptionValue builtIn="false" value="-pie -lpthread "/> + <listOptionValue builtIn="false" value="-Xlinker -rpath="/opt/usr/apps/3BMaQARPoL/lib""/> + <listOptionValue builtIn="false" value="-Xlinker -rpath="/home/developer/sdk_tools/lib""/> + <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/> + <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib""/> + <listOptionValue builtIn="false" value="-L"${SBI_SYSROOT}/usr/lib/osp""/> + <listOptionValue builtIn="false" value="-losp-uifw"/> + <listOptionValue builtIn="false" value="-losp-appfw"/> + <listOptionValue builtIn="false" value="-losp-image"/> + <listOptionValue builtIn="false" value="-losp-json"/> + <listOptionValue builtIn="false" value="-losp-ime"/> + <listOptionValue builtIn="false" value="-losp-net"/> + <listOptionValue builtIn="false" value="-lpthread"/> + <listOptionValue builtIn="false" value="-losp-content"/> + <listOptionValue builtIn="false" value="-losp-locations"/> + <listOptionValue builtIn="false" value="-losp-telephony"/> + <listOptionValue builtIn="false" value="-losp-uix"/> + <listOptionValue builtIn="false" value="-losp-media"/> + <listOptionValue builtIn="false" value="-losp-messaging"/> + <listOptionValue builtIn="false" value="-losp-web"/> + <listOptionValue builtIn="false" value="-losp-social"/> + <listOptionValue builtIn="false" value="-losp-wifi"/> + <listOptionValue builtIn="false" value="-losp-bluetooth"/> + <listOptionValue builtIn="false" value="-losp-nfc"/> + <listOptionValue builtIn="false" value="-losp-face"/> + <listOptionValue builtIn="false" value="-losp-secure-element"/> + <listOptionValue builtIn="false" value="-losp-speech-tts"/> + <listOptionValue builtIn="false" value="-losp-shell"/> + <listOptionValue builtIn="false" value="-losp-shell-core"/> + <listOptionValue builtIn="false" value="-losp-speech-stt"/> + <listOptionValue builtIn="false" value="-losp-vision"/> + <listOptionValue builtIn="false" value="-lxml2"/> + <listOptionValue builtIn="false" value="-lalut"/> + <listOptionValue builtIn="false" value="-lopenal"/> + </option> + <option id="gnu.cpp.link.option.paths.1326793146" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths"> + <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/> + </option> + <option id="gnu.cpp.link.option.userobjs.1805860960" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs"> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libmap.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libsearch.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgui.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgraphics.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libstorage.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libanim.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libplatform.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libindexer.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libgeometry.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libcoding.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libbase.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libexpat.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libfreetype.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libfribidi.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libzlib.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libbzip2.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libjansson.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libtomcrypt.a"/> + <listOptionValue builtIn="false" value="${omim_lib_incude}/out/debug/libprotobuf.a"/> + </option> + <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1371814287" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input"> + <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/> + <additionalInput kind="additionalinput" paths="$(LIBS)"/> + </inputType> + </tool> + <tool command="arm-linux-gnueabi-as" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1573648782" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base"> + <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1097547114" superClass="cdt.managedbuild.tool.gnu.assembler.input"/> + </tool> + <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1957281032" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/> + <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1766501604" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/> + </toolChain> + </folderInfo> + <sourceEntries> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/> + <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/> + </sourceEntries> + </configuration> + </storageModule> + <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> + </cconfiguration> </storageModule> <storageModule moduleId="cdtBuildSystem" version="4.0.0"> <project id="MapsWithMe.org.tizen.nativecpp.target.sbi.gcc45.app.415202690" name="Tizen Application" projectType="org.tizen.nativecpp.target.sbi.gcc45.app"/> diff --git a/tizen/MapsWithMe/inc/MapsWithMeForm.hpp b/tizen/MapsWithMe/inc/MapsWithMeForm.hpp index ec057ad6de..b351a0131e 100644 --- a/tizen/MapsWithMe/inc/MapsWithMeForm.hpp +++ b/tizen/MapsWithMe/inc/MapsWithMeForm.hpp @@ -2,6 +2,7 @@ #include <FUi.h> #include <FUiITouchEventListener.h> +#include <FLocations.h> #include "../../../std/vector.hpp" class MapsWithMeApp; @@ -10,6 +11,7 @@ class MapsWithMeForm : public Tizen::Ui::Controls::Form , public Tizen::Ui::ITouchEventListener , public Tizen::Ui::IActionEventListener + , public Tizen::Locations::ILocationProviderListener { public: MapsWithMeForm(MapsWithMeApp* pApp); @@ -19,6 +21,7 @@ public: bool Initialize(void); virtual result OnInitializing(void); + // ITouchEventListener virtual void OnTouchFocusIn (const Tizen::Ui::Control &source, const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); @@ -35,8 +38,21 @@ public: const Tizen::Graphics::Point ¤tPosition, const Tizen::Ui::TouchEventInfo &touchInfo); + // IActionEventListener virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId); + + // ILocationProviderListener + virtual void OnLocationUpdated(const Tizen::Locations::Location& location); + virtual void OnLocationUpdateStatusChanged(Tizen::Locations::LocationServiceStatus status); + virtual void OnAccuracyChanged(Tizen::Locations::LocationAccuracy accuracy); private: + + bool m_locationEnabled; std::vector<std::pair<double, double> > m_prev_pts; + static const int ID_BUTTON = 101; + + Tizen::Locations::LocationProvider * m_pLocProvider; + Tizen::Ui::Controls::Label * m_pLabel; + Tizen::Ui::Controls::Button * m_pButton; MapsWithMeApp* m_pApp; }; diff --git a/tizen/MapsWithMe/manifest.xml b/tizen/MapsWithMe/manifest.xml index add8532982..1af8598125 100644 --- a/tizen/MapsWithMe/manifest.xml +++ b/tizen/MapsWithMe/manifest.xml @@ -10,7 +10,7 @@ <ApiVersion>2.2</ApiVersion> <Privileges> <Privilege>http://tizen.org/privilege/http</Privilege> - <Privilege>http://tizen.org/privilege/download</Privilege> + <Privilege>http://tizen.org/privilege/location</Privilege> </Privileges> <UiApp LaunchingHistoryVisible="True" Main="True" MenuIconVisible="True" Name="MapsWithMe"> <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/> diff --git a/tizen/MapsWithMe/src/MapsWithMeForm.cpp b/tizen/MapsWithMe/src/MapsWithMeForm.cpp index 4dbbf5d503..525e515021 100644 --- a/tizen/MapsWithMe/src/MapsWithMeForm.cpp +++ b/tizen/MapsWithMe/src/MapsWithMeForm.cpp @@ -3,6 +3,7 @@ #include "Framework.hpp" #include "../../../map/framework.hpp" #include "../../../gui/controller.hpp" +#include "../../../platform/tizen_string_utils.hpp" #include <FUi.h> #include <FBase.h> #include <FMedia.h> @@ -15,15 +16,24 @@ using namespace Tizen::Media; using namespace Tizen::Base; using namespace Tizen::Base::Collection; using namespace Tizen::Base::Utility; +using namespace Tizen::Locations; MapsWithMeForm::MapsWithMeForm(MapsWithMeApp* pApp) -: m_pApp(pApp) +:m_pLocProvider(0), + m_pLabel(0), + m_pButton(0), + m_pApp(pApp) { SetMultipointTouchEnabled(true); } MapsWithMeForm::~MapsWithMeForm(void) { + if (m_pLocProvider) + { + m_pLocProvider->StopLocationUpdates(); + delete m_pLocProvider; + } } bool MapsWithMeForm::Initialize(void) @@ -36,11 +46,108 @@ bool MapsWithMeForm::Initialize(void) result MapsWithMeForm::OnInitializing(void) { LOG(LDEBUG, ("MapsWithMeForm::OnInitializing")); + + int width; + int height; + GetSize(width, height); + // Create a Label + m_pLabel = new (std::nothrow) Label(); + m_pLabel->Construct(Rectangle(width / 4, 10, width *3/4, 120), L"GPS off"); + m_pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE); + m_pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT); + AddControl(m_pLabel); + // Create a Button + m_pButton = new (std::nothrow) Button(); + m_pButton->Construct(Rectangle(width - 150, height -150, 100, 100)); + m_pButton->SetText(L"GPS\noff"); + m_pButton->SetActionId(ID_BUTTON); + m_pButton->AddActionEventListener(*this); + AddControl(m_pButton); + + m_locationEnabled = false; return E_SUCCESS; } void MapsWithMeForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { + switch(actionId) + { + case ID_BUTTON: + { + ::Framework * pFramework = tizen::Framework::GetInstance(); + m_locationEnabled = !m_locationEnabled; + if (m_locationEnabled) + { + LocationCriteria criteria; +// criteria.SetAccuracy(LOC_ACCURACY_FINEST); + criteria.SetAccuracy(LOC_ACCURACY_TEN_METERS); + //criteria.SetAccuracy(LOC_ACCURACY_ANY); + m_pLocProvider = new LocationProvider(); + m_pLocProvider->Construct(criteria, *this); + int updateInterval = 1; + m_pLocProvider->StartLocationUpdatesByInterval(updateInterval); +// double distanceThreshold = 1.0; +// m_pLocProvider->StartLocationUpdatesByDistance(distanceThreshold); + m_pLabel->SetText(L"GPS ENABLED"); + m_pButton->SetText(L"GPS\nON"); + pFramework->StartLocation(); + } + else + { + m_pLocProvider->StopLocationUpdates(); + delete m_pLocProvider; + m_pLocProvider = 0; + pFramework->StopLocation(); + m_pLabel->SetText(L"GPS off"); + m_pButton->SetText(L"GPS\noff"); + } + } + break; + } + Invalidate(true); +} + +void MapsWithMeForm::OnLocationUpdated(const Tizen::Locations::Location& location) +{ + ::Framework * pFramework = tizen::Framework::GetInstance(); + location::GpsInfo info; + Coordinates const & coord = location.GetCoordinates(); + + info.m_source = location::ETizen; + long long ticks = 0; + Tizen::System::SystemTime::GetTicks(ticks); + + info.m_timestamp = ticks/1000; //!< seconds from 1st Jan 1970 + info.m_latitude = coord.GetLatitude(); //!< degrees + info.m_longitude = coord.GetLongitude(); //!< degrees + info.m_horizontalAccuracy = location.GetHorizontalAccuracy(); //!< metres + info.m_altitude = coord.GetAltitude(); //!< metres + info.m_verticalAccuracy = location.GetVerticalAccuracy(); //!< metres + info.m_course = 0; //!< positive degrees from the true North + info.m_speed = 0; + + static int count = 0; + count++; + String s = "LocationUpdated "; + s.Append(count); + s.Append("\nLat:"); + s.Append(info.m_latitude); + s.Append(" Lon:"); + s.Append(info.m_longitude); + s.Append("\nAccuracy:"); + s.Append(info.m_horizontalAccuracy); + m_pLabel->SetText(s); + pFramework->OnLocationUpdate(info); + Draw(); +} + +void MapsWithMeForm::OnLocationUpdateStatusChanged(Tizen::Locations::LocationServiceStatus status) +{ + +} +void MapsWithMeForm::OnAccuracyChanged(Tizen::Locations::LocationAccuracy accuracy) +{ + } result MapsWithMeForm::OnDraw(void) @@ -50,27 +157,27 @@ result MapsWithMeForm::OnDraw(void) namespace detail { - std::vector<std::pair<double, double> > GetTouchedPoints() +std::vector<std::pair<double, double> > GetTouchedPoints() +{ + std::vector<std::pair<double, double> > res; + IListT<TouchEventInfo *> * pList = TouchEventManager::GetInstance()->GetTouchInfoListN(); + if (pList) { - std::vector<std::pair<double, double> > res; - IListT<TouchEventInfo *> * pList = TouchEventManager::GetInstance()->GetTouchInfoListN(); - if (pList) + int count = pList->GetCount(); + for (int i = 0; i < count; ++i) { - int count = pList->GetCount(); - for (int i = 0; i < count; ++i) - { - - TouchEventInfo * pTouchInfo; - pList->GetAt(i, pTouchInfo); - Point pt = pTouchInfo->GetCurrentPosition(); - res.push_back(std::make_pair(pt.x, pt.y)); - } - pList->RemoveAll(); - delete pList; + TouchEventInfo * pTouchInfo; + pList->GetAt(i, pTouchInfo); + Point pt = pTouchInfo->GetCurrentPosition(); + res.push_back(std::make_pair(pt.x, pt.y)); } - return res; + + pList->RemoveAll(); + delete pList; } + return res; +} } void MapsWithMeForm::OnTouchPressed(const Tizen::Ui::Control& source, @@ -100,19 +207,23 @@ void MapsWithMeForm::OnTouchMoved(const Tizen::Ui::Control& source, if (!pFramework->GetGuiController()->OnTapMoved(m2::PointD(pts[0].first, pts[0].second))) { - if (pts.size() == 1) + if (pts.size() == 1 && m_prev_pts.size() > 1) + { + pFramework->StopScale(ScaleEvent(pts[0].first, pts[0].second, pts[1].first, pts[1].second)); + pFramework->StartDrag(DragEvent(pts[0].first, pts[0].second)); + } + else if (pts.size() == 1) + { pFramework->DoDrag(DragEvent(pts[0].first, pts[0].second)); + } + else if (pts.size() > 1 && m_prev_pts.size() == 1) + { + pFramework->StopDrag(DragEvent(m_prev_pts[0].first, m_prev_pts[0].second)); + pFramework->StartScale(ScaleEvent(pts[0].first, pts[0].second, pts[1].first, pts[1].second)); + } else if (pts.size() > 1) { - if (m_prev_pts.size() > 1) - { - pFramework->DoScale(ScaleEvent(pts[0].first, pts[0].second, pts[1].first, pts[1].second)); - } - else if (!m_prev_pts.empty()) - { - pFramework->StopDrag(DragEvent(m_prev_pts[0].first, m_prev_pts[0].second)); - pFramework->StartScale(ScaleEvent(pts[0].first, pts[0].second, pts[1].first, pts[1].second)); - } + pFramework->DoScale(ScaleEvent(pts[0].first, pts[0].second, pts[1].first, pts[1].second)); } } std::swap(m_prev_pts, pts); @@ -131,7 +242,7 @@ void MapsWithMeForm::OnTouchReleased(const Tizen::Ui::Control& source, if (!pFramework->GetGuiController()->OnTapEnded(m2::PointD(m_prev_pts[0].first, m_prev_pts[0].second))) { if (m_prev_pts.size() == 1) - pFramework->StopDrag(DragEvent(m_prev_pts[0].first, m_prev_pts[0].second)); + pFramework->StopDrag(DragEvent(m_prev_pts[0].first, m_prev_pts[0].second)); else if (m_prev_pts.size() > 1) pFramework->StopScale(ScaleEvent(m_prev_pts[0].first, m_prev_pts[0].second, m_prev_pts[1].first, m_prev_pts[1].second)); } |