--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?fileVersion 4.0.0?>
+
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
+ <storageModule moduleId="org.eclipse.cdt.core.settings">
+ <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.905958591">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.905958591" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Emulator">
+ <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="Call" 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.emulator.905958591" name="Debug-Tizen-Emulator" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator">
+ <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.905958591." name="/" resourcePath="">
+ <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.1637170027" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator">
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.771100885" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+ <builder autoBuildTarget="all" buildPath="${workspace_loc:/CallApp/Debug-Tizen-Emulator}" enableAutoBuild="true" id="org.tizen.nativecpp.target.sbi.gnu.builder.1673976780" 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.1194564992" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1949458252" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
+ <option id="gnu.cpp.compiler.option.optimization.level.787208976" 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.1233378155" 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.862858860" 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.1553557316" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.include.paths.1728288273" 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=""${workspace_loc:/${ProjName}/inc/SLP}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/contact}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/media}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/telephony-client}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/vconf}""/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.394899403" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1526253048" 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=""/home/amith.m/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.1312278881" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.1184472849" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_DEBUG"/>
+ </option>
+ <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1730431593" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+ </tool>
+ <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.246785327" 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.202586047" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+ <option id="sbi.gnu.c.compiler.option.debugging.level.883578246" 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.1308017770" 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.1193657309" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+ </option>
+ <option id="gnu.c.compiler.option.include.paths.2082336934" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/contact}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/media}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/telephony-client}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc/SLP/vconf}""/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks.cpp.1620207469" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1664490607" 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=""/home/amith.m/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.733263569" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.193490953" 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.10864777" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+ </tool>
+ <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.818620439" 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.1117400778" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
+ <option id="gnu.cpp.link.option.paths.1869893869" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
+ </option>
+ <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.231803493" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value="-pie -lpthread "/>
+ <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -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-appfw"/>
+ <listOptionValue builtIn="false" value="-losp-uifw"/>
+ <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-speech-tts"/>
+ <listOptionValue builtIn="false" value="-losp-speech-stt"/>
+ <listOptionValue builtIn="false" value="-losp-shell"/>
+ <listOptionValue builtIn="false" value="-losp-shell-core"/>
+ <listOptionValue builtIn="false" value="-lxml2"/>
+ </option>
+ <option id="gnu.cpp.link.option.other.323082404" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
+ <listOptionValue builtIn="false" value="--allow-shlib-undefined"/>
+ </option>
+ <option id="gnu.cpp.link.option.userobjs.396449645" name="Other objects" superClass="gnu.cpp.link.option.userobjs" valueType="userObjs">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib/libcapi-media-sound-manager.so.0}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib/libcontacts-service2.so.0}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib/libSLP-tapi.so.0}""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib/libvconf.so.0}""/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.409827423" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.285590839" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.528072965" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1194568052" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+ <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1623418551" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.512960965" name="Assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1968658934" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.1593906279" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1669813957" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry excluding="CallSpeedDialInfo.cpp|CallSpeedDialPopup.cpp" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.1055543585">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.1055543585" moduleId="org.eclipse.cdt.core.settings" name="Debug-Tizen-Device">
+ <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="${ProjName}" 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.device.1055543585" name="Debug-Tizen-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device">
+ <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.1055543585." name="/" resourcePath="">
+ <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.1160268698" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device">
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.107295385" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+ <builder buildPath="${workspace_loc:/CallApp/Debug-Tizen-Device}" id="org.tizen.nativecpp.target.sbi.gnu.builder.301466001" 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.353206832" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.1888590143" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
+ <option id="gnu.cpp.compiler.option.optimization.level.1404195025" 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.471094313" 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.2103669351" 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.1870709912" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.include.paths.197547716" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.2133659433" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1686782134" 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=""/home/amith.m/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.101069351" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.85902147" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_DEBUG"/>
+ </option>
+ <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1171648071" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+ </tool>
+ <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1221217447" 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.1587118789" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+ <option id="sbi.gnu.c.compiler.option.debugging.level.2081448129" 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.27706577" 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.696998409" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="gnu.c.compiler.option.include.paths.1409047406" 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.1831398968" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.660848859" 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=""/home/amith.m/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.18848035" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.2101466431" 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.529061887" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+ </tool>
+ <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.338872661" 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.1644896398" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
+ <option id="gnu.cpp.link.option.paths.1951829231" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
+ </option>
+ <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.1760346522" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value="-pie -lpthread "/>
+ <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -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-appfw"/>
+ <listOptionValue builtIn="false" value="-losp-uifw"/>
+ <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-speech-tts"/>
+ <listOptionValue builtIn="false" value="-losp-speech-stt"/>
+ <listOptionValue builtIn="false" value="-losp-shell"/>
+ <listOptionValue builtIn="false" value="-losp-shell-core"/>
+ <listOptionValue builtIn="false" value="-lxml2"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2071712691" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1781420582" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1214828232" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.502424773" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+ <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.200790982" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.1107980950" name="Assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2042388511" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.1289309856" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.323502650" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.release.783254993">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.release.783254993" moduleId="org.eclipse.cdt.core.settings" name="Release">
+ <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="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,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.release.783254993" name="Release" parent="org.tizen.nativecpp.config.sbi.gcc45.app.release">
+ <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.release.783254993." name="/" resourcePath="">
+ <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release.696455331" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.release">
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.28055898" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+ <builder buildPath="${workspace_loc:/CallApp/Release}" id="org.tizen.nativecpp.target.sbi.gnu.builder.1158761796" 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.1429688565" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.979505136" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler">
+ <option id="gnu.cpp.compiler.option.optimization.level.1626442371" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
+ <option id="sbi.gnu.cpp.compiler.option.debugging.level.685658768" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level"/>
+ <option id="sbi.gnu.cpp.compiler.option.debug.applog.1623496387" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.cpp.compiler.option.debug.applog"/>
+ <option id="sbi.gnu.cpp.compiler.option.913586008" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="gnu.cpp.compiler.option.include.paths.1762119318" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.502512355" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.252813421" 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=""/home/amith.m/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.1259653272" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.816790930" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+ </tool>
+ <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.46307420" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+ <option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.2040477389" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
+ <option id="sbi.gnu.c.compiler.option.debugging.level.1737924863" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level"/>
+ <option id="sbi.gnu.c.compiler.option.debug.applog.2124226089" name="Enable application logging (-D_APP_LOG)" superClass="sbi.gnu.c.compiler.option.debug.applog"/>
+ <option id="sbi.gnu.c.compiler.option.965765238" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="gnu.c.compiler.option.include.paths.1541827431" 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.834473968" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.415329611" 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=""/home/amith.m/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.1935341753" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.c.compiler.tizen.inputType.451828897" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+ </tool>
+ <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1486891423" 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.1090025540" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker">
+ <option id="gnu.cpp.link.option.paths.1820306185" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
+ </option>
+ <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.907741295" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value="-pie -lpthread "/>
+ <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -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-appfw"/>
+ <listOptionValue builtIn="false" value="-losp-uifw"/>
+ <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-speech-tts"/>
+ <listOptionValue builtIn="false" value="-losp-speech-stt"/>
+ <listOptionValue builtIn="false" value="-losp-shell"/>
+ <listOptionValue builtIn="false" value="-losp-shell-core"/>
+ <listOptionValue builtIn="false" value="-lxml2"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.217057083" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.716004531" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.186700921" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1903573405" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+ <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.704139558" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.309278500" name="Assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.847958447" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.1054920664" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.417919361" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.1778775740">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.1778775740" moduleId="org.eclipse.cdt.core.settings" name="DA-Tizen-Emulator">
+ <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="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.1778775740" name="DA-Tizen-Emulator" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da">
+ <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.1778775740." name="/" resourcePath="">
+ <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.da.1813194224" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.emulator.da">
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.120008377" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+ <builder buildPath="${workspace_loc:/CallApp/DA-Tizen-Emulator}" id="org.tizen.nativecpp.target.sbi.gnu.builder.1980162063" 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.648213436" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da.727806380" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da">
+ <option id="gnu.cpp.compiler.option.include.paths.1350053326" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.492367062" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_USE_DA_"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.566197131" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.2030430327" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.1346550982" 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=""/home/amith.m/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.1662465447" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.cpp.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1421778475" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+ </tool>
+ <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1679264312" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+ <option id="gnu.c.compiler.option.include.paths.28181787" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.946856269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_USE_DA_"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.1874875113" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-emulator-2.0.cpp.partner_llvm31.i386.cpp.app"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks.cpp.562209803" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1803891824" 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=""/home/amith.m/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.160299600" name="Tizen-Frameworks-Other-Cflags" superClass="sbi.gnu.c.compiler.option.frameworks_cflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Wno-gnu"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.c.compiler.tizen.inputType.1237281508" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+ </tool>
+ <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1881463422" 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.da.1656798140" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da">
+ <option id="gnu.cpp.link.option.libs.1610083504" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="daprobe"/>
+ </option>
+ <option id="gnu.cpp.link.option.paths.864447930" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library/da/x86""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
+ </option>
+ <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.423319544" name="Tizen-Frameworks-Other-Lflags" superClass="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp" valueType="stringList">
+ <listOptionValue builtIn="false" value="-target i386-tizen-linux-gnueabi -gcc-toolchain /home/amith.m/tizen-sdk/tools/smart-build-interface/../i386-linux-gnueabi-gcc-4.5/ -ccc-gcc-name i386-linux-gnueabi-g++ -march=i386 -Xlinker --as-needed"/>
+ <listOptionValue builtIn="false" value=""/>
+ <listOptionValue builtIn="false" value="-pie -lpthread "/>
+ <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -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-appfw"/>
+ <listOptionValue builtIn="false" value="-losp-uifw"/>
+ <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-speech-tts"/>
+ <listOptionValue builtIn="false" value="-losp-speech-stt"/>
+ <listOptionValue builtIn="false" value="-losp-shell"/>
+ <listOptionValue builtIn="false" value="-losp-shell-core"/>
+ <listOptionValue builtIn="false" value="-lxml2"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1805920259" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.220504988" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1075835287" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.1118842917" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+ <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.1963898936" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.1782586338" name="Assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.2086173771" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.187827509" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1649659715" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ <cconfiguration id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.1129331544">
+ <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.1129331544" moduleId="org.eclipse.cdt.core.settings" name="DA-Tizen-Device">
+ <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="${ProjName}" buildArtefactType="org.tizen.nativecpp.buildArtefactType.app" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.tizen.nativecpp.buildArtefactType.app" description="" id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.1129331544" name="DA-Tizen-Device" parent="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da">
+ <folderInfo id="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.1129331544." name="/" resourcePath="">
+ <toolChain id="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.da.1534434587" name="Tizen Native Toolchain" superClass="org.tizen.nativecpp.toolchain.sbi.gcc45.app.debug.device.da">
+ <targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="org.tizen.nativeide.target.sbi.gnu.platform.base.103012369" osList="linux,win32" superClass="org.tizen.nativeide.target.sbi.gnu.platform.base"/>
+ <builder buildPath="${workspace_loc:/CallApp/DA-Tizen-Device}" id="org.tizen.nativecpp.target.sbi.gnu.builder.362084938" 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.1324539664" name="Archiver" superClass="org.tizen.nativecpp.tool.sbi.gnu.archiver"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da.2125202208" name="C++ Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.compiler.da">
+ <option id="gnu.cpp.compiler.option.include.paths.489541949" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="gnu.cpp.compiler.option.preprocessor.def.334282952" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_USE_DA_"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.177217400" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks.cpp.784661053" name="Tizen-Frameworks" superClass="sbi.gnu.cpp.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.cpp.44578962" 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=""/home/amith.m/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.998763036" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.cpp.compiler.tizen.inputType.1495759171" superClass="sbi.gnu.cpp.compiler.tizen.inputType"/>
+ </tool>
+ <tool command="clang" id="org.tizen.nativecpp.tool.sbi.gnu.c.compiler.1787640438" name="C Compiler" superClass="org.tizen.nativecpp.tool.sbi.gnu.c.compiler">
+ <option id="gnu.c.compiler.option.include.paths.1624938008" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/inc}""/>
+ </option>
+ <option id="gnu.c.compiler.option.preprocessor.def.symbols.1148760634" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+ <listOptionValue builtIn="false" value="_USE_DA_"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.36167305" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" valueType="userObjs">
+ <listOptionValue builtIn="false" value="tizen-device-2.0.cpp.partner_llvm31.armel.cpp.app"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks.cpp.685667338" name="Tizen-Frameworks" superClass="sbi.gnu.c.compiler.option.frameworks.cpp" valueType="userObjs">
+ <listOptionValue builtIn="false" value="osp"/>
+ </option>
+ <option id="sbi.gnu.c.compiler.option.frameworks_inc.cpp.1893907815" 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=""/home/amith.m/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.402345665" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value=" -fPIE"/>
+ <listOptionValue builtIn="false" value="--sysroot="${SBI_SYSROOT}""/>
+ </option>
+ <inputType id="sbi.gnu.c.compiler.tizen.inputType.1814504607" superClass="sbi.gnu.c.compiler.tizen.inputType"/>
+ </tool>
+ <tool id="org.tizen.nativeide.tool.sbi.gnu.c.linker.base.1133646727" 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.da.2117661012" name="C++ Linker" superClass="org.tizen.nativecpp.tool.sbi.gnu.cpp.linker.da">
+ <option id="gnu.cpp.link.option.libs.2040317904" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
+ <listOptionValue builtIn="false" value="daprobe"/>
+ </option>
+ <option id="gnu.cpp.link.option.paths.970399730" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
+ <listOptionValue builtIn="false" value=""${SDK_INSTALL_PATH}/library/da/arm""/>
+ <listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/lib}""/>
+ </option>
+ <option id="sbi.gnu.cpp.linker.option.frameworks_lflags.cpp.1399940831" 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 /home/amith.m/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=""/>
+ <listOptionValue builtIn="false" value="-pie -lpthread "/>
+ <listOptionValue builtIn="false" value="-Xlinker -rpath=\$$ORIGIN/../lib -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-appfw"/>
+ <listOptionValue builtIn="false" value="-losp-uifw"/>
+ <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-speech-tts"/>
+ <listOptionValue builtIn="false" value="-losp-speech-stt"/>
+ <listOptionValue builtIn="false" value="-losp-shell"/>
+ <listOptionValue builtIn="false" value="-losp-shell-core"/>
+ <listOptionValue builtIn="false" value="-lxml2"/>
+ </option>
+ <inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.2109802823" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativeapp.tool.sbi.gnu.assembler.base.1408351650" name="Assembler" superClass="org.tizen.nativeapp.tool.sbi.gnu.assembler.base">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.855126109" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool id="org.tizen.nativecpp.tool.sbi.po.compiler.330081702" name="PO Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.po.compiler"/>
+ <tool id="org.tizen.nativecpp.tool.sbi.edc.compiler.2119523814" name="EDC Resource Compiler" superClass="org.tizen.nativecpp.tool.sbi.edc.compiler"/>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.368298968" name="Assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1704562112" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ <tool command="clang++" id="org.tizen.nativecpp.tool.sbi.gnu.assembler.400088590" name="Assembler" superClass="org.tizen.nativecpp.tool.sbi.gnu.assembler">
+ <inputType id="cdt.managedbuild.tool.gnu.assembler.input.1910972457" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+ </tool>
+ </toolChain>
+ </folderInfo>
+ <sourceEntries>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="res"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
+ <entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
+ </sourceEntries>
+ </configuration>
+ </storageModule>
+ <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+ </cconfiguration>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ <project id="CallApp.org.tizen.nativecpp.target.sbi.gcc45.app.484750264" name="Tizen Application" projectType="org.tizen.nativecpp.target.sbi.gcc45.app"/>
+ </storageModule>
+ <storageModule moduleId="scannerConfiguration">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
+ <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.905958591">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.emulator.da.173822686">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.da.836493868">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.release.783254993">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ <scannerConfigBuildInfo instanceId="org.tizen.nativecpp.config.sbi.gcc45.app.debug.device.1055543585">
+ <autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.tizen.nativecommon.TizenGCCManagedMakePerProjectProfileCPP"/>
+ </scannerConfigBuildInfo>
+ </storageModule>
+ <storageModule moduleId="com.samsung.tizen.nativeapp.projectInfo" version="1.0.0"/>
+ <storageModule moduleId="refreshScope"/>
+ <storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
+</cproject>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>Call</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+ <arguments>
+ <dictionary>
+ <key>?name?</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.append_environment</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildArguments</key>
+ <value></value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildCommand</key>
+ <value>sbi-make</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.buildLocation</key>
+ <value>${workspace_loc:/CallApp/Debug-Tizen-Emulator}</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+ <value>clean</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.contents</key>
+ <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+ <value>all</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.stopOnError</key>
+ <value>true</value>
+ </dictionary>
+ <dictionary>
+ <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+ <value>true</value>
+ </dictionary>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+ <triggers>full,incremental,</triggers>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.tizen.nativecpp.apichecker.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.cdt.core.cnature</nature>
+ <nature>org.eclipse.cdt.core.ccnature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+ <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+ <nature>org.tizen.nativecpp.apichecker.core.tizenCppNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+# Target name and PKGID
+## TODO : set application name and ID
+SET(this_target Call)
+SET(PKGID nI2PLNdTwi)
+
+# include directory
+INCLUDE_DIRECTORIES(
+ /usr/include/glib-2.0
+ /usr/lib/glib-2.0/include
+ /usr/include/osp
+ /usr/include/vconf
+ /usr/include/media
+ /usr/include/telephony-client
+ /usr/include/contacts-svc
+ inc
+ )
+
+# Source files
+FILE(GLOB ${this_target}_SOURCE_FILES
+ src/*.cpp
+)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
+
+
+# Create executable
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
+ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
+
+# Set link libraries and link options
+## TODO : add more link libraries and options
+TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp osp-appfw osp-uifw osp-social osp-messaging osp-media osp-image osp-image-core osp-telephony)
+TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib capi-media-sound-manager SLP-tapi vconf contacts-service2)
+TARGET_LINK_LIBRARIES(${this_target} -Xlinker --allow-shlib-undefined -pthread -pie)
+
+# Copy info, data, res, and icons directories
+INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKGID}/bin)
+
+# Copy resource
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKGID}/info)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKGID})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKGID})
--- /dev/null
+Flora License
+
+Version 1.1, April, 2013
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+ 1. You must give any other recipients of the Work or Derivative Works
+ a copy of this License; and
+ 2. You must cause any modified files to carry prominent notices stating
+ that You changed the files; and
+ 3. You must retain, in the Source form of any Derivative Works that
+ You distribute, all copyright, patent, trademark, and attribution
+ notices from the Source form of the Work, excluding those notices
+ that do not pertain to any part of the Derivative Works; and
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
+ then any Derivative Works that You distribute must include a readable
+ copy of the attribution notices contained within such NOTICE file,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works, in at least one of the following places:
+ within a NOTICE text file distributed as part of the Derivative Works;
+ within the Source form or documentation, if provided along with the
+ Derivative Works; or, within a display generated by the Derivative Works,
+ if and wherever such third-party notices normally appear.
+ The contents of the NOTICE file are for informational purposes only
+ and do not modify the License.
+
+You may add Your own attribution notices within Derivative Works
+that You distribute, alongside or as an addendum to the NOTICE text
+from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional or
+different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works
+as a whole, provided Your use, reproduction, and distribution of
+the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Flora License, Version 1.1 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://floralicense.org/license/
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
--- /dev/null
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.1.
+Please, see the LICENSE.Flora file for Flora License, Version 1.1 terms and conditions.
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallActiveCallForm.h
+ * @brief This is the header file for the %ActiveCallForm class.
+ *
+ * This header file contains the declarations for %ActiveCallForm class.
+ */
+#ifndef _PHN_ACTIVE_CALL_FORM_H_
+#define _PHN_ACTIVE_CALL_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "CallBaseForm.h"
+#include "CallIAppStateChangeListner.h"
+
+class CallButtonsPanel;
+class DtmfKeyPadPanel;
+class AppCallInfo;
+
+/**
+ * @class ActiveCallForm
+ * @brief This class presents a form based UI for dialing call, active call, conference call,
+ * single active call, multiple active call scenarios.
+ *
+ */
+class ActiveCallForm
+ : public BaseForm
+ , public IAppStateChangeListener
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+ , public Tizen::System::ISettingEventListener
+{
+public:
+ ActiveCallForm(FormType formType);
+ virtual ~ActiveCallForm(void);
+ //From BaseForm
+ virtual void Initialize(void);
+ void SetSwapInProgress(bool progress);
+ void SetCallStateInProgress(bool progress);
+ void SetConfCallStateInProgress(bool progress);
+ void OnHoldTelephonyCallback(bool isHeld);
+ void OnActiveTelephonyCallback(bool isActive);
+ void OnConfCallHoldTelephonyCallback(bool isHeld);
+ void OnConfCallActiveTelephonyCallback(bool isActive);
+
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+ // Handle the changes(e.g. participant ended) in conference call
+ void HandleConfCallChanged(void);
+ // Used to update multiple call screen
+ void UpdateMultipleCallScreen(Tizen::Base::Collection::IListT<AppCallInfo>& activeCallsList);
+ //Handle hold conference call
+ //IAddressbookChangeEventListener
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+ //From IAppStateChangeListener
+ virtual void OnForeground(void);
+ virtual void OnBackground(void){};
+ virtual void OnScreenOff(void){};
+ //ISettings Event Listener
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+
+private:
+ // Create the call buttons panel and add to form
+ result InitializeCallButtonsPanel(void);
+ // Set the correct bitmaps and action listeners for swap button
+ void InitializeSwapButton(void);
+ // Set the action listener for manage conf call button
+ void InitializeManageConfCallButton(void);
+ // Set the correct bitmaps and action listeners for hold button
+ void InitializeHoldButton(void);
+ // Set the state of the hold button according to call state
+ void SetHoldButtonStatus(bool toHoldCall);
+ // This function is used to fetch person details using phone number.
+ void ShowPersonDetails(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& contactLblName, const Tizen::Base::String& nameLblName, bool isSecondCaller, AppCallInfo* pCallInfo);
+ // Method to show phone number on screen for all calls except conference call.
+ void ShowPhoneNumber(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& contactLblName);
+ // Method to show caller name for all calls.
+ void ShowCallerName(const Tizen::Base::String& callerName, const Tizen::Base::String& nameLblName);
+ // This function draws the caller's photo onto screen.
+ void ShowCallerPhoto(Tizen::Graphics::Bitmap* pPhotoId, bool isSecondCaller);
+ //This function is used to show small Thumbnail size photo of caller.
+ void ShowCallersPhotoThumbnail(const Tizen::Graphics::Bitmap& pPhotoId);
+ // Method to show call duration/state(held) for call in progress
+ void ShowTimerInfo(const Tizen::Base::String& timerLblName, bool isOnHold, long long startTime = 0);
+ // Method to set the show state of all the labels when DTMF keypad is launched
+ void SetShowStateOnKeypad(bool showState);
+ // Method to set the show state of all the labels when DTMF keypad is launched in Landscape
+ void SetShowStateOnKeypadLandscape(bool showState);
+ // Method to populate the list shown on "More" option
+ void CreateMoreOptionsMenuList(void);
+ // Method to destroy the list shown on "More" option
+ void DestroyMoreOptionsMenuList(void);
+ //Used to Show DTMF keypad
+ void ShowDTMFKeypad(void);
+ //Used to hide DTMF Keypad
+ void HideDTMFKeypad(void);
+ //Used to show text in text field
+ void SetTextToDTMFTextField(const Tizen::Base::String& dtmfStr);
+ // Set hold button status
+ void SetHoldButtonShowState(bool showState);
+ void UpdateCallerPhoto();
+
+ //From IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
+
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+ //From IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+ //Method to show thumbnail image
+ void ShowThumbnailImage(const Tizen::Graphics::Bitmap* pPhotoId,Tizen::Base::String& photoLabel);
+ //Check if swap in progress
+ bool IsSwapInProgress(void);
+ bool IsCallStateInProgress(void);
+ bool IsConfCallStateInProgress(void);
+
+private:
+ //Start time for Active call
+ long long __activeCallStartTime;
+ long long __referenceticks;
+ //Timer used to show call time
+ Tizen::Base::Runtime::Timer* __pActiveCallTimer;
+ //Custom Buttons Panel
+ CallButtonsPanel* __pCallButtonsPanel;
+ DtmfKeyPadPanel* __pDTMFKeypad;
+ Tizen::Social::Addressbook* __pAddressbook;
+ //Option Menu List for conference call
+ Tizen::Ui::Controls::ListView* __pMoreOptionsList;
+ Tizen::Ui::Controls::Label* __pMoreOptionsListAnchor;
+ Tizen::Ui::Controls::Label* __pSmallPhotoLabel;
+ Tizen::Base::String __DtmfString;
+ AppCallInfo* __pActiveCallInfo;
+ AppCallInfo* __pHeldCallInfo;
+ bool __isSwapInProgress;
+ bool __isCallStateInProgress;
+ bool __isConfCallStateInProgress;
+};
+
+#endif //_PHN_ACTIVE_CALL_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _CALLAPP_H_
+#define _CALLAPP_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FSystem.h>
+#include <FUi.h>
+
+class IAppStateChangeListener;
+
+/**
+ * [CallAppApp] UiApp must inherit from UiApp class
+ * which provides basic features necessary to define an UiApp.
+ */
+class CallApp
+ : public Tizen::App::UiApp
+ , public Tizen::System::IScreenEventListener
+ , public Tizen::App::IAppControlProviderEventListener
+ , public Tizen::App::IActiveAppEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+{
+public:
+ /**
+ * [Test] UiApp must have a factory method that creates an instance of itself.
+ */
+ static Tizen::App::UiApp* CreateInstance(void);
+
+public:
+ CallApp(void);
+ virtual~CallApp(void);
+
+public:
+ // Called when the UiApp is initializing.
+ virtual bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+
+ // Called when the UiApp initializing is finished.
+ virtual bool OnAppInitialized(void);
+
+ // Called when the UiApp is requested to terminate.
+ virtual bool OnAppWillTerminate(void);
+
+ // Called when the UiApp is terminating.
+ virtual bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+
+ // Called when the UiApp's frame moves to the top of the screen.
+ virtual void OnForeground(void);
+
+ // Called when this UiApp's frame is moved from top of the screen to the background.
+ virtual void OnBackground(void);
+
+ // Called when the system memory is not sufficient to run the UiApp any further.
+ virtual void OnLowMemory(void);
+
+ // Called when the battery level changes.
+ virtual void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
+
+ // Called when the screen turns on.
+ virtual void OnScreenOn(void);
+
+ // Called when the screen turns off.
+ virtual void OnScreenOff(void);
+
+ //Called when application becomes active
+ virtual void OnActiveAppChanged(const Tizen::Base::String& appId);
+
+ virtual Tizen::Ui::Scenes::SceneId GetInitialScene(void);
+
+ //Used to get launch arguments at application launch
+ Tizen::Base::Collection::IList* GetAppLaunchArguments(void);
+
+ void AddAppStateChangeListener(const IAppStateChangeListener& listener);
+
+ void RemoveAppStateChangeListener(const IAppStateChangeListener& listener);
+
+ // Called when the application control request is received from the caller application.
+ virtual void OnAppControlRequestReceived(RequestId reqId, const Tizen::Base::String& operationId, const Tizen::Base::String* pUriData, const Tizen::Base::String* pMimeType, const Tizen::Base::Collection::IMap* pExtraData);
+ //Called when incoming call has to be handled
+ void SetTopMostWindow(bool bTopMost);
+ //Gets the time duration since appplication has been launched
+ long long GetCallAppTicks(void);
+
+private:
+ //internal function to process AppControl request.
+ void ProcessAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::Collection::IMap* pArgsMap,const Tizen::Base::String* pUriData =null);
+ //internal function to process AppControl request.
+ void ProcessWebAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::String* pUriData);
+
+ //internal function to handle AppControl Request for Incoming call.
+ void HandleIncomingCallAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap);
+ //internal function to handle AppControl Request for dial call.
+ void HandleDialCallAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap,const Tizen::Base::String* pUriData);
+ //Checks if the number is valid
+ bool CheckNumberIsValid(Tizen::Base::String phoneNumber);
+
+ void ShowAutoRejectPopup(Tizen::Base::String contactNumber);
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer &timer);
+
+
+
+private:
+ Tizen::Ui::Scenes::SceneId __initialSceneId;
+ Tizen::Base::Collection::ArrayList* __pLaunchArgs;
+ Tizen::Base::Collection::ArrayList __listenerList;
+ Tizen::Ui::Controls::Popup* __pCallRejectedIonPopup;
+ Tizen::Base::Runtime::Timer __callRejectedIontimer;
+ long long __callTicks;
+ Tizen::Base::Runtime::Timer* __pCallAppTimer;
+};
+
+#endif // _CALLAPP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallAppControlRequestMgr.h
+ * @brief This is the header file for the %CallAppControlRequestMgr class.
+ *
+ * This header file contains the declarations for %CallAppControlRequestMgr class.
+ */
+#ifndef _CALL_APPCONTROL_REQUEST_MGR_H_
+#define _CALL_APPCONTROL_REQUEST_MGR_H_
+
+class CallAppControlRequestMgr {
+
+public:
+//create a singleton instance
+static CallAppControlRequestMgr* GetInstance(void);
+
+private:
+ CallAppControlRequestMgr(void);
+ CallAppControlRequestMgr(CallAppControlRequestMgr& requestMgr);
+ virtual ~CallAppControlRequestMgr(void);
+ CallAppControlRequestMgr& operator =(const CallAppControlRequestMgr& requestMgr);
+
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+
+public://methods
+
+ //Used to check if there is any AppControl request in progress.
+ bool IsAppControlRunning(void);
+ //Used to abort any running AppControl request.
+ void AbortAppControlRequest(void);
+ //Used to complete any running AppControl request.
+ void AppControlRequestCompleted(void);
+ //Used to make Message AppControl request to compose message.
+ bool LaunchComposeMessageAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
+ //Used to make "ViewContact" AppControl request.
+ bool LaunchViewContactAppControl(Tizen::Base::String& contactId, Tizen::App::IAppControlResponseListener* pListener);
+ //Used to make "AddContact" AppControl request.
+ bool LaunchAddContactAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
+ //Launch "Dialer" AppControl request.
+ bool LaunchDialerAppControl(Tizen::App::IAppControlResponseListener* pListener);
+
+private:
+ static CallAppControlRequestMgr* __pInstance;
+ Tizen::App::AppControl* __pOpenedAppControl;
+};
+
+#endif // _CALL_APPCONTROL_REQUEST_MGR_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _CALLAPP_FORM_FACTORY_H_
+#define _CALLAPP_FORM_FACTORY_H_
+
+#include <FUi.h>
+
+
+class CallAppFormFactory
+ : public Tizen::Ui::Scenes::IFormFactory
+{
+public:
+ CallAppFormFactory(void);
+ virtual ~CallAppFormFactory(void);
+
+ virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
+};
+
+#endif // _CALLAPP_FORM_FACTORY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#ifndef _CALLAPP_FRAME_H_
+#define _CALLAPP_FRAME_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+
+class CallAppFrame
+ : public Tizen::Ui::Controls::Frame
+{
+public:
+ CallAppFrame(void);
+ virtual ~CallAppFrame(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+};
+
+#endif //_CALLAPP_FRAME_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnAppUtility.h
+ * @brief This is the header file for the %AppUtility class.
+ *
+ * This header file contains the declarations for %AppUtility class.
+ */
+#ifndef _PHN_APP_UTILITY_H_
+#define _PHN_APP_UTILITY_H_
+
+#include <FBase.h>
+#include <FMedia.h>
+
+enum KeypadTextPosition
+{
+ POSITION_LEFT,
+ POSITION_RIGHT,
+ POSITION_CENTER,
+ POSITION_TOP_LEFT,
+ POSITION_TOP_CENTER,
+ POSITION_BOTTOM_LEFT,
+ POSITION_BOTTOM_CENTER
+};
+
+/**
+ * @class AppUtility
+ * @brief This class provides common functionalities across application through static member functions.
+ * Its instance cannot needed.
+ *
+ */
+class AppUtility
+{
+private:
+ AppUtility(void);
+ AppUtility(const AppUtility& obj);
+ virtual ~AppUtility(void);
+
+public:
+ /**
+ * Fetches the String from resources based on
+ * resource id provided by "stringId".
+ */
+ static Tizen::Base::String GetResourceString(const Tizen::Base::String& stringId);
+
+ /**
+ * Fetches the Bitmap from resources and
+ * scales it to specified width and height, if provided.
+ */
+ static Tizen::Graphics::Bitmap* GetBitmapFromResourcesN(const Tizen::Base::String& imagePath, int imgWidth = 0, int imgHeight = 0);
+
+ /*
+ * returns the available phone memory
+ */
+ static long long GetAvailableMemory();
+};
+
+#endif // _PHN_APP_UTILITY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallBaseForm.h
+ * @brief This is the header file for the %BaseForm class.
+ *
+ * This header file contains the declarations for %BaseForm class.
+ */
+#ifndef _PHN_BASE_FORM_H_
+#define _PHN_BASE_FORM_H_
+
+#include <FBase.h>
+#include <FSystem.h>
+#include <FGraphics.h>
+#include <FUi.h>
+#include "CallITelephonyEventListener.h"
+#include "CallErrorMsgPopup.h"
+
+class AppCallInfo;
+class CallPresentationModel;
+
+enum FormType
+{
+ FORMTYPE_OUTGOINGCALL,
+ FORMTYPE_EMERGENCYOUTGOINGCALL,
+ FORMTYPE_INCOMINGCALL,
+ FORMTYPE_ACTIVECALL,
+ FORMTYPE_EMERGENCYACTIVECALL,
+ FORMTYPE_ACTIVECONFCALL,
+ FORMTYPE_CONFCALLLIST,
+ FORMTYPE_ENDCALL,
+ FORMTYPE_MULTIPLECALLS,
+};
+
+/**
+ * @class BaseForm
+ * @brief This class presents a form based UI all call scenarios and provides
+ * common functionalities in all call forms.
+ *
+ */
+class BaseForm
+ : public Tizen::Ui::Controls::Form
+ , public Tizen::Ui::IActionEventListener
+ , public ITelephonyEventListener
+ , public IPopupClosedEventListener
+{
+public:
+ BaseForm(FormType formType);
+ virtual ~BaseForm(void);
+ virtual void Initialize(void) = 0;
+
+public:
+ //Used to add user specific code after controls are added to form
+ virtual result OnInitializing(void);
+
+ //From 'Tizen::Ui::IActionEventListener'
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //Event Listener methods from ITelephonyEventListener
+ virtual void HandleCallConnected(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleCallHeld(bool isHeld);
+ virtual void HandleCallActive(bool isActive);
+ virtual void HandleConferenceCall(AppCallInfo& pCallInfo);
+ virtual void HandleIncomingCall(AppCallInfo& pCallInfo);
+ virtual void HandleConfCallHoldOccured(bool success);
+ virtual void HandleConfCallActiveOccured(bool success);
+ virtual void HandleCallSwapOccured(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleConferenceChange(void);
+ virtual void HandleTelephonyError(int errorCode);
+ //Event Listener method from IPopupClosedEventListener
+ virtual void HandlePopupClosed(void);
+
+protected:
+ FormType __formType;
+ //Ownership
+ ErrorMsgPopup* __pErrorMsgPopup;
+ CallPresentationModel* __pCallPresentor;
+};
+
+#endif // _PHN_BASE_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallButtonsPanel.h
+ * @brief This is the header file for the %CallButtonsPanel class.
+ *
+ * This header file contains the declarations for %CallButtonsPanel class.
+ */
+#ifndef _PHN_CALL_BUTTONS_PANEL_H_
+#define _PHN_CALL_BUTTONS_PANEL_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FUi.h>
+#include "CallBaseForm.h"
+#include "CallTypes.h"
+
+/**
+ * @class CallButtonsPanel
+ * @brief This class presents a panel based UI for keypads used in active call
+ * and end call scenarios.
+ *
+ */
+class CallButtonsPanel
+ : public Tizen::Ui::Controls::Panel
+{
+private:
+ enum ButtonState
+ {
+ BTN_NORMAL,
+ BTN_PRESS,
+ BTN_DIM,
+ };
+
+public:
+ CallButtonsPanel(void);
+ virtual ~CallButtonsPanel(void);
+
+ bool ConstructPanel(Tizen::Ui::IActionEventListener* pEventListener, FormType parentFormType);
+
+ /**
+ * Overrides this method to provide user-specific initialization code after the control is added to a container.
+ * @remarks OnInitializing() is called when the control is about to be added to a container.
+ * @remarks To cancel adding this control to the parent, return E_FAILURE in this method.
+ * @see OnTerminating()
+ */
+ virtual result OnInitializing(void);
+
+ /**
+ * Overrides this method to provide user-specific termination code.
+ * @return An error code
+ * @remarks OnTerminating() is called right before the control is removed successfully from the container.
+ * @remarks To cancel removing this control from the parent, return E_FAILURE in this method.
+ * @see OnInitializing()
+ */
+ virtual result OnTerminating(void);
+ //Called to change state, when keypad is opened or closed.
+ void SetKeypadButtonState(CommandIds cmdId);
+ //used to set or change speaker button state.
+ void SetSpeakerButtonState(CommandIds cmdId);
+ //used to set or change Mute button state.
+ void SetMuteButtonState(CommandIds cmdId);
+ //used to set the button panel state in end call form based on type of call.
+ void SetEndCallPanelState(bool isEnabled);
+ //Used to enable or disable "Add Call" Button
+ void EnableAddCallButton(bool enable);
+ //Used to enable or disable "Join Call" Button
+ void EnableJoinCallButton(bool enable);
+ // Used to set the ViewContact is present or not
+ void ShowViewContactButton(void);
+ // Used to set the AddToContact is present or not
+ void ShowAddContactButton(void);
+ //set the buttons in the panel as the top controls. Chk if its needed in RC2
+ void SetButtonPosition(void);
+ void ShowOrHideAddtoContactsButton(bool isEnabled);
+
+protected:
+ // Construct the panel to be shown in "End Call" form
+ result ConstructEndCallPanel(void);
+ // Construct the panel to be shown in "Active Call" form
+ result ConstructActiveCallPanel(void);
+ // Draws the background for the panel
+ result AddBackgroundBitmap(void);
+ // Draws the bitmap at the correct position on the button
+ void SetBitmapsToButton(const Tizen::Base::String& buttonId, const Tizen::Base::String& buttonName, const Tizen::Base::String& imgPath, ButtonState state);
+ // Draws the text at the correct position on the button
+ void SetEnrichedTextToButton(const Tizen::Base::String& buttonName, Tizen::Graphics::Canvas* pCanvas, ButtonState state, int verticalPos);
+ // Adds the action listener for the buttons
+ void AddKeyPadActionListener(const Tizen::Base::String& buttonId, CommandIds cmdId);
+ //Disable the unused buttons for Outgoing / Emergency Forms
+ void DisableKeysForOutgoingCall(void);
+
+
+ //set the View contact bitmaps
+ void SetViewContacBitmapToButton(const Tizen::Base::String& buttonId, const Tizen::Base::String& buttonName, const Tizen::Base::String& imgBackgroundPath,const Tizen::Base::String& imgPath, ButtonState state);
+
+private:
+ //action listener
+ Tizen::Ui::IActionEventListener* __pActionListener;
+ FormType __parentFormType;
+};
+
+#endif /* _PHN_CALL_BUTTONS_PANEL_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCommonUtils.h
+ * @brief This is the header file for the %DialUtil class.
+ *
+ * This header file contains the declarations for commonly used functions.
+ */
+#ifndef _PHN_COMMON_UTILS_H_
+#define _PHN_COMMON_UTILS_H_
+
+#include <FUi.h>
+#include <FBase.h>
+
+enum DialerFontStyle
+{
+ FONT_CALLING_TEXT,
+ FONT_KEYPAD_NUMBER,
+ FONT_KEYPAD_TEXT,
+ FONT_KEYPAD_P,
+ FONT_KEYPAD_PLUS,
+ FONT_KEYPAD_CANCEL,
+ FONT_SUGGESTION_NAME,
+ FONT_SUGGESTION_MOBILE,
+ FONT_SUGGESTION_NUMBER,
+ FONT_SUGGESTION_LIST_NUMBER,
+ FONT_HIGHLIGHT_SEARCH_KEYWORD
+};
+
+//Command Ids used in Dialer tab. Always append new command ids at bottom.
+enum DialCommandIds
+{
+ NUM_KEY1 = 1,
+ NUM_KEY2,
+ NUM_KEY3,
+ NUM_KEY4,
+ NUM_KEY5,
+ NUM_KEY6,
+ NUM_KEY7,
+ NUM_KEY8,
+ NUM_KEY9,
+ PAUSE_KEY,
+ NUM_KEY0,
+ HASH_KEY,
+ VIDEOCALL_KEY,
+ CALL_KEY,
+ CLEAR_KEY,
+ CANCEL_KEY,
+ DIAL_CMD_TOTAL_COUNT,
+};
+
+enum LogContextActionIds
+{
+ IDA_LIST_ELEMENT_CALL = 105,
+ IDA_LIST_ELEMENT_VIDEO_CALL,
+ IDA_LIST_ELEMENT_MESSAGE,
+ IDA_LIST_ELEMENT_DELETE,
+
+};
+
+
+extern const int ID_NAME_STRING;
+extern const int ID_NUMBER_STRING;
+extern const int ID_TIME_STRING;
+extern const int ID_CONTACT_BITMAP;
+extern const int ID_CALLTYPE_BITMAP;
+
+
+extern const int X_TEXT_LINE1_ITEM;
+extern const int Y_TEXT_LINE1_ITEM;
+extern const int H_TEXT_LINE1_ITEM;
+extern const int W_TEXT_LINE1_ITEM;
+
+extern const int X_TEXT_LINE2_ITEM;
+extern const int Y_TEXT_LINE2_ITEM;
+extern const int H_TEXT_LINE2_ITEM;
+extern const int W_TEXT_LINE2_ITEM;
+
+extern const int X_TEXT_TIME_ITEM;
+extern const int Y_TEXT_TIME_ITEM;
+extern const int H_TEXT_TIME_ITEM;
+extern const int W_TEXT_TIME_ITEM;
+
+extern const int X_CONTACT_BITMAP_ITEM;
+extern const int Y_CONTACT_BITMAP_ITEM;
+extern const int H_CONTACT_BITMAP_ITEM;
+extern const int W_CONTACT_BITMAP_ITEM;
+
+extern const int X_CALLTYPE_BITMAP_ITEM;
+extern const int Y_CALLTYPE_BITMAP_ITEM;
+extern const int H_CALLTYPE_BITMAP_ITEM;
+extern const int W_CALLTYPE_BITMAP_ITEM;
+
+extern const int X_DIALER_BTN_TXT;
+extern const int W_DIALER_BTN_NUM_TXT;
+extern const int W_DIALER_BTN_ALPHA_TXT;
+
+/**
+ * @class DialUtil
+ * @brief This class provides static public utility functions to dialer module.
+ *
+ */
+class DialUtil
+{
+private:
+ DialUtil(void){};
+ DialUtil(const DialUtil& obj){};
+ virtual ~DialUtil(void){};
+
+public:
+ //used to get text font for button in dialer tab.
+ static Tizen::Graphics::Font* GetTextFontN(int textFontStyle);
+ //used to get text color for button in dialer tab.
+ static Tizen::Graphics::Color* GetTextColorN(int textColor, int buttonStatus);
+ //Function to check if keyword is numeric. This function assumes that a string starting with digit will be numeric.
+ //If needed, it might be implemented in more generic way to check all characters for digits.
+ static bool IsNumericString(Tizen::Base::String& keyWord);
+ //Sets the 'bgImg' image to 'pCanvas' Canvas, if image is a 9-patch image.
+ static void Draw9PatchToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ //Used to set image to canvas.
+ static void DrawImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos);
+ //Used to convert text to Enriched text and set it to canvas.
+ static void DrawTextToCanvas(const Tizen::Base::String& buttonText1, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos, int buttonStatus);
+ //Used to set nnormal, pressed image to button.
+ static void DrawCanvasToButton(Tizen::Graphics::Canvas* pCanvasNormal, Tizen::Graphics::Canvas* pCanvasPressed, Tizen::Ui::Controls::Button* pButton);
+ //Used to convert provided digit to its equivalent String instance.
+ static Tizen::Base::String ConvertDialedNumberToString(int dialNumber);
+ //Function used to fetch a list of possible names mapped to 'nextCharPos'.
+ static Tizen::Base::Collection::IList* FetchPossibleNamesListN(const Tizen::Base::String& prevSearchStr, int nextCharPos);
+ //Function used to convert substring of 'name' to keys typed, eg. Ani -> 264
+ static void ConvertNameToNumericKeys(Tizen::Base::String& subContactName, Tizen::Base::String& possibleKeysTyped);
+};
+
+#endif /* _PHN_COMMON_UTILS_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallConfCallerListForm.h
+ * @brief This is the header file for the %ConfCallerListForm class.
+ *
+ * This header file contains the declarations for %ConfCallerListForm class.
+ */
+#ifndef _PHN_CONF_CALLER_LIST_FORM_H_
+#define _PHN_CONF_CALLER_LIST_FORM_H_
+
+#include <FBase.h>
+#include <FApp.h>
+#include <FUi.h>
+#include "CallBaseForm.h"
+#include "CallTypes.h"
+
+class AppCallInfo;
+
+/**
+ * @class ConfCallerListForm
+ * @brief This class presents a form based UI for participants list of conference call.
+ *
+ */
+class ConfCallerListForm
+ : public BaseForm
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::ITableViewItemProvider
+ , public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public Tizen::System::ISettingEventListener
+{
+public:
+ ConfCallerListForm(void);
+ virtual ~ConfCallerListForm(void);
+ //From BaseForm
+ virtual void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+ //Disable all the elements
+ void DisableAllControls(void);
+ void OnConfCallHoldTelephoneCallBackOccured(bool success);
+ void OnConfCallActiveTelephoneCallBackOccured(bool success);
+ bool IsConfCallStateInProgress(void);
+ void SetConfCallStateInProgress(bool progress);
+ // From 'Container'.
+ // Called when the container needs to draw itself. @n
+ // Users can override this method to display user-specific drawings. @n
+ // This method is called after the container has drawn itself, but just before the container draws its child controls.
+ //
+ virtual result OnDraw(void);
+ // Handle change in conf call list
+ void HandleParticipantsChanged(void);
+ //IAddressbookChangeEventListener
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList);
+
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //ITableViewItemProvider
+ virtual int GetItemCount(void);
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int itemIndex, int itemWidth);
+ virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ virtual int GetDefaultItemHeight(void);
+
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+
+private:
+ // Add the action listener for the buttons
+ void AddActionListener(const Tizen::Base::String& keyName, CommandIds cmdId);
+ // Method to show call duration/state(held) for call in progress
+ void ShowTimerInfo(const Tizen::Base::String& timerLblName, long long startTime = 0);
+ // Method to set "Hold" Button status
+ void SetHoldButtonStatus(bool isCallOnHold);
+ void CreateItemAndAddActionListener( Tizen::Ui::Controls::Button& splitButton, Tizen::Ui::Controls::Button& endButton, Tizen::Ui::Controls::Label& callerLabel, SplitConfCallerCmdIds splitCmdId,EndConfCallerCmdIds EndCmdId, const Tizen::Base::String& displayName);
+ void CreateTableView(void);
+
+private:
+ AppCallInfo* __pConfCallInfo;
+ //Timer used to show call time
+ Tizen::Base::Runtime::Timer* __pConfCallTimer;
+ Tizen::Social::Addressbook* __pAddressbook;
+ Tizen::Ui::Controls::TableView* __pList;
+ bool __isCallSplit;
+ bool __isConfCallStateInProgress;
+};
+
+#endif //_PHN_CONF_CALLER_LIST_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCustomItemBgElement.h
+ * @brief This is the header file for the %CustomItemBgElement class.
+ *
+ * This header file contains the declarations for %CustomItemBgElement class.
+ */
+#ifndef _PHN_CUSTOM_ITEM_BG_ELEMENT_H_
+#define _PHN_CUSTOM_ITEM_BG_ELEMENT_H_
+
+#include <FApp.h>
+#include <FUi.h>
+
+/**
+ * @class CustomItemBgElement
+ * @brief This class presents a custom drawing for list item in settings forms.
+ *
+ */
+class CustomItemBgElement
+ : public Tizen::Ui::Controls::ICustomElement
+{
+public:
+ CustomItemBgElement(void);
+ virtual ~CustomItemBgElement(void);
+
+ //From ICustomElement
+ virtual bool OnDraw(Tizen::Graphics::Canvas& canvas, const Tizen::Graphics::Rectangle& rect, Tizen::Ui::Controls::ListItemDrawingStatus status);
+};
+
+#endif // _PHN_CUSTOM_ITEM_BG_ELEMENT_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallDtmfKeypadPanel.h
+ * @brief This is the header file for the %DtmfKeyPadPanel class.
+ *
+ * This header file contains the declarations for %DtmfKeyPadPanel class.
+ */
+#ifndef _PHN_DTMF_KEYPAD_PANEL_H_
+#define _PHN_DTMF_KEYPAD_PANEL_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class DtmfKeyPadPanel
+ * @brief This class presents a panel based UI for DTMF keypad
+ * shown while active call scenarios.
+ *
+ */
+class DtmfKeyPadPanel
+ : public Tizen::Ui::Controls::Panel
+{
+public:
+ DtmfKeyPadPanel(void);
+ virtual ~DtmfKeyPadPanel(void);
+ bool Initialize(Tizen::Ui::IActionEventListener* pEventListener,Tizen::Graphics::Rectangle& boundsRect);
+
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ void setKeysPanelBounds(void);
+ // Draws the bitmap at the correct position on the buttons
+ result SetBackgroundtoButton();
+protected:
+
+ enum DialerFontStyle
+ {
+ FONT_CALLING_TEXT,
+ FONT_KEYPAD_NUMBER,
+ FONT_KEYPAD_TEXT,
+ FONT_KEYPAD_P,
+ FONT_KEYPAD_PLUS,
+ FONT_KEYPAD_CANCEL
+ };
+ //Add action listener.
+ void AddListenersToButtons();
+ void SetBitmapsToButton(Tizen::Base::String& buttonId,const Tizen::Base::String& buttonText,int actionID);
+ //Sets the background bitmap to button canvas in Pressed state.
+ result SetPressedBgToCanvas(Tizen::Graphics::Canvas& pCanvas, const Tizen::Base::String& bgImg);
+ // Draws the image at the correct position on the button
+ void DrawImageToCanvas(const Tizen::Base::String& image, Tizen::Graphics::Dimension imageDimention, Tizen::Graphics::Canvas& pCanvas, int pos);
+ // Draws the text at the correct position on the button
+ void DrawTextToCanvas(const Tizen::Base::String& buttonText1, int fontSize, Tizen::Graphics::Canvas& pCanvas, int pos, int buttonStatus);
+ // retrieves the position for the text/image in the button
+ void GetPositionToDraw(Object* item, Tizen::Graphics::Canvas* pCanvas, int itemType, int pos, Tizen::Graphics::Point* itemPos);
+ // Gets the font based on the style
+ Tizen::Graphics::Font* GetTextFontN(int textFontStyle);
+ // Get the color to be set for the text
+ Tizen::Graphics::Color* GetTextColorN(int textColor, int buttonStatus);
+
+private:
+ //action listener
+ Tizen::Ui::IActionEventListener* __pActionListener;
+};
+
+#endif // _PHN_DTMF_KEYPAD_PANEL_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallEndCallForm.h
+ * @brief This is the header file for the %EndCallForm class.
+ *
+ * This header file contains the declarations for %EndCallForm class.
+ */
+#ifndef _PHN_END_CALL_FORM_H_
+#define _PHN_END_CALL_FORM_H_
+
+#include <FBase.h>
+#include <FApp.h>
+#include <FUi.h>
+#include "CallBaseForm.h"
+#include "CallTypes.h"
+#include "CallIAppStateChangeListner.h"
+
+class CallButtonsPanel;
+
+/**
+ * @class EndCallForm
+ * @brief This class presents a form based UI for end call scenarios.
+ *
+ */
+class EndCallForm
+ : public BaseForm
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Social::IAddressbookChangeEventListener
+ , public IAppStateChangeListener
+ , public Tizen::Ui::IOrientationEventListener
+{
+public:
+ EndCallForm(void);
+ virtual ~EndCallForm(void);
+ //From BaseForm
+ virtual void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ /**
+ * Called when the container needs to draw itself. @n
+ * Users can override this method to display user-specific drawings. @n
+ * This method is called after the container has drawn itself, but just before the container draws its child controls.
+ */
+ virtual result OnDraw(void);
+
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+ /**
+ * Called when the application control is completed.
+ * @param[in] providerId The provider ID
+ * @param[in] operationId The operation ID used in application control invocation
+ * @param[in] pResultList The list of callback strings of application control
+ * @remarks The specified @c pResultList provides the result code for the first array element.
+ * @remarks When the invoked application control is terminated without sending a result,
+ * then this method is invoked with @c pResultList and it contains App::APPCONTROL_RESULT_TERMINATED.
+ * @remarks Switching forms using Tizen::Ui::Controls::Frame::SetCurrentForm() in this listener disables the upcoming form
+ * (UiApp::OnForeground()). If UiApp::OnForeground() is being used in the application logic,
+ * it is recommended to avoid switching forms in this listener.
+ * @see Tizen::App::AppControl
+ */
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ //Used to set the Viewcontact button state in the end call form
+ void ShowViewContactButton(void);
+ //Used to set the Viewcontact button state in the end call form
+ void ShowAddContactButton(void);
+ // Called by AddressBook to notify when contacts are changed.
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ // Called by AddressBook to notify when categories are changed.
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) {};
+ //Called when App comes to foreground
+ virtual void OnForeground(void);
+ //Called when App goes to background
+ virtual void OnBackground(void);
+ //Called when screen goes off
+ virtual void OnScreenOff(void){};
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+ void UpdatePersonDetail(void);
+
+private:
+ //initialise the end call panel
+ void InitializeCallButtonsPanel(void);
+ //Add the action listener for the buttons
+ void AddKeyPadActionListener(const Tizen::Base::String& keyName, CommandIds cmdId);
+ // Method to show phone number on screen for all calls except conference call.
+ void ShowPhoneNumber(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& lblName);
+ // Method to show caller name and photo for all calls.
+ void ShowPersonDetails(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& nameLblName, const Tizen::Base::String& photoLblName, AppCallInfo* pCallInfo);
+ // Method to show thumbnail
+ void ShowCallersPhotoThumbnail(const Tizen::Graphics::Bitmap& pPhotoId);
+ //private method to handle whether to close App or goto initial scene, after no more active calls are left.
+ void HandleLastCallCompletion(void);
+ //Handle Add to contacts button press
+ void HandleAddToContacts(void);
+ //Method to show thumbnail image
+ void ShowThumbnailImage(const Tizen::Graphics::Bitmap* pPhotoId,const Tizen::Base::String& photoLabel);
+
+private:
+ //Custom Buttons Panel
+ CallButtonsPanel* __pCallButtonsPanel;
+ Tizen::Base::String* __pContactNumber;
+ //Timer used to show End call scene for 3 sec
+ Tizen::Base::Runtime::Timer* __pEndCallEventTimer;
+ Tizen::Social::Addressbook* __pAddressBook;
+ Tizen::Ui::Controls::Label* __pSmallPhotoLabel;
+ bool __isMsgAppControlLaunched;
+ bool __isContactAppControlLaunched;
+};
+
+#endif // _PHN_END_CALL_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallErrorMsgPopup.h
+ * @brief This is the header file for the %ErrorMsgPopup class.
+ *
+ * This header file contains the declarations for %ErrorMsgPopup class.
+ */
+#ifndef _PHN_ERROR_MSG_POPUP_H_
+#define _PHN_ERROR_MSG_POPUP_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class IPopupClosedEventListener
+ * @brief This interface is used to notify the popup is closed event to Scenes.
+ *
+ */
+class IPopupClosedEventListener
+{
+public:
+ virtual ~IPopupClosedEventListener(void){};
+ // Called when the error message Pop-up is closed.
+ virtual void HandlePopupClosed(void) = 0;
+};
+
+/**
+ * @class ErrorMsgPopup
+ * @brief This class shows message popup in error condition.
+ *
+ */
+class ErrorMsgPopup: public Tizen::Ui::Controls::Popup
+ ,public Tizen::Base::Runtime::ITimerEventListener
+{
+public:
+ ErrorMsgPopup(IPopupClosedEventListener* pEventListener);
+ virtual ~ErrorMsgPopup(void);
+ /**
+ * Function is used to show error message popup
+ * based on the error code received.
+ */
+ void ShowErrorMsgPopupN(int errorCode);
+
+ //From ITimerEventListener
+ virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+private:
+ void ConstructPopup(int errorCode);
+ //Function is used to fetch error messages based on error code
+ Tizen::Base::String FetchErrorMessage(int errorCode);
+ //draws and shows the popup on screen
+ void ShowPopup(void);
+
+private:
+ //Timer used to show message
+ Tizen::Base::Runtime::Timer* __pTimer;
+ //Listener to popup closed event.
+ IPopupClosedEventListener* __pEventListener;
+ //used to close the popup
+ int __popupModalResult;
+};
+
+#endif // _PHN_ERROR_MSG_POPUP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallIAppStateChangeListner.h
+ * @brief This is the header file for the ICallIAppStateChangeListner class.
+ */
+
+#ifndef _PHN_STATE_CHANGE_LISTNER_H_
+#define _PHN_STATE_CHANGE_LISTNER_H_
+
+#include <FBase.h>
+
+class IAppStateChangeListener
+ : public Tizen::Base::Object
+{
+public:
+ virtual ~IAppStateChangeListener(void) {}
+
+ virtual void OnForeground(void) = 0;
+ virtual void OnBackground(void) = 0;
+ virtual void OnScreenOff(void) = 0;
+};
+
+#endif /* _PHN_STATE_CHANGE_LISTNER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/**
+ * @file CallICalllogChangeListener.h
+ * @brief This is the header file for the %ICalllogChangeListener class.
+ *
+ * This header file contains the declarations for %ICalllogChangeListener class.
+ */
+#ifndef _PHN_CALL_LOG_CHANGE_LISTENER_H_
+#define _PHN_CALL_LOG_CHANGE_LISTENER_H_
+
+/**
+ * @class ICalllogChangeListener
+ * @brief This class presents call back function from call log module.
+ *
+ */
+class ICalllogChangeListener
+{
+public:
+ virtual ~ICalllogChangeListener(void){};
+
+ virtual void OnCalllogChanged(void) = 0;
+
+};
+
+#endif //_PHN_CALL_LOG_CHANGE_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallIPopupItemSelectListener.h
+ * @brief This is the header file for the %IPopupItemSelectListener class.
+ *
+ * This header file contains the declarations for %IPopupItemSelectListener class.
+ */
+#ifndef _IPOPUP_ITEM_SELECT_LISTENER_H_
+#define _IPOPUP_ITEM_SELECT_LISTENER_H_
+
+#include <FBaseRtIEventListener.h>
+
+/**
+ * @class IPopupItemSelectListener
+ * @brief Class IPopupItemSelectListener is listener for popup object deletion.
+ *
+ */
+class IPopupItemSelectListener
+ : public Tizen::Base::Runtime::IEventListener
+{
+public:
+ /**
+ * This is the destructor for this class.
+ */
+ virtual ~IPopupItemSelectListener(void) {}
+
+ /**
+ * On Item selected.
+ */
+ virtual void OnItemSelected(int itemIndex) = 0;
+};
+
+#endif // _IPOPUP_ITEM_SELECT_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallISettingsEventListener.h
+ * @brief This is the header file for the %ISettingsEventListener class.
+ *
+ * This header file contains the declarations for %ISettingsEventListener class.
+ */
+#ifndef _PHN_I_SETTINGS_EVENT_LISTENER_H_
+#define _PHN_I_SETTINGS_EVENT_LISTENER_H_
+
+#include "CallSettingsConstants.h"
+
+/**
+ * @class ISettingsEventListener
+ * @brief This interface is used to listen to events from Telephony Manager.
+ *
+ */
+class ISettingsEventListener
+{
+public:
+ virtual ~ISettingsEventListener(void){};
+
+ //Handle the response for getCallWaiting request
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated) = 0;
+ //Handle the response for setCallWaiting request
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled) = 0;
+ //Handle the response for getCallForwarding request
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime) = 0;
+ //Handle the response for setCallForwarding request
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime) = 0;
+ //Handle the response for setcallBarring request
+ virtual void HandleSetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated) = 0;
+ //Handle the response for getCallBarring request
+ virtual void HandleGetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated) = 0;
+ //Handle flight mode change
+ virtual void HandleFlightMode(bool isFlightModeActivated) = 0;
+};
+
+#endif // _PHN_I_SETTINGS_EVENT_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallITelephonyEventListener.h
+ * @brief This is the header file for the %ITelephonyEventListener class.
+ *
+ * This header file contains the declarations for %ITelephonyEventListener class.
+ */
+#ifndef _PHN_I_TELEPHONY_EVENT_LISTENER_H_
+#define _PHN_I_TELEPHONY_EVENT_LISTENER_H_
+
+#include "CallInfo.h"
+
+/**
+ * @class ITelephonyEventListener
+ * @brief This interface is used to listen to events from Telephony Manager.
+ *
+ */
+class ITelephonyEventListener
+{
+public:
+ virtual ~ITelephonyEventListener(void){};
+
+ /**
+ * Called when the dialed call / incoming call is accepted.
+ * Implement this to handle voice call events.
+ * @param[out] pCallList - list of active calls.
+ */
+ virtual void HandleCallConnected(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
+
+ /**
+ * This function is called when a call is disconnected. It returns the list of active calls, if any is existing.
+ * Otherwise it returns the last ended call along with call duration and cause to show.
+ *
+ * @param[out] isLastCall - true, if this call was last call.
+ * @param[out] pCallList - list of calls - ended Call if last call, otherwise currently active call.
+ */
+ virtual void HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
+
+ /**
+ * This function is called when a call is held. It returns the list of active calls
+ *
+ * @param[out] isHeld - true for currently held call
+ */
+ virtual void HandleCallHeld(bool isHeld) = 0;
+ /**
+ * This function is called when a call is active. It returns the list of active calls
+ *
+ * @param[out] isActive - true for currently active call
+ */
+ virtual void HandleCallActive(bool isActive) = 0;
+ /**
+ * This function is called when two calls are joined and a conference call is setup.
+ *
+ * @param[in] pCallInfo - The conference call information data.
+ */
+ virtual void HandleConferenceCall(AppCallInfo& pCallInfo) = 0;
+
+ /**
+ * This function is called when incoming call is received.
+ *
+ * @param[in] pCallInfo - The conference call information data.
+ */
+ virtual void HandleIncomingCall(AppCallInfo& pCallInfo) = 0;
+
+ /**
+ * Called when the dialed call / incoming call is accepted.
+ * Implement this to handle voice call events.
+ * @param[out] pCallList - list of active calls.
+ */
+ virtual void HandleCallSwapOccured(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList) = 0;
+
+ /*
+ * Called when the conference call is held.
+ * Implement this to handle voice call events.
+ * @param[out] success - If true then the conference call is successfully held else not.
+ */
+ virtual void HandleConfCallHoldOccured(bool success) = 0;
+
+ /*
+ * Called when the conference call is active.
+ * Implement this to handle voice call events.
+ * @param[out] success - If true then the conference call is successfully active
+ */
+ virtual void HandleConfCallActiveOccured(bool success) = 0;
+
+ /**
+ * Called when the conference list changes.
+ * Implement this to handle voice call events.
+ * @param[out] pCallInfo - The conference call information data.
+ */
+ virtual void HandleConferenceChange(void) = 0;
+
+ /**
+ * Telephony event callback sent to listeners to handle
+ * error and show customized error message.
+ * @ param[out] errorCode - error cause returned by SLP TAPI.
+ */
+ virtual void HandleTelephonyError(int errorCode) = 0;
+};
+
+#endif // _PHN_I_TELEPHONY_EVENT_LISTENER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallIncomingCallForm.h
+ * @brief This is the header file for the %IncomingCallForm class.
+ *
+ * This header file contains the declarations for %IncomingCallForm class.
+ */
+#ifndef _PHN_INCOMING_CALL_FORM_H_
+#define _PHN_INCOMING_CALL_FORM_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FUi.h>
+#include "CallBaseForm.h"
+#include "CallTypes.h"
+#include "CallIPopupItemSelectListener.h"
+#include "CallOptionPopup.h"
+#include "CallIAppStateChangeListner.h"
+
+/**
+ * @class IncomingCallForm
+ * @brief This class presents a form based UI for incoming call scenarios.
+ *
+ */
+class IncomingCallForm
+ : public BaseForm
+ , public IAppStateChangeListener
+ , public Tizen::Ui::Controls::IFormBackEventListener
+ , public Tizen::Ui::Controls::ITableViewItemEventListener
+ , public Tizen::Ui::Controls::ITableViewItemProvider
+ , public Tizen::Ui::Scenes::ISceneEventListener
+ , public Tizen::Ui::ITouchEventListener
+ , public Tizen::Ui::IOrientationEventListener
+ , public IPopupItemSelectListener
+{
+public:
+ IncomingCallForm(void);
+ virtual ~IncomingCallForm(void);
+ //From BaseForm
+ virtual void Initialize(void);
+
+public:
+ virtual result OnInitializing(void);
+ virtual result OnTerminating(void);
+ virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+ virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
+
+ /**
+ * Called when the container needs to draw itself. @n
+ * Users can override this method to display user-specific drawings. @n
+ * This method is called after the container has drawn itself, but just before the container draws its child controls.
+ */
+ virtual result OnDraw(void);
+
+ // From 'ITableViewItemProvider' - Gets the total number of items in the specified group.
+ virtual int GetItemCount(void);
+ // From 'ITableViewItemProvider' - Creates the specified item.
+ virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int itemIndex, int itemWidth);
+ // From 'ITableViewItemProvider' - Deletes the specified item.
+ virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ // From 'ITableViewItemProvider' - Updates the specified item.
+ virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
+ // From 'ITableViewItemProvider' - Gets the default height of an item.
+ virtual int GetDefaultItemHeight(void);
+ //Handles call disconnect
+ void CallDisconnected(void);
+ // From 'ITableViewItemEventListener' - Called when the state of a TableViewItem in the TableView is changed.
+ virtual void OnTableViewItemStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status){};
+ // From 'ITableViewItemEventListener' - Called when the TableViewContextItem is opened or closed.
+ virtual void OnTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::TableView& tableView, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated){};
+ // From 'ITableViewItemEventListener' - Called when the item is reordered.
+ virtual void OnTableViewItemReordered(Tizen::Ui::Controls::TableView& tableView, int itemIndexFrom, int itemIndexTo){};
+
+ //From ITouchEventListener
+ virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+ virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo){};
+ virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {};
+ virtual void OnTouchLongPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {};
+ virtual void OnTouchDoublePressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {};
+ virtual void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+ virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
+ //From IOrientationEventListener
+ virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
+
+ //From IPopupEventListener
+ void OnItemSelected(int itemIndex);
+ //From IAppStateChangeListener
+ virtual void OnForeground(void);
+ virtual void OnBackground(void){};
+ virtual void OnScreenOff(void);
+
+private:
+ // Method to fetch person details using phone number.
+ void ShowPersonDetails(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& contactLblName, const Tizen::Base::String& nameLblName, AppCallInfo* pCallInfo);
+ // Method to show caller name for all calls.
+ void SetTextToLabel(const Tizen::Base::String& textToBeSet, const Tizen::Base::String& lblName);
+ // This function draws the caller's photo onto screen.
+ void ShowCallerPhoto(const Tizen::Graphics::Bitmap* pPhotoId);
+ //This function is used to show small Thumbnail size photo of caller.
+ void ShowCallersPhotoThumbnail(const Tizen::Graphics::Bitmap& pPhotoId);
+ // Method to show call duration/state(held) for call in progress
+ void ShowTimerInfo(const Tizen::Base::String& timerLblName, const Tizen::Base::String& textToBeDisplayed);
+ // Method to hide the "Reject with Message" panel
+ void HideRejectPanel(void);
+ // Method to create the Tableview to show the list of messages for the "Reject with Message" panel
+ void InitializeTableView(void);
+ // Method to create the canvas for the "Reject with Message" Button
+ void SetBitmapToRejectMessageButton(const Tizen::Base::String& btnName, const Tizen::Base::String& bgBitmap
+ , const Tizen::Base::String& arrowBitmap, const Tizen::Base::String& messageIconBitmap, bool isButtonInPanel, bool setButtonPressBitmap);
+ void HandleMultipleCallSelection(int itemIndex);
+ // Method to initialize footer
+ void InitializeFooter(void);
+ // Method to show footer
+ void ShowRejectMessageFooter(void);
+ // Method to hide footer
+ void HideRejectMessageFooter(void);
+ //Method used to show thumbnail image
+ void ShowThumbnailImage(const Tizen::Graphics::Bitmap* pPhotoId);
+ //Hides the rejetec message panel
+ void HideRejectMessagePanel(void);
+ //Shows reject message panel
+ void ShowRejectMessagePanel(void);
+ //sets reject message panel bounds
+ void SetRejectMessagePanelBounds(void);
+
+private:
+ //contact number for incoming call
+ Tizen::Base::String* __pActiveContactNo;
+ //Call Handle for the incoming call
+ int __incomingCallHandle;
+ //List for holding the rejectMessages from settings
+ Tizen::Base::Collection::IListT<Tizen::Base::String>* __pRejectMessageList;
+ bool __isAnswerCallStarted;
+ bool __isRejectCallStarted;
+ Tizen::Base::Collection::ArrayList* __pAcceptArrowLabelsList;
+ Tizen::Base::Collection::ArrayList* __pRejectArrowLabelsList;
+ Tizen::Graphics::Bitmap* __pRejectCircle;
+ Tizen::Graphics::Bitmap* __pAcceptCircle;
+ Tizen::Graphics::Bitmap* __pAcceptDial;
+ Tizen::Graphics::Bitmap* __pRejectDial;
+ Tizen::Graphics::Bitmap* __pAcceptArrow;
+ Tizen::Graphics::Bitmap* __pRejectArrow;
+ Tizen::Ui::Controls::Label* __pAcceptLabel; //for dial
+ Tizen::Ui::Controls::Label* __pRejectLabel;
+ Tizen::Ui::Controls::Label* __pAcceptArrowLabel;
+ Tizen::Ui::Controls::Label* __pRejectArrowLabel;
+ Tizen::Ui::Controls::Panel* __pCallHandlePanel;
+ Tizen::Ui::Animations::VisualElement* __pAcceptVisElem;
+ Tizen::Ui::Animations::VisualElement* __pRejectVisElem;
+ Tizen::Ui::Animations::VisualElement* __pRejectFinalVisElem;
+ Tizen::Ui::Animations::VisualElement* __pAcceptFinalVisElem;
+ Tizen::Ui::Animations::VisualElement* __pAcceptArrowVisElem;
+ Tizen::Ui::Animations::VisualElement* __pRejectArrowVisElem;
+ CallOptionPopup* __pOptionPopup;
+ Tizen::Ui::Controls::Label* __pSmallPhotoLabel;
+};
+
+#endif // _PHN_INCOMING_CALL_FORM_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallInfo.h
+ * @brief This is the header file for the %CallInfo class.
+ *
+ * This header file contains the declarations for %CallInfo class.
+ */
+#ifndef _PHN_CALL_INFO_H_
+#define _PHN_CALL_INFO_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+#include <FSclTypes.h>
+#include "CallTypes.h"
+
+/**
+ * @class CallInfo
+ * @brief This class holds information about currently active Single party,
+ * mutli-party or conference calls.
+ *
+ */
+class AppCallInfo
+ : public Tizen::Base::Object
+{
+public:
+ enum CallType
+ {
+ VOICE_CALL,
+ VIDEO_CALL, // Currently not supported
+ };
+
+public:
+ // Default Constructor.
+ AppCallInfo(void);
+ virtual ~AppCallInfo(void);
+
+ //returns if a call is conference call or not
+ bool IsConferenceCall(void);
+ //Sets the conferenceflag for a call
+ void SetConference(bool isConferenceCall);
+ //returns if a call is emergency call or not
+ bool IsEmergency(void);
+ //Sets if a call is emergency call
+ void SetEmergency(bool isEmergency);
+ //get the call Handle
+ Tizen::Base::Long* GetCallHandle(void);
+ //Set the call handle
+ void SetCallHandle(unsigned int handle);
+ //Get for Contact Number for the call
+ Tizen::Base::String& GetContactNumber(void);
+ //Set the contact number for the call
+ void SetContactNumber(Tizen::Base::String& contactNumber);
+ void ResetContactNumber(Tizen::Base::String* contactNumber);
+ void ResetContactInfo(const Tizen::Social::Contact* contact);
+ //Sets the contact info for the call
+ void SetContactInfo(const Tizen::Social::Contact& contact);
+ //returns contact info if present in contacts db
+ const Tizen::Social::Contact* GetContactInfo(void);
+ //returns if a call is held call or not
+ bool IsOnHold(void);
+ //Sets the held call for the call
+ void SetOnHold(bool onHold);
+ //get the connected time for the call
+ long long GetCallConnectTime(void);
+ //Sets the connected time when call started
+ void SetCallConnectTime(long long connectTime);
+ //Set the duration time wrt to call app time
+ void SetDurationTime(long long durationTime);
+ //get the notified / dialed time when call started
+ long long GetCallNotificationTime(void);
+ //Gets the duration wrt to callapp time
+ long long GetDurationTime(void);
+ //Sets the notified / dialed time when call started
+ void SetCallNotificationTime(long long callNotificationTime);
+ //gets the end call cause
+ Tizen::Base::String& GetEndCallCause(void);
+ //Sets the end call cause
+ void SetEndCallCause(Tizen::Base::String& pEndCause);
+ //gets the caller list for a conference call
+ Tizen::Base::Collection::IListT<AppCallInfo>* GetCallerList(void);
+ //Adds a call to conference call list
+ result AddCallToCallerList(AppCallInfo& callInfo);
+ //removes a call from the conference call list
+ result RemoveCallFromCallerList(int index);
+ //returns the number of calls in conference
+ int GetCallerListCount(void);
+ //sets the type of the call for the logs application
+ void SetCalllogType(CallLogType callLogType);
+ //returns the type of the call log
+ CallLogType GetCalllogType(void);
+ /**
+ * This is the equality operator for this CallInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ bool operator ==(const AppCallInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this CallInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ bool operator !=(const AppCallInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %CallInfo instance
+ */
+ AppCallInfo& operator =(const AppCallInfo& rhs);
+
+ // this funtion fetches the contact person's name.
+ Tizen::Base::String* FetchCallerNameN(void);
+ //Returns the latest Caller Name for a Number from address book
+ Tizen::Base::String* FetchLatestCallerNameN(const Tizen::Base::String& phoneNumber);
+ // this funtion fetches the contact person's photo id, if present.
+ Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
+ //Returns the latest Caller Photo for a Number from address book
+ Tizen::Graphics::Bitmap* FetchLatestCallerPhotoN(const Tizen::Base::String& phoneNumber);
+ //Returns the Contact Matched for the PhoneNumber from address book
+ Tizen::Social::Contact* FetchContactN(const Tizen::Base::String& phoneNumber);
+
+
+
+private:
+ bool __isConfCall;
+ CallType __callType;
+
+ ///Calllog type information like outgoing, incoming, missed call
+ CallLogType __calllogType;
+
+ //To uniquely identify both Single / Conf. Call.
+ Tizen::Base::Long* __pCallHandle;
+
+ bool __isEmergency;
+
+ //applicable only for Single Call
+ Tizen::Base::String __contactNumber;
+
+ //call is held
+ bool __isOnHold;
+
+ //system time when call connected
+ long long __callConnectTime;
+
+ long long __durationTime;
+
+ //system time when the call was notified / dialed
+ long long __callNotificationTime;
+
+ //end call cause
+ Tizen::Base::String* __pEndCallCause;
+
+ //callHandles for individual callers in conf. calls
+ Tizen::Base::Collection::ArrayListT<AppCallInfo>* __pParticipantCallHandles;
+
+ //used to store previously fetched contact.
+ Tizen::Social::Contact* __pContact;
+ // having the address book here
+ Tizen::Social::Addressbook* __pAddressBook;
+};
+
+#endif // _PHN_CALL_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallOptionPopup.h
+ * @brief This is the header file for the %CallOptionPopup class.
+ *
+ * This header file contains the declarations for %CallOptionPopup class.
+ */
+#ifndef _PHN_CALL_OPTION_POPUP_H_
+#define _PHN_CALL_OPTION_POPUP_H_
+
+#include <FApp.h>
+#include <FUi.h>
+
+#include "CallIPopupItemSelectListener.h"
+#include "CallPresentationModel.h"
+#include "CallTypes.h"
+
+/**
+ * @class CallOptionPopup
+ * @brief This class presents a Popup based UI and functionality for popup
+ * shown for incoming call scenarios.
+ *
+ */
+class CallOptionPopup
+ : public Tizen::Ui::Controls::Popup
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+ , public Tizen::Ui::IPropagatedKeyEventListener
+{
+
+public:
+ CallOptionPopup(IPopupItemSelectListener& listener, CallPresentationModel& callPresenter);
+ virtual ~CallOptionPopup(void);
+ result Initialize(void);
+ // IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){};
+ //IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+ // From IActionEventListener
+ void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+ //IPropagatedKeyEventListener
+ virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
+ virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
+ virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
+ virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
+
+private:
+ result ConstructListData(void);
+
+private:
+ Tizen::Base::Collection::ArrayList* __pOptionsList;
+ IPopupItemSelectListener& __popupListener;
+ CallPresentationModel& __callPresenter;
+};
+
+#endif // _PHN_CALL_OPTION_POPUP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallPanelFactory.h
+ * @brief This is the header file for the %PanelFactory class.
+ *
+ * This header file contains the declarations for %PanelFactory class.
+ */
+#ifndef _PHN_PANEL_FACTORY_H_
+#define _PHN_PANEL_FACTORY_H_
+
+#include <FUi.h>
+
+extern const wchar_t* PANEL_DIALER;
+extern const wchar_t* PANEL_LOGS;
+
+/**
+ * @class PanelFactory
+ * @brief This class provides the Panel factory for Dial application
+ *
+ */
+class PanelFactory
+ : public Tizen::Ui::Scenes::IPanelFactory
+{
+public:
+ PanelFactory(void);
+ virtual ~PanelFactory(void);
+
+ virtual Tizen::Ui::Controls::Panel* CreatePanelN(const Tizen::Base::String& panelId, const Tizen::Ui::Scenes::SceneId& sceneId);
+};
+
+#endif // _PHN_PANEL_FACTORY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallPhoneFormFactory.h
+ * @brief This is the header file for the %FormFactory class.
+ *
+ * This header file contains the declarations for %FormFactory class.
+ */
+#ifndef _PHN_PHONE_FORM_FACTORY_H_
+#define _PHN_PHONE_FORM_FACTORY_H_
+
+#include <FUi.h>
+#include "CallBaseForm.h"
+
+//Corresponding Call form name
+extern const wchar_t* IDL_FORM_OUTCALL;
+extern const wchar_t* IDL_FORM_OUT_EMERGENCYCALL;
+extern const wchar_t* IDL_FORM_INCOMINGCALL;
+extern const wchar_t* IDL_FORM_ACTIVECALL;
+extern const wchar_t* IDL_FORM_ACTIVE_EMERGENCYCALL;
+extern const wchar_t* IDL_FORM_CONFCALL;
+extern const wchar_t* IDL_FORM_CONFCALLLIST;
+extern const wchar_t* IDL_FORM_ENDCALL;
+extern const wchar_t* IDL_FORM_MULTIPLEACTIVECALL;
+//Corresponding Settings form name
+extern const wchar_t* IDL_FORM_SETTINGS_PREFIX;
+extern const wchar_t* IDL_FORM_MAIN_SETTING_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDL_FORM_SPEED_DIAL;
+extern const wchar_t* IDL_FORM_MORE_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_STATUSTONES;
+extern const wchar_t* IDL_FORM_CALLTYPE_FORWARD;
+extern const wchar_t* IDL_FORM_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDL_FORM_CALLTYPE_BARRING;
+extern const wchar_t* IDL_FORM_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDL_FORM_ADD_REJECT_NUMBER;
+extern const wchar_t* IDL_FORM_AUTO_AREA_CODE;
+extern const wchar_t* IDL_FORM_ADD_REJECT_MSG;
+extern const wchar_t* IDL_FORM_EDIT_REJECT_MSG;
+extern const wchar_t* IDL_FORM_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDL_FORM_DEL_NUMBER;
+extern const wchar_t* IDL_FORM_DEL_MESSAGE;
+//Dialer & Call Log Form names
+extern const wchar_t* IDL_FORM_DIAL_APP;
+extern const wchar_t* IDL_FORM_CALL_LOG_DETAIL;
+
+/**
+ * @class FormFactory
+ * @brief This class presents a form factory functionality for all forms.
+ *
+ */
+class FormFactory
+ : public Tizen::Ui::Scenes::IFormFactory
+{
+public:
+ FormFactory(void);
+ virtual ~FormFactory(void);
+
+ //Factory Method from IFormFactory
+ virtual Tizen::Ui::Controls::Form* CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
+
+private:
+ //Used to create forms related to Voice Call module
+ Tizen::Ui::Controls::Form* CreateVoiceCallForm(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId);
+};
+
+#endif // _PHN_PHONE_FORM_FACTORY_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnCallPresentationModel.h
+ * @brief This is the header file for the %CallPresentationModel class.
+ *
+ * This header file contains the declarations for %CallPresentationModel class.
+ */
+#ifndef _PHN_CALL_PRESENTATION_MODEL_H_
+#define _PHN_CALL_PRESENTATION_MODEL_H_
+
+#include <FApp.h>
+#include <FTelephony.h>
+#include <FMessaging.h>
+#include "CallAppControlRequestMgr.h"
+#include "CallTypes.h"
+#include "CallITelephonyEventListener.h"
+#include "CalllogManager.h"
+
+class AppCallInfo;
+class TelephonyManager;
+class SettingsPresentationModel;
+
+/**
+ * @class CallPresentationModel
+ * @brief CallPresentationModel is Singleton class and acts as interface between
+ * events from other managers and all the views.
+ *
+ */
+class CallPresentationModel: public ITelephonyEventListener
+ , public Tizen::App::IAppControlResponseListener
+ , public Tizen::Telephony::ITelephonyNetworkEventListener
+ , public Tizen::Telephony::ITelephonySimEventListener
+ , public Tizen::Messaging::ISmsListener
+{
+public:
+ //create a singleton instance
+ static CallPresentationModel* GetInstance(void);
+
+private:
+ CallPresentationModel(void);
+ CallPresentationModel(CallPresentationModel& presentor);
+ virtual ~CallPresentationModel(void);
+ CallPresentationModel& operator =(const CallPresentationModel& presentor);
+
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+ //gets the sim info
+ result GetSimInfo(void);
+ //Used to check if sim is available
+ bool IsSimAvailable(void);
+ bool IfNumberEndsWithHash(Tizen::Base::String& contactNumber);
+
+public:
+ //set the telephony event listener
+ void SetTelEventListener(ITelephonyEventListener* pTelEventListener);
+
+ //Dial an outgoing call
+ void DialCall(Tizen::Base::String& contactNumber, bool isEmergency);
+ //End the call
+ void EndActiveCall(Tizen::Base::Long callHandle);
+ void EndDialingCall(Tizen::Base::String& contactNumber);
+ //End the conference call
+ bool EndConferenceCall(void);
+ //Ends all active calls
+ void EndAllCall(void);
+ /**
+ * Hold the call.
+ * @returns true if successful.
+ */
+ bool HoldCall(Tizen::Base::Long callHandle);
+ /**
+ * Unhold the call.
+ * @returns true if successful.
+ */
+ bool UnHoldCall(Tizen::Base::Long callHandle);
+ //Hold conference call
+ bool HoldConferenceCall(void);
+ //UnHold conference call
+ bool ActivateConferenceCall(void);
+ //Join active and held call to conference call.
+ void JoinCall(void);
+ //Swap between active and held call
+ void SwapCalls(void);
+ //Mute or Unmute Call
+ bool SetMuteStatus(bool setMute);
+ //Get the call Muted status
+ bool IsCallMuted(void);
+ //Set speaker to On or Off mode.
+ bool SetSpeakerStatus(bool setSpeaker);
+ //Get the speaker status
+ bool IsSpeakerOn(void);
+ //Send DTMF strings
+ void SendDTMFSignal(Tizen::Base::String& textToBeSent);
+ //Function to get the conference call info
+ AppCallInfo* GetConferenceCallInfoN(void);
+ //Split this call from the conference call
+ bool SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, Tizen::Base::Collection::IListT<AppCallInfo>* pConfCallList);
+ //End this single call from the conference call
+ void EndCallFromConference(EndConfCallerCmdIds endCallerCmdId, Tizen::Base::Collection::IListT<AppCallInfo>* pConfCallList);
+ //returns true, if split operation is allowed. Else, returns false.
+ bool IsSplitAllowed(void);
+ //Accept the incoming call as per the options
+ void AcceptIncomingCall(CallAnsweringOptions answerOptions,int callHandle);
+ //Reject an incoming call and send message, if required.
+ bool RejectCall(int callHandle, bool sendMsg, const Tizen::Base::String& contactNumber);
+ //Function used to add call
+ void AddCall(const Tizen::Base::String& phoneNumber);
+ //Get the current call count
+ int GetCurrentCallCount(void);
+ //Get the current call list
+ Tizen::Base::Collection::IListT<AppCallInfo>* GetCallListN(void);
+ //Check if modem and sim initialization is complete.
+ bool CheckSimInitializationIsCompleted();
+ //This function returns true, if contact number is emergency no.
+ bool IsEmergencyNumber(const Tizen::Base::String& phoneNumber, bool isSimInitialized);
+ //Resume the alert when there is an incoming call and the already active call is disconnected
+ void ResumeAlert(AppCallInfo& incomingCallInfo);
+ //Start the alert in case of incoming call
+ void StartAlert(AppCallInfo& incomingCallInfo);
+ //Stop the alert in case of incoming call
+ void StopAlert(void);
+ //returns the incoming call handle
+ AppCallInfo* GetIncomingCallHandle();
+ //Gets the contact for the given phonenumber.returns null if not present.
+ Tizen::Social::Contact* GetContactN(const Tizen::Base::String& phoneNumber);
+ //Fetch the incoming call details.
+ AppCallInfo* FetchIncomingCallDetailsN(const Tizen::Base::String& callHandle, const Tizen::Base::String& contactNumber);
+ //Function is used to auto reject the call based on call settings and return true, if rejected.
+ bool CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo);
+ //Launch dial appcontrol for add call senario
+ void LaunchDialAppControl();
+ //Used to check if Join button should be enabled or not
+ bool IsEnableJoinCallButton(void);
+ //Used to check if incomig call is present
+ bool IsIncomingorDialingCallPresent(void);
+ bool IsIncomingCallPresent(void);
+ //Used to launch Messaging AppControl to compose message.
+ bool LaunchComposeMessageAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
+ //Used to make "ViewContact" AppControl request.
+ bool LaunchViewContactAppControl(Tizen::Base::String& contactId, Tizen::App::IAppControlResponseListener* pListener);
+ //Used to make "AddContact" AppControl request.
+ bool LaunchAddContactAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener);
+ //Used to check if there is any AppControl request in progress.
+ bool IsAppControlRunning(void);
+ //Used to abort any running AppControl request.
+ void AbortAppControlRequest(void);
+ //Used to complete any running AppControl request.
+ void AppControlRequestCompleted(void);
+ //Used to send message
+ void SendMessage(Tizen::Base::String& strMsg,Tizen::Base::String& recpientNum);
+ //Used to show sms error
+ void ShowSMSErrorNotification(void);
+ //Checks if message sending is in progress
+ bool IsMessageSendingInProgress(void);
+
+ //Event Listener methods from ITelephonyEventListener
+ virtual void HandleCallConnected(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleConferenceCall(AppCallInfo& pCallInfo);
+ virtual void HandleIncomingCall(AppCallInfo& pCallInfo);
+ virtual void HandleCallSwapOccured(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList);
+ virtual void HandleConfCallHoldOccured(bool success);
+ virtual void HandleConfCallActiveOccured(bool success);
+ virtual void HandleConferenceChange(void);
+ virtual void HandleTelephonyError(int errorCode);
+ virtual void HandleCallHeld(bool isHeld);
+ virtual void HandleCallActive(bool isActive);
+ //From IAppControlResponseListener
+ virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
+ virtual void OnAppForeground(void);
+ virtual void OnTelephonyNetworkStatusChanged(const Tizen::Telephony::NetworkStatus& networkStatus);
+ virtual void OnTelephonySimStateChanged(Tizen::Telephony::SimState state);
+ virtual void OnSmsMessageSent(result r);
+
+private:
+ static CallPresentationModel* __pInstance;
+ //to forward telephony events
+ ITelephonyEventListener* __pTelEventListener;
+ TelephonyManager* __pTelephonyMgr;
+ SettingsPresentationModel* __pSettingsPresentor;
+ // This is only to save PhoneApp from closing when only 1 incoming call is present and
+ // incoming call is rejected with "Reject With message" by opening Msg AppControl.
+ bool __isMessageAppControlRunning;
+ bool __isDialAppControlRunning;
+ bool __isMessageSendInProgress;
+ //Used to manage AppControl requests.
+ CallAppControlRequestMgr* __pAppControlMgr;
+ Tizen::Telephony::NetworkManager* __pNetworkManager;
+ Tizen::Telephony::SimStateManager* __psimStateManager;
+ Tizen::Telephony::SimInfo* __psimInfo;
+ Tizen::Messaging::SmsManager* __pSmsManager;
+ Tizen::Shell::NotificationManager* __pNotificationManager;
+};
+
+#endif // _PHN_CALL_PRESENTATION_MODEL_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallRejectInfo.h
+ * @brief This is the header file for the %CallRejectInfo class.
+ *
+ * This header file contains the declarations for %CallRejectInfo class.
+ */
+#ifndef _PHN_CALL_REJECT_INFO_H_
+#define _PHN_CALL_REJECT_INFO_H_
+
+#include <FBase.h>
+#include "CallSettingsConstants.h"
+
+/**
+ * @class CallRejectInfo
+ * @brief This class holds information about currently active Single party calls.
+ *
+ */
+class CallRejectInfo
+ : public Tizen::Base::Object
+{
+
+public:
+ // Default Constructor
+ CallRejectInfo(void);
+ virtual ~CallRejectInfo(void);
+ /**
+ * This is the equality operator for this CallRejectInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ bool operator ==(const CallRejectInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this CallRejectInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ bool operator !=(const CallRejectInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %CallRejectInfo instance
+ */
+ CallRejectInfo& operator =(const CallRejectInfo& rhs);
+
+public:
+ int rowId;
+ Tizen::Base::String phoneNumber;
+ CallRejectMatchCondition rejectCondition;
+ bool isActivated;
+};
+
+#endif // _PHN_CALL_REJECT_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSceneRegister.h
+ * @brief This is the header file for the %SceneRegister class.
+ *
+ * This header file contains the declarations for %SceneRegister class.
+ */
+#ifndef _PHN_SCENE_REGISTER_H_
+#define _PHN_SCENE_REGISTER_H_
+
+//Constants - Call Scene name
+extern const wchar_t* IDSCN_SCENE_OUTCALL;
+extern const wchar_t* IDSCN_SCENE_OUT_EMERGENCYCALL;
+extern const wchar_t* IDSCN_SCENE_INCOMINGCALL;
+extern const wchar_t* IDSCN_SCENE_ACTIVECALL;
+extern const wchar_t* IDSCN_SCENE_ACTIVE_EMERGENCYCALL;
+extern const wchar_t* IDSCN_SCENE_CONFCALL;
+extern const wchar_t* IDSCN_SCENE_CONFCALLLIST;
+extern const wchar_t* IDSCN_SCENE_ENDCALL;
+extern const wchar_t* IDSCN_SCENE_MULTIPLEACTIVECALL;
+//Settings Scene name
+extern const wchar_t* IDSCN_SCENE_MAIN_SETTING_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDSCN_SCENE_SPEED_DIAL;
+extern const wchar_t* IDSCN_SCENE_MORE_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_STATUSTONES;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_FORWARD;
+extern const wchar_t* IDSCN_SCENE_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_BARRING;
+extern const wchar_t* IDSCN_SCENE_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_NUMBER;
+extern const wchar_t* IDSCN_SCENE_AUTO_AREA_CODE;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_EDIT_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDSCN_SCENE_DEL_NUMBER;
+extern const wchar_t* IDSCN_SCENE_DEL_MESSAGE;
+//Dialer & Call Log Scene names
+extern const wchar_t* IDSCN_DIALER;
+extern const wchar_t* IDSCN_CALL_LOG;
+extern const wchar_t* IDSCN_CALL_LOG_DETAILS;
+
+/**
+ * @class SceneRegister
+ * @brief This class presents function to register all scenes.
+ *
+ */
+class SceneRegister
+{
+public:
+ SceneRegister(void);
+ ~SceneRegister(void);
+
+ //This function is used to register all scenes.
+ static result RegisterAllScenes(void);
+};
+
+#endif // _PHN_SCENE_REGISTER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingDataService.h
+ * @brief This is the header file for the %CallSettingDataService class.
+ *
+ * This header file contains the declarations for %CallSettingDataService class.
+ */
+#ifndef _PHN_CALL_SETTING_DATA_SERVICE_H_
+#define _PHN_CALL_SETTING_DATA_SERVICE_H_
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FIo.h>
+#include "CallRejectInfo.h"
+#include "CallSpeedDialInfo.h"
+
+/**
+ * @class CallSettingDataService
+ * @brief This class providing database service APIS to CallRejectInfo Application forms
+ *
+ */
+class CallSettingDataService
+{
+public:
+ /**
+ * Creates an instance of its own.
+ * creates CallSettingDataService(singleton) if it does not exist else returns the existing form
+ */
+ static CallSettingDataService* CreateInstance(void);
+
+ virtual ~CallSettingDataService(void);
+
+ ///Opens the Database.
+ /**
+ * Only one Database is maintained. Its name is hardcoded.
+ * It is assumed that OpenDB is called once while starting the application and CloseDB is called once while closing application.
+ */
+ result OpenDatabase(void);
+
+ ///Closes the Database
+ result CloseDatabase(void);
+
+ ///Creates a database table to store CallRejectInfo information
+ result CreateCallRejectTableDatabase(void);
+ ///Creates a database table to store SpeedDial information
+ result CreateSpeedDialTableDatabase(void);
+ ///Searches for a keyword in the CallRejectInfo Contents from Database
+ /**
+ * @param search keyword
+ * @param Linked list to store the result of the search
+ */
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+
+private:
+ /**
+ * Constructor
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService(void);
+
+ /**
+ * Copy constructor
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService(const CallSettingDataService& dataService);
+
+ /**
+ * Operator =
+ * made private as CallSettingDataService a singleton.
+ */
+ CallSettingDataService& operator =(const CallSettingDataService& dataService);
+
+ //checks if the condition is applicable for the passed phoneNumber
+ bool CheckRejectCondition(Tizen::Base::String& phoneNumber, CallRejectInfo& callRejectInfo);
+
+ ///singleton CallSettingDataService object
+ static CallSettingDataService* __pCallSettingDataService;
+
+ /// Database object
+ /**
+ * Its made static as we need only one instance of it across different CallSettingDataService object calls.
+ * Its created while calling OpenDB and distructed while calling CloseDB.
+ */
+ static Tizen::Io::Database* __pDatabase;
+
+ ///name of the database
+ const Tizen::Base::String __strDbName;
+
+ /// an Enumerator used to iterate through the results of a database query.
+ Tizen::Io::DbEnumerator* __pEnum;
+
+ /// Used to create and execute database statements(queries)
+ Tizen::Io::DbStatement* __pStmt;
+};
+
+#endif /* _PHN_CALL_SETTING_DATA_SERVICE_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsConstants.h
+ * @brief This is the header file for providing common constants across application.
+ *
+ */
+#ifndef _PHN_SETTINGS_CONSTANTS_H_
+#define _PHN_SETTINGS_CONSTANTS_H_
+
+#include <FBase.h>
+#include <FMedia.h>
+#include <FGraphics.h>
+
+
+enum CallForwardCondition
+{
+ CALL_FORWARD_ALL, /* Forward All Calls */
+ CALL_FORWARD_BUSY, /* Forward if Busy */
+ CALL_FORWARD_NO_REPLY, /* Forward if No Reply */
+ CALL_FORWARD_NOT_REACHABLE /* Forward if Not Reachable */
+};
+
+enum CallBarringType
+{
+ CALL_BARRING_ALL_OUTGOING, /* Barring All Outgoing Calls */
+ CALL_BARRING_INTERNATIONAL_OUTGOING, /* Barring Outgoing International Calls */
+ CALL_BARRING_INTERNATIONAL_EXCEPT_HOME, /* Barring Outgoing International Calls except to Home Country */
+ CALL_BARRING_ALL_INCOMING, /* Barring All Incoming Calls */
+ CALL_BARRING_INCOMING_ROAMING /* Barring Incoming Calls when roam*/
+};
+
+
+
+enum CallRejectMatchCondition
+{
+ CALL_REJECT_MATCH_EXACTLY = 1,
+ CALL_REJECT_MATCH_START,
+ CALL_REJECT_MATCH_END,
+ CALL_REJECT_MATCH_INCLUDE,
+};
+
+enum CallState
+{
+ /** No call connected */
+ CALL_STATE_CALL_OFF = 0,
+ /** Voice call is connecting */
+ CALL_STATE_CALL_VOICE_CONNECTING,
+ /** Voice call is connected */
+ CALL_STATE_CALL_VOICE_ACTIVE,
+ /** Video call is connecting */
+ CALL_STATE_CALL_VIDEO_CONNECTING,
+ /** Video call is connecting */
+ CALL_STATE_CALL_VIDEO_ACTIVE,
+
+ CALL_STATE_MAX
+
+};
+
+//Settings UI contants
+// Colors used in List views //
+extern const unsigned int COLOR_GROUP_ITEM_BG;
+extern const unsigned int COLOR_LIST_MENU_ITEM;
+extern const unsigned int COLOR_SECONDDEPTH_ITEM_BG;
+extern const unsigned int COLOR_HELP_ITEM_BG;
+extern const unsigned int COLOR_NORMAL_MAIN_TXT;
+extern const unsigned int COLOR_NORMAL_SUB_TXT;
+extern const unsigned int COLOR_PRESS_SUB_TXT;
+extern const unsigned int COLOR_PRESS_MAIN_TXT;
+extern const unsigned int COLOR_HELP_TXT;
+extern const unsigned int COLOR_LEFT_HEADER_EXPAND_ITEMS;
+//Main List Option text
+extern const unsigned int COLOR_MAIN_TXT;
+//Main List text
+extern const int FONT_SIZE_SUB_TXT;
+//Help text
+extern const int FONT_SIZE_HELP_TXT;
+extern const int W_HDR_FTR_ICON;
+extern const int H_HDR_FTR_ICON;
+//Processing Animation constants
+extern const int IDI_ANIM_DURATION;
+extern const int IDI_ANIM_PROGRESS_COUNT;
+//Delete List
+extern const unsigned int COLOR_NORMAL_ITEM_BG;
+extern const unsigned int COLOR_PRESS_ITEM_BG;
+extern const unsigned int COLOR_SELECTALL_ITEM_BG;
+
+// Dimensions used in List views //
+// menu item height
+extern const int H_LIST_HIDDENGROUP_ITEM;
+extern const int H_LIST_NORMAL_MENU_ITEM;
+extern const int H_LIST_DROPDOWN_MENU_ITEM;
+extern const int H_LIST_MENU_SINGLELINE_HLPTXT_ITEM;
+//text item height
+extern const int H_LIST_NORMAL_TXT_ITEM;
+extern const int H_LIST_SUB_TXT_ITEM;
+//Two line text for Drop down menu item
+extern const int H_LIST_DROPDOWN_TXT_ITEM;
+//single line text
+extern const int X_LIST_MENU_TEXT_ITEM;
+extern const int Y_LIST_MENU_TEXT_ITEM;
+//Help text
+extern const int X_LIST_MENU_HLPTXT_ITEM;
+extern const int Y_LIST_MENU_HLPTXT_ITEM;
+//custom Item for Bg line
+extern const int Y_CUSTOM_BG_ELEMENT;
+//Position for delete list item
+extern const int X_DEL_LIST_ELEMENT;
+extern const int Y_DEL_LIST_ELEMENT;
+
+// Dimensions for icons //
+//Expand icon for DropDown Menu Items
+extern const int W_EXPAND_ICON;
+extern const int H_EXPAND_ICON;
+extern const int W_SLIDER_ICON;
+extern const int H_SLIDER_ICON;
+//Dimensions for custom bg line
+extern const int W_CUSTOM_BG_ELEMENT;
+//Item Width for delete list
+extern const int W_DELETE_LIST_ITEM;
+//Width of Blue Header Rectangle for expandable group items
+extern const int W_LEFT_HEADER_EXPAND_ITEMS;
+
+
+
+
+#endif // _PHN_SETTINGS_CONSTANTS_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsManager.h
+ * @brief This is the header file for the %SettingsManager class.
+ *
+ * This header file contains the declarations for %SettingsManager class.
+ */
+#ifndef _PHN_SETTINGS_MANAGER_H_
+#define _PHN_SETTINGS_MANAGER_H_
+
+#include <FBase.h>
+#include <FIo.h>
+#include <FSocial.h>
+#include <FSysSettingInfo.h>
+#include "ITapiCall.h"
+#include "ITapiSs.h"
+#include "tapi_common.h"
+#include "TapiUtility.h"
+#include "TelCall.h"
+#include "TelSs.h"
+#include "vconf.h"
+#include "CallRejectInfo.h"
+#include "CallISettingsEventListener.h"
+#include "CallSettingsConstants.h"
+#include "CallSettingDataService.h"
+
+/**
+ * @class SettingsManager
+ * @brief This class provides functionality to set and fetch settings related to voice call, e.g. Call barring,
+ * call forwarding, etc.
+ */
+class SettingsManager
+: public Tizen::System::ISettingEventListener
+{
+public:
+ //create a singleton instance
+ static SettingsManager* GetInstance(void);
+
+private:
+ //constructor
+ SettingsManager(void);
+ SettingsManager(SettingsManager& manager);
+ SettingsManager& operator =(const SettingsManager& manager);
+
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+
+public:
+ // Add the observer for setting events
+ void AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ //remove the observer for setting events
+ void RemoveSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ // Get the reject message list
+ Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
+ // Get the reject "unknown" status
+ bool GetUnknownRejectStatus(void);
+ // checks if the call is to be rejected
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+
+ result SetCallState(CallState callState);
+
+ void AddSystemEventListener(void);
+
+ void RemoveSystemEventListener(void);
+
+ virtual void OnSettingChanged(Tizen::Base::String& key);
+
+ bool GetFlightModeStatus(void);
+
+private:
+
+ enum ForwardResponseType
+ {
+ SET_CALLFORWARD_RESPONSE,
+ GET_CALLFORWARD_RESPONSE,
+ };
+ enum BarringResponseType
+ {
+ SET_CALLBARRING_RESPONSE,
+ GET_CALLBARRING_RESPONSE,
+ };
+ enum WaitingResponseType
+ {
+ SET_CALLWAITING_RESPONSE,
+ GET_CALLWAITING_RESPONSE,
+ };
+private:
+ virtual ~SettingsManager(void);
+ //notify event listeners for Setting or Getting Call Forwarding status events.
+ void NotifyForwardingEventListeners(ForwardResponseType responseType, bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
+ //notify event listeners for Setting or Getting Call Barring status events.
+ void NotifyBarringEventListeners(BarringResponseType responseType, bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
+ //notify event listeners for Setting or Getting Call Waiting status events.
+ void NotifyWaitingEventListeners(WaitingResponseType responseType, bool isCallSuccessful, bool isCallWaitingActivated);
+
+private:
+ static SettingsManager* __pInstance;
+ //handle to Telephony API
+ TapiHandle* __pTapiHandle;
+ Tizen::Base::Collection::ArrayListT<ISettingsEventListener*>* __pSettingsEventListener;
+ CallSettingDataService* __pCallSettingDataService;
+};
+
+#endif // _PHN_SETTINGS_MANAGER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsPresentationModel.h
+ * @brief This is the header file for the %SettingsPresentationModel class.
+ *
+ * This header file contains the declarations for %SettingsPresentationModel class.
+ */
+#ifndef _PHN_SETTINGS_PRESENTATION_MODEL_H_
+#define _PHN_SETTINGS_PRESENTATION_MODEL_H_
+
+#include <FSocial.h>
+#include "CallISettingsEventListener.h"
+
+class SettingsManager;
+class CallRejectInfo;
+class SpeedDialInfo;
+
+/**
+ * @class SettingsPresentationModel
+ * @brief This class provides data to settings forms and provides functions
+ * to interact with Settings manager.
+ *
+ */
+class SettingsPresentationModel: public ISettingsEventListener
+{
+public:
+ //create a singleton instance
+ static SettingsPresentationModel* GetInstance(void);
+
+private:
+ SettingsPresentationModel(void);
+ SettingsPresentationModel(SettingsPresentationModel& presentor);
+ virtual ~SettingsPresentationModel(void);
+ SettingsPresentationModel& operator =(const SettingsPresentationModel& presentor);
+
+ //perform 2nd phase initialization
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+
+public:
+ // Add the observer for setting events
+ result AddSettingEventListener(ISettingsEventListener* pSettingsEventListener);
+ //remove the observer for setting events
+ void RemoveSettingEventListener(void);
+ // Get the reject message list
+ Tizen::Base::Collection::IMapT<int,Tizen::Base::String>* GetRejectMessageListN(void);
+ // checks if the call is to be rejected
+ bool IsCallToBeRejected(Tizen::Base::String& phoneNumber);
+ //Sets the call state
+ result SetCallState(CallState callState);
+ //Get Flight mode status
+ bool GetFlightModeStatus(void);
+
+protected:
+ //From ISettingsEventListener
+ virtual void HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated);
+ virtual void HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled);
+ virtual void HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime);
+ virtual void HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime);
+ virtual void HandleGetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
+ virtual void HandleSetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated);
+ virtual void HandleFlightMode(bool isFlightModeActivated);
+
+private:
+ static SettingsPresentationModel* __pInstance;
+ //Owned. Is responsible for destroying the instance
+ SettingsManager* __pSettingsMgr;
+ ISettingsEventListener* __pSettingsEventListener;
+};
+
+#endif // _PHN_SETTINGS_PRESENTATION_MODEL_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSoundManager.h
+ * @brief This is the header file for the %SoundManager class.
+ *
+ * This header file contains the declarations for %SoundManager class.
+ */
+#ifndef _PHN_SOUND_MANAGER_H_
+#define _PHN_SOUND_MANAGER_H_
+
+#include <FBase.h>
+#include <FSystem.h>
+#include <FMedia.h>
+#include "ITapiCall.h"
+#include "sound_manager.h"
+#include "vconf.h"
+#include "vconf-keys.h"
+#include "CallTypes.h"
+
+using namespace Tizen::Base::Runtime;
+/**
+ * @class SoundManager
+ * @brief This class presents sound related functionality required in call module.
+ *
+ */
+enum CallAlertStatus
+{
+ CALL_ALERT_OFF = 0,
+ CALL_ALERT_SOUND,
+ CALL_ALERT_VIBRATE
+};
+class SoundManager
+ : public Tizen::Media::IPlayerEventListener
+ , public Tizen::Base::Runtime::ITimerEventListener
+{
+public:
+ SoundManager(void);
+ virtual ~SoundManager(void);
+ //start the sound manager session
+ result StartSession(void);
+ //Change the speaker status
+ result SetSpeakerStatus(bool setSpeaker);
+ //Set the sound mode for the call
+ result SetSoundMode(SoundMode soundMode);
+ void StartAlert(Tizen::Base::String& contactRingTone);
+ void ResumeAlert(Tizen::Base::String& contactRingTone);
+ void StopAlert(void);
+ //set connect tone
+ void SetConnectTone(void);
+ void SetMinuteReminderTone(void);
+ void SetDisconnectTone(void);
+ void SetWaitTone(void);
+ result StopSession(void);
+ Timer* GetTimer();
+ bool GetLastConferenceCall();
+ void SetlastEndedConferenceCall();
+ result SetSoundPath(bool bSpeaker=false);
+ static void HandleCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData){}
+
+protected:
+ virtual void OnPlayerOpened(result r);
+ virtual void OnPlayerEndOfClip(void);
+ virtual void OnPlayerSeekCompleted(result r);
+ virtual void OnPlayerBuffering(int percent);
+ virtual void OnPlayerErrorOccurred(Tizen::Media::PlayerErrorReason r);
+ virtual void OnPlayerInterrupted(void);
+ virtual void OnPlayerReleased(void);
+ virtual void OnTimerExpired(Timer& timer);
+
+private:
+ bool IsEarJackConnected(void);
+
+private:
+ //Sound manager handle
+ sound_call_session_h __pSoundCallSession;
+ //For notifying via vibrate during incoming call
+ Tizen::System::Vibrator* __pVibrator;
+ // Audio player
+ Tizen::Media::Player* __pPlayer;
+ Tizen::Media::Player* __pDisconnectPlayer;
+ Tizen::Media::Player* __pConnectPlayer;
+ Tizen::Media::Player* __pReminderPlayer;
+ Tizen::Media::Player* __pWaitingTonePlayer;
+ bool __isSoundStatusOn;
+ bool __isVibrateStatusOn;
+ Timer __timer;
+ bool __lastEndedConferenceCall;
+};
+
+#endif /* _PHN_SOUND_MANAGER_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSpeedDialInfo.h
+ * @brief This is the header file for the %SpeedDialInfo class.
+ *
+ * This header file contains the declarations for %SpeedDialInfo class.
+ */
+#ifndef _PHN_SPEED_DIAL_INFO_H_
+#define _PHN_SPEED_DIAL_INFO_H_
+
+#include <FBase.h>
+#include "CallSettingsConstants.h"
+
+/**
+ * @class SpeedDialInfo
+ * @brief This class holds information about speed dial mappings fetched/stored from database.
+ *
+ */
+class SpeedDialInfo
+ : public Tizen::Base::Object
+{
+
+public:
+ // Default Constructor
+ SpeedDialInfo(void);
+ virtual ~SpeedDialInfo(void);
+ /**
+ * This is the equality operator for this SpeedDialInfo.
+ * returns true, if both have same value for call handle.
+ *
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ bool operator ==(const SpeedDialInfo& rhs) const;
+
+ /**
+ * This is the InEquality operator for this SpeedDialInfo.
+ * returns true, if value for call handle is different.
+ *
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ bool operator !=(const SpeedDialInfo& rhs) const;
+
+ /**
+ * This is the assignment operator for this class.
+ * @param[in] rhs A reference to the %SpeedDialInfo instance
+ */
+ SpeedDialInfo& operator =(const SpeedDialInfo& rhs);
+
+public:
+ int rowId;
+ int keyMapping;
+ Tizen::Base::String contactId;
+};
+
+#endif // _PHN_SPEED_DIAL_INFO_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSpeedDialPopup.h
+ * @brief This is the header file for the %SpeedDialPopup class.
+ *
+ * This header file contains the declarations for %SpeedDialPopup class.
+ */
+#ifndef _PHN_SPEED_DIAL_POPUP_H_
+#define _PHN_SPEED_DIAL_POPUP_H_
+
+#include <FApp.h>
+#include <FUi.h>
+
+#include "CallIPopupItemSelectListener.h"
+
+/**
+ * @class SpeedDialPopup
+ * @brief This class provides popup messages in Speed dial settings form.
+ *
+ */
+class SpeedDialPopup
+ : public Tizen::Ui::Controls::Popup
+ , public Tizen::Ui::Controls::IListViewItemEventListener
+ , public Tizen::Ui::Controls::IListViewItemProvider
+ , public Tizen::Ui::IActionEventListener
+{
+
+public:
+ SpeedDialPopup(IPopupItemSelectListener& listener);
+ virtual ~SpeedDialPopup(void);
+ int Initialize(void);
+
+ // IListViewItemEventListener
+ virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
+ virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
+ virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
+ virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback);
+
+ //IListViewItemProvider
+ virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
+ virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
+ virtual int GetItemCount(void);
+
+ // From IActionEventListener
+ void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
+
+private:
+ void ConstructListData(void);
+
+private:
+ Tizen::Ui::Controls::Button* __pCancelButton;
+ IPopupItemSelectListener& __popupListener;
+ Tizen::Base::Collection::ArrayList* __pListItemArray;
+};
+
+#endif // _PHN_SPEED_DIAL_POPUP_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallTelephonyManager.h
+ * @brief This is the header file for the %TelephonyManager class.
+ *
+ * This header file contains the declarations for %TelephonyManager class.
+ */
+#ifndef _PHN_TELEPHONY_MANAGER_H_
+#define _PHN_TELEPHONY_MANAGER_H_
+
+#include <FBase.h>
+#include <FSocial.h>
+#include <FTelephony.h>
+#include "ITapiCall.h"
+#include "TapiUtility.h"
+#include "CallITelephonyEventListener.h"
+#include "CallSoundManager.h"
+#include "CalllogManager.h"
+
+class AppCallInfo;
+class SettingsManager;
+
+/**
+ * @class TelephonyManager
+ * @brief TelephonyManager is a singleton class used to intialize TAPI library.
+ * And register to telephony events, interact with TAPI library.
+ */
+class TelephonyManager
+: public Tizen::Telephony::ITelephonyNetworkEventListener
+{
+public:
+ //Get singleton instance
+ static TelephonyManager* GetInstance(ITelephonyEventListener* pEventListener);
+ //Function to initiate (dial) an outgoing call.
+ ErrorCodes SetupMoCall(Tizen::Base::String& contactNumber, bool isEmergency);
+ //Function to end a call
+ result EndActiveCall(Tizen::Base::Long callHandle);
+ result EndDialingCall(Tizen::Base::String& contactNumber);
+ //Function to accept/reject an incoming call
+ result AnswerCall(int callHandle, bool acceptCall);
+ //Auto Reject call
+ result AnswerAutoRejectCall(int callHandle);
+ //Function to accept call with the given options
+ result AcceptCall(CallAnsweringOptions answerOptions,int callHandle);
+ //Function to end a conference call
+ result EndConferenceCall(void);
+ //Function to hold/retrieve a conference call
+ result HoldConferenceCall(bool holdCall);
+ //Function to join active and held call to conference
+ result JoinCall(void);
+ //Function to hold/unhold the call
+ result HoldCall(Tizen::Base::Long callHandle, bool holdCall);
+ //Function to swap the active and held call
+ result SwapCalls(void);
+ //Function to send DTMF strings
+ result SendCallDTMF(Tizen::Base::String& textToBeSent);
+ //Function to end a single call from the conference
+ result EndFromConference(int callHandle);
+ //Function to split a single call from the conference
+ result SplitFromConference(int callHandle);
+ //Function to set the mute status
+ result SetMuteStatus(bool setMute);
+ //Function to get the mute Status
+ bool IsCallMuted(void);
+ //Function to set the speaker status
+ result SetSpeakerStatus(bool setSpeaker);
+ //Function to get the speaker status
+ bool IsSpeakerOn(void);
+ //Function to check if split operation is allowed from the conference
+ bool IsSplitAllowed(void);
+ //Function to get the conference call info
+ AppCallInfo* GetConferenceCallInfoN(void);
+ //Get the current call list
+ Tizen::Base::Collection::IListT<AppCallInfo>* GetCallListN(void);
+ //Get the current call count
+ int GetCurrentCallCount(void);
+ //Start the alert in case of incoming call
+ void StartAlert(AppCallInfo& incomingCallInfo);
+ //Resume the alert when there is an incoming call and the already active call is disconnected
+ void ResumeAlert(AppCallInfo& incomingCallInfo);
+ //returns the incoming call handle
+ AppCallInfo* GetIncomingCallHandle();
+ //Stop the alert in case of incoming call
+ void StopAlert(void);
+ //Main Callback function used while registering to TAPI
+ static void HandleCallback(TapiHandle* pHandle, const char* pNotiId, void* pData, void* pUserData);
+ //Dummy callback function used when nothing is to be done on response
+ static void HandleCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //Hold Callback
+ static void HandleHoldCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //Active Callback
+ static void HandleActiveCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //Hold Conference CallBack
+ static void HandleHoldConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //Active Conference CallBack
+ static void HandleActiveConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for dial operation
+ static void HandleDialCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for the join operation
+ static void HandleJoinCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for the reject call operation
+ static void HandleRejectCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for the swap calls operation
+ static void HandleSwapCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for the End from conference operation
+ static void HandleEndFromConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for the split from conference operation
+ static void HandleSplitFromConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //callback function for Ending conference call
+ static void HandleEndConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData);
+ //Called when bluetooth connection state changes
+ static void OnBluetoothStateChange(keynode_t *node, void *user_data);
+ //Check if MOCall is emergency number and returns true. Otherwise, false.
+ bool CheckIfMOCallIsEmergency(const Tizen::Base::String& contactNumber, bool isSimInitialized);
+ //Check is modem and sim are initialised successfully and MO call can be made.
+ result CheckIfMOCallIsPossible();
+ //Gets the contact for the given phonenumber.returns null if not present.
+ Tizen::Social::Contact* GetContactN(const Tizen::Base::String& phoneNumber);
+ //This function make a synchronus API call to TAPI to fetch active/waiting incoming calls.
+ AppCallInfo* FetchIncomingCallHandleN(const Tizen::Base::String& callHandle, const Tizen::Base::String& contactNumber);
+ //This callback function is called by TAPI each time for every single call.
+ static void HandleIncomingCallStatusCallBack(TelCallStatus_t* pCallStatus, void* pUserData);
+ //function used to process incoming call and decide whether to reject call based on call settings.
+ //Rejects the call and returns true, Else returns false.
+ bool CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo);
+ //End all active
+ void EndAllCalls(void);
+ //From ITelephonyNetworkEventListener
+ virtual void OnTelephonyNetworkStatusChanged(const Tizen::Telephony::NetworkStatus& networkStatus);
+ //Used to check if a call is in incoming or dialing state.
+ bool IsIncomingorDialingCallPresent(void);
+ bool IsIncomingCallPresent(void);
+ //Function to make out going call when hold is succesful on the active call
+ void CheckPendingDialCalls(int callBackResult);
+ TapiHandle* GetTapiHandle(void);
+ void SetSoundPath(void);
+
+protected:
+ //function to handle the idle callback(received when call is ended)
+ void HandleIdleCallBack(void* pData);
+ //function used to handle events for normal call disconnected.
+ bool HandleEndNormalActiveCall(AppCallInfo& endCallInfo);
+ //function to handle the active callback(received when call is connected)
+ void HandleActiveCallBack(void* pData);
+ //function to handle call connected successfully
+ void HandleCallConnected(unsigned int connectedCallHandle);
+ //function to handle the dial call callback
+ void HandleDialingCallBack(void* pData);
+ //function to handle ending of single participant in conference call.
+ bool HandleParticipantEndedFromConference(unsigned int participantCallHandle, AppCallInfo& conferenceCall);
+
+private:
+ //create a singleton instance
+ static void CreateInstance(ITelephonyEventListener* pEventListener);
+ //used to destroy 'TelephonyManager' instance at application exit.
+ static void DestroyInstance(void);
+ //private destructor
+ virtual ~TelephonyManager(void);
+ TelephonyManager(ITelephonyEventListener* pEventListener);
+ TelephonyManager(TelephonyManager& manager);
+ TelephonyManager& operator =(TelephonyManager& manager);
+ //perform 2nd phase initialisation
+ result Initialize(void);
+ //initialise the TAPI library
+ result InitializeTelephonyLibrary(void);
+ //register for the TAPI events
+ int RegisterEvents(void);
+ //unregister from the TAPI events
+ void UnregisterEvents(void);
+ //internal function to hold an active call
+ result HoldActiveCall(AppCallInfo* pActiveCallInfo, bool holdCall);
+ //internal function to make a call
+ result DialOutgoingCall(Tizen::Base::String& contactNumber, bool isEmergency);
+ //internal function to handle waiting call options when single call is present
+ result AcceptSecondCall(CallAnsweringOptions answerOptions, const int incomingCallHandle);
+ //internal function to handle waiting call options when multiple calls are present
+ result AcceptMultipleCall(CallAnsweringOptions answerOptions, const int incomingCallHandle);
+ //internal function to End Call
+ result EndCall(AppCallInfo& endCallInfo);
+ /**
+ * This function is internally used to fetch contact person details -
+ * display name & photo id from AddressBook for the given phone number.
+ *
+ * @param[in] phoneNumber - The substring of the phoneNumber to search
+ * @return E_SUCCESS, if found else E_FAILURE.
+ */
+ result FetchContactInfoForNumber(const Tizen::Base::String& phoneNumberStr);
+ //check if given contact number is valid and returns 'E_SUCCESS', else 'E_FAILURE'.
+ result CheckValidTelePhoneNumber(const Tizen::Base::String& contactNumber);
+ //Used to save ended call Log info to Logs database.
+ void SaveCallInfoToLogsDb(AppCallInfo& endCallInfo);
+
+private:
+ static TelephonyManager* __pManager;
+
+ //Outgoing call Info
+ AppCallInfo* __pDialedCall;
+ //Incoming call Info
+ AppCallInfo* __pIncomingCall;
+ //Active Calls - only 2 active calls at any time
+ //can hold both Single or Conf. Calls
+ //mapping of "Call handle" to "CallInfo"
+ Tizen::Base::Collection::HashMapT<long, AppCallInfo>* __pActiveCallList;
+
+ //Listener for telephony events
+ ITelephonyEventListener* __pEventListener;
+
+ SettingsManager* __pSettingsManager;
+
+ //handle to Telephony API
+ TapiHandle* __pTapiHandle;
+ //used to connect to Address Book APIs.
+ Tizen::Social::Addressbook* __pAddressBook;
+ //used to store previously fetched contact.
+ Tizen::Social::Contact* __pCachedContact;
+ Tizen::Social::Category __Category;
+ //mute status
+ bool __isMuted;
+ //Speaker Status
+ bool __isSpeakerOn;
+ SoundManager* __pSoundManager;
+ CallLogManager* __pCalllogMgr;
+ Tizen::Telephony::NetworkManager* __pNetworkManager;
+ //Hold call handling
+ bool __isDialCallPresentAfterHold;
+ Tizen::Base::String* __pDialNumberAfterHold;
+ bool __isDialNumberAfterHoldEmergency;
+};
+
+#endif // _PHN_TELEPHONY_MANAGER_H_
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallTypes.h
+ * @brief This is the header file provides common constants and enums used across application.
+ *
+ */
+#ifndef PHNTYPES_H_
+#define PHNTYPES_H_
+
+#include "CallCommonUtils.h"
+
+//bitmap
+extern const wchar_t* IDB_BTN_OPTION_BG_ICON ;
+extern const wchar_t* IDB_BTN_OPTION_PRESS_BG_ICON;
+extern const wchar_t* IDB_BTN_MORE_ICON ;
+extern const wchar_t* IDB_BTN_MORE_PRESS_ICON ;
+extern const wchar_t* IDB_POPUP_BUBBLE_ICON ;
+extern const wchar_t* IDB_DIALER_BTN_LINE_ICON;
+extern const wchar_t* IDB_DIALER_BTN_PRESS_ICON;
+extern const wchar_t* IDB_VOICEMAIL_BTN_ICON;
+extern const wchar_t* IDB_VOICEMAIL_BTN_PRESS_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE2_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE3_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE4_ICON;
+extern const wchar_t* IDB_DIALER_BTN_LINE5_ICON;
+extern const wchar_t* IDB_DIALER_STAR_ICON ;
+extern const wchar_t* IDB_DIALER_MUTE_ICON ;
+extern const wchar_t* IDB_DIALER_VIDEOCALL_ICON ;
+extern const wchar_t* IDB_DIALER_CALL_ICON ;
+extern const wchar_t* IDB_DIALER_CLEAR_ICON ;
+extern const wchar_t* IDB_DIALER_CALL_BG_ICON ;
+extern const wchar_t* IDB_HIDE_KEYPAD_ICON;
+extern const wchar_t* IDB_HIDE_KEYPAD_PRESS_ICON;
+extern const wchar_t* IDB_HIDE_KEYPAD_DIM_ICON;
+extern const wchar_t* IDB_CLOSE_KEYPAD_ICON;
+extern const wchar_t* IDB_CLOSE_KEYPAD_PRESS_ICON;
+extern const wchar_t* IDB_CLOSE_KEYPAD_DIM_ICON;
+extern const wchar_t* IDB_SPEAKER_ON_ICON;
+extern const wchar_t* IDB_SPEAKER_ON_PRESS_ICON;
+extern const wchar_t* IDB_SPEAKER_ON_DIM_ICON;
+extern const wchar_t* IDB_SPEAKER_OFF_ICON;
+extern const wchar_t* IDB_SPEAKER_OFF_PRESS_ICON;
+extern const wchar_t* IDB_SPEAKER_OFF_DIM_ICON;
+extern const wchar_t* IDB_MUTE_ON_ICON;
+extern const wchar_t* IDB_MUTE_ON_PRESS_ICON;
+extern const wchar_t* IDB_MUTE_ON_DIM_ICON;
+extern const wchar_t* IDB_MUTE_OFF_ICON;
+extern const wchar_t* IDB_MUTE_OFF_PRESS_ICON;
+extern const wchar_t* IDB_MUTE_OFF_DIM_ICON;
+extern const wchar_t* IDB_BACKGROUND_BITMAP;
+extern const wchar_t* IDB_VOICE_CALL_ICON;
+extern const wchar_t* IDB_VOICE_CALL_PRESS_ICON;
+extern const wchar_t* IDB_VOICE_CALL_DIM_ICON;
+extern const wchar_t* IDB_VIDEO_CALL_ICON;
+extern const wchar_t* IDB_VIDEO_CALL_PRESS_ICON;
+extern const wchar_t* IDB_VIDEO_CALL_DIM_ICON;
+extern const wchar_t* IDB_MESSAGE_ICON;
+extern const wchar_t* IDB_MESSAGE_PRESS_ICON;
+extern const wchar_t* IDB_MESSAGE_DIM_ICON;
+extern const wchar_t* IDB_END_CALL_ICON;
+extern const wchar_t* IDB_END_CALL_PRESS_ICON;
+extern const wchar_t* IDB_END_CALL_DIM_ICON;
+extern const wchar_t* IDB_ADD_CALL_ICON;
+extern const wchar_t* IDB_ADD_CALL_PRESS_ICON;
+extern const wchar_t* IDB_ADD_CALL_DIM_ICON;
+extern const wchar_t* IDB_JOIN_CALL_ICON;
+extern const wchar_t* IDB_JOIN_CALL_PRESS_ICON;
+extern const wchar_t* IDB_JOIN_CALL_DIM_ICON;
+extern const wchar_t* IDB_CONTACT_ICON;
+extern const wchar_t* IDB_CONTACT_PRESS_ICON;
+extern const wchar_t* IDB_CONTACT_DIM_ICON;
+extern const wchar_t* IDB_SWAP_ICON_NORMAL;
+extern const wchar_t* IDB_SWAP_ICON_PRESS;
+extern const wchar_t* IDB_POPUP_ARROW_ICON;
+extern const wchar_t* IDB_POPUP_BG_ICON;
+extern const wchar_t* IDB_MORE_MANAGE_CONFERENCE_ICON;
+extern const wchar_t* IDB_CONFERENCE_BG_ICON;
+extern const wchar_t* IDB_CONFERENCE_BIG_BG_ICON;
+extern const wchar_t* IDB_ACTIVE_CALL_DEFAULT_ICON;
+extern const wchar_t* IDB_MULTIPLE_CALL_DEFAULT_ICON;
+extern const wchar_t* IDB_KEYPAD_BG;
+extern const wchar_t* IDB_KEYPAD_BUTTON_PRESS;
+extern const wchar_t* IDB_KEYPAD_NUM1_ICON;
+extern const wchar_t* IDB_HOLD_NORMAL_BUTTON_ICON;
+extern const wchar_t* IDB_HOLD_PRESS_BUTTON_ICON;
+extern const wchar_t* IDB_UNHOLD_NORMAL_BUTTON_ICON;
+extern const wchar_t* IDB_UNHOLD_PRESS_BUTTON_ICON;
+extern const wchar_t* IDB_CALLOG_LIST_BG;
+extern const wchar_t* IDB_LOG_RECEIVEDCALL_ICON;
+extern const wchar_t* IDB_LOG_DIALEDCALL_ICON;
+extern const wchar_t* IDB_LOG_MISSEDCALL_ICON;
+extern const wchar_t* IDB_LOG_BLOCKEDCALL_ICON;
+extern const wchar_t* IDB_LOG_DETAIL_CALL_ICON;
+extern const wchar_t* IDB_LOG_DETAIL_MSG_ICON;
+extern const wchar_t* IDB_LOG_NO_CONTENT;
+extern const wchar_t* IDB_VIEW_CONTACT_ICON;
+extern const wchar_t* IDB_VIEW_CONTACT_PRESS_ICON;
+extern const wchar_t* IDB_VIEW_CONTACT_BG_ICON;
+extern const wchar_t* IDB_VIEW_CONTACT_BG_PRESS_ICON;
+extern const wchar_t* IDB_CALL_THUMBNAIL_BACKGROUND;
+extern const wchar_t* IDB_CALL_THUMBNAIL_SHADOW;
+
+
+
+//String messages
+extern const wchar_t* IDS_DIALER_MOBILE_STR;
+extern const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG;
+extern const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING;
+extern const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_CONTACT;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_SPEED_DIAL;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_PAUSE;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_ADD_WAIT;
+extern const wchar_t* IDS_DIALER_MENU_ITEM_EXIT;
+extern const wchar_t* IDS_SPEED_DIAL_SEARCH_KEY;
+extern const wchar_t* IDS_KEYPAD_BTN_NAME;
+extern const wchar_t* IDS_SPEAKER_BTN_NAME;
+extern const wchar_t* IDS_MUTE_BTN_NAME;
+extern const wchar_t* IDS_VOICE_CALL_BTN_NAME;
+extern const wchar_t* IDS_VIDEO_CALL_BTN_NAME;
+extern const wchar_t* IDS_MSG_BTN_NAME;
+extern const wchar_t* IDS_ENDCALL_BTN_NAME;
+extern const wchar_t* IDS_ADDCALL_BTN_NAME;
+extern const wchar_t* IDS_JOINCALL_BTN_NAME;
+extern const wchar_t* IDS_CONTACT_BTN_NAME;
+extern const wchar_t* IDS_HOLD_BTN_NAME;
+extern const wchar_t* IDS_UNHOLD_BTN_NAME;
+extern const wchar_t* IDS_PEOPLE_STR;
+extern const wchar_t* IDS_MGR_CONF_CALL_LIST_STR;
+extern const wchar_t* IDS_LOG_CONTEXT_CALL;
+extern const wchar_t* IDS_LOG_CONTEXT_MESSAGE;
+extern const wchar_t* IDS_LOG_CONTEXT_VIDEOCALL;
+extern const wchar_t* IDS_LOG_CONTEXT_DELETE;
+extern const wchar_t* IDS_AM_TIME;
+extern const wchar_t* IDS_PM_TIME;
+extern const wchar_t* IDS_CALLLOG_NO_NAME;
+extern const wchar_t* IDS_CALLLOG_NO_NUMBER;
+extern const wchar_t* IDS_CALLLOG_RECEIVED;
+extern const wchar_t* IDS_CALLLOG_MISSED;
+extern const wchar_t* IDS_CALLLOG_OUTGOING;
+extern const wchar_t* IDS_CALLLOG_RECEIVED_MSG;
+extern const wchar_t* IDS_CALLLOG_SENT_MSG;
+extern const wchar_t* IDS_CALLLOG_REJECTED;
+extern const wchar_t* IDS_CALLLOG_DELETE_FOOTER;
+extern const wchar_t* IDS_CALLLOG_CANCEL_FOOTER;
+extern const wchar_t* IDS_EMERGENCY_CALL;
+extern const wchar_t* IDS_SELECT_CALL_LOG ;
+extern const wchar_t* IDS_SELECTED_ITEM_STRING;
+extern const wchar_t* IDS_SELECTED_ITEMS_STRING;
+extern const wchar_t* IDS_SELECT_NUMBER;
+extern const wchar_t* IDS_NUMBER_SELECTED;
+extern const wchar_t* IDS_NUMBERS_SELECTED;
+extern const wchar_t* IDS_SELECT_MESSAGE;
+extern const wchar_t* IDS_MESSAGE_SELECTED;
+extern const wchar_t* IDS_MESSAGES_SELECTED;
+extern const wchar_t* IDS_NO_LOGS;
+extern const wchar_t* IDS_FLIGHT_MODE_ON;
+extern const wchar_t* IDS_ADD_TO_CONTACTS;
+extern const wchar_t* IDS_TIMER_ON_HOLD;
+extern const wchar_t* IDS_CANCEL;
+extern const wchar_t* IDS_LOGS_TODAY;
+extern const wchar_t* IDS_LOGS_YESTERDAY;
+extern const wchar_t* IDS_REJECT_MESSAGE_CREATE;
+extern const wchar_t* IDS_VIEW_CONTACT;
+extern const wchar_t* IDS_INVALID_NUMBER;
+extern const wchar_t* IDS_NUMBER_UNKNOWN;
+extern const wchar_t* IDS_USSD_NUMBER;
+extern const wchar_t* IDS_CONFERENCE_CALL_STRING;
+extern const wchar_t* IDS_CALL_REJECT_FROM_STRING;
+extern const wchar_t* IDS_CALL_REJECTED_TITLE_STRING;
+extern const wchar_t* IDS_MESSAGE_SENDING_FAILED;
+extern const wchar_t* IDS_LOW_MEMORY_MSG;
+extern const wchar_t* IDS_LOW_MEMORY_MSG_TITLE;
+extern const wchar_t* IDS_SERVICE_UNAVAILABLE;
+extern const wchar_t* IDS_CALL_BARRED;
+//Panel
+extern const wchar_t* PANEL_DIALER;
+extern const wchar_t* PANEL_LOGS;
+
+//Corresponding Call form name
+extern const wchar_t* IDL_FORM_OUTCALL;
+extern const wchar_t* IDL_FORM_OUT_EMERGENCYCALL;
+extern const wchar_t* IDL_FORM_INCOMINGCALL;
+extern const wchar_t* IDL_FORM_ACTIVECALL;
+extern const wchar_t* IDL_FORM_ACTIVE_EMERGENCYCALL;
+extern const wchar_t* IDL_FORM_CONFCALL;
+extern const wchar_t* IDL_FORM_CONFCALLLIST;
+extern const wchar_t* IDL_FORM_ENDCALL;
+extern const wchar_t* IDL_FORM_MULTIPLEACTIVECALL;
+//Corresponding Settings form name
+extern const wchar_t* IDL_FORM_SETTINGS_PREFIX;
+extern const wchar_t* IDL_FORM_MAIN_SETTING_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDL_FORM_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDL_FORM_SPEED_DIAL;
+extern const wchar_t* IDL_FORM_MORE_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_STATUSTONES;
+extern const wchar_t* IDL_FORM_CALLTYPE_FORWARD;
+extern const wchar_t* IDL_FORM_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDL_FORM_CALLTYPE_BARRING;
+extern const wchar_t* IDL_FORM_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDL_FORM_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDL_FORM_ADD_REJECT_NUMBER;
+extern const wchar_t* IDL_FORM_AUTO_AREA_CODE;
+extern const wchar_t* IDL_FORM_ADD_REJECT_MSG;
+extern const wchar_t* IDL_FORM_EDIT_REJECT_MSG;
+extern const wchar_t* IDL_FORM_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDL_FORM_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDL_FORM_DEL_NUMBER;
+extern const wchar_t* IDL_FORM_DEL_MESSAGE;
+//Dialer & Call Log Form names
+extern const wchar_t* IDL_FORM_DIAL_APP;
+extern const wchar_t* IDL_FORM_CALL_LOG_DETAIL;
+extern const wchar_t* IDL_CALL_PANEL;
+extern const wchar_t* IDL_END_CALL_PANEL;
+extern const wchar_t* IDL_OUTCALL_FORM;
+extern const wchar_t* IDL_OUT_EMERGENCYCALL_FORM;
+extern const wchar_t* IDL_CALL_FORM;
+extern const wchar_t* IDL_EMERGENCY_CALL_FORM;
+extern const wchar_t* IDL_MULTIPLE_CALL_FORM;
+extern const wchar_t* IDL_CONFCALL_FORM;
+extern const wchar_t* IDL_DTMF_PANEL;
+extern const wchar_t* IDL_DTMF_KEYS_PANEL;
+extern const wchar_t* IDL_DIALER_KEYPAD_PANEL;
+extern const wchar_t* IDL_FORM_EMERGENCY_DIAL;
+
+//Constants - Call Scene name
+extern const wchar_t* IDSCN_SCENE_OUTCALL;
+extern const wchar_t* IDSCN_SCENE_OUT_EMERGENCYCALL;
+extern const wchar_t* IDSCN_SCENE_INCOMINGCALL;
+extern const wchar_t* IDSCN_SCENE_ACTIVECALL;
+extern const wchar_t* IDSCN_SCENE_ACTIVE_EMERGENCYCALL;
+extern const wchar_t* IDSCN_SCENE_CONFCALL;
+extern const wchar_t* IDSCN_SCENE_CONFCALLLIST;
+extern const wchar_t* IDSCN_SCENE_ENDCALL;
+extern const wchar_t* IDSCN_SCENE_MULTIPLEACTIVECALL;
+//Constants - Settings Scene name
+extern const wchar_t* IDSCN_SCENE_MAIN_SETTING_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTLIST_MENU;
+extern const wchar_t* IDSCN_SCENE_CALL_REJECTMSGS_MENU;
+extern const wchar_t* IDSCN_SCENE_SPEED_DIAL;
+extern const wchar_t* IDSCN_SCENE_MORE_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_STATUSTONES;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_FORWARD;
+extern const wchar_t* IDSCN_SCENE_CALL_FORWARD_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALLTYPE_BARRING;
+extern const wchar_t* IDSCN_SCENE_CALL_BARRING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_CALL_WAITING_OPTIONS;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_NUMBER;
+extern const wchar_t* IDSCN_SCENE_AUTO_AREA_CODE;
+extern const wchar_t* IDSCN_SCENE_ADD_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_EDIT_REJECT_MSG;
+extern const wchar_t* IDSCN_SCENE_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER;
+extern const wchar_t* IDSCN_SCENE_SET_BARRING_PWD;
+extern const wchar_t* IDSCN_SCENE_DEL_NUMBER;
+extern const wchar_t* IDSCN_SCENE_DEL_MESSAGE;
+//Dialer & Call Log Scene names
+extern const wchar_t* IDSCN_DIALER;
+extern const wchar_t* IDSCN_CALL_LOG;
+extern const wchar_t* IDSCN_CALL_LOG_DETAILS;
+extern const wchar_t* IDSCN_EMERGENCY_DIAL;
+
+extern const wchar_t* TYPE_VIDEO;
+extern const wchar_t* TYPE_VOICE;
+extern const wchar_t* TYPE_SMS;
+extern const wchar_t* TEL;
+extern const wchar_t* TO;
+
+extern const wchar_t* OPERATION_ID_PICK;
+extern const wchar_t* OPERATION_ID_VIEW;
+extern const wchar_t* OPERATION_ID_ADD;
+extern const wchar_t* OPERATION_ID_EDIT;
+extern const wchar_t* OPERATION_ID_CONFIGURE;
+extern const wchar_t* OPERATION_ID_CAPTURE;
+extern const wchar_t* OPERATION_ID_CALL;
+extern const wchar_t* OPERATION_ID_COMPOSE;
+extern const wchar_t* OPERATION_ID_DIAL;
+extern const wchar_t* OPERATION_ID_HOME_MENU;
+
+extern const wchar_t* PROVIDER_ID_CAMERA;
+extern const wchar_t* PROVIDER_ID_GALLERY;
+extern const wchar_t* PROVIDER_ID_CALL;
+extern const wchar_t* PROVIDER_ID_MESSAGE;
+extern const wchar_t* PROVIDER_ID_EMAIL;
+extern const wchar_t* PROVIDER_ID_MEDIA;
+extern const wchar_t* PROVIDER_ID_CONTACTS;
+extern const wchar_t* PROVIDER_ID_PHONE;
+
+extern const wchar_t* RETURN_TYPE_PHONE;
+extern const wchar_t* RETURN_TYPE_EMAIL;
+extern const wchar_t* RETURN_TYPE_CONTACT_ID;
+
+extern const wchar_t* DELIMITER;
+extern const wchar_t* LAUNCHTYPE;
+extern const wchar_t* PARAM_ORIGIN_MT;
+extern const wchar_t* CALL_HANDLE;
+extern const wchar_t* CONTACT_NUMBER;
+extern const wchar_t* PARAM_CALL_TYPE;
+extern const wchar_t* PARAM_CALL_VALUE_VOICE;
+extern const wchar_t* PARAM_PHONE_NUMBER;
+extern const wchar_t* INPUT_TYPE_PHONE;
+extern const wchar_t* MESSAGE_TYPE;
+extern const wchar_t* MESSAGE_SMS_TYPE;
+extern const wchar_t* MESSAGE_TEXT;
+extern const wchar_t* MESSAGE_TO;
+//Contacts app control parameters
+extern const wchar_t* CONTACTS_VIEW_TYPE;
+extern const wchar_t* CONTACTS_VIEW_TYPE_CONTACT;
+extern const wchar_t* ITEM_TYPE_CONTACT ;
+extern const wchar_t* CONTACTS_ID_KEY;
+extern const wchar_t* ITEM_TYPE_PERSON ;
+extern const wchar_t* CONTACT_KEY_ITEM_TYPE ;
+extern const wchar_t* CONTACT_KEY_ITEM_ID ;
+
+
+extern const wchar_t* SELECTION_MODE;
+extern const wchar_t* RETURN_TYPE;
+extern const wchar_t* SELECTION_MODE_SINGLE;
+extern const wchar_t* RETURN_KEY_VALUE;
+
+//Settings Strings
+extern const wchar_t* SETTINGS_FLIGHT_MODE_STR;
+//Voice Call- Common Command Ids
+enum CommandIds
+{
+ IDA_ADD_CALL = DIAL_CMD_TOTAL_COUNT+1,
+ IDA_JOIN_CALL,
+ IDA_OPEN_CONTACTS,
+ IDA_HOLD_CALL,
+ IDA_UNHOLD_CALL,
+ IDA_MUTE,
+ IDA_UNMUTE,
+ IDA_SPEAKER,
+ IDA_SPEAKER_OFF,
+ IDA_OPEN_NUMKEYPAD,
+ IDA_CLOSE_NUMKEYPAD,
+ IDA_END_CALL,
+ IDA_SHOW_REJECT_CALL_MESSAGE_PANEL, //Show the reject with message panel
+ IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL,//Cancel the reject with message panel
+ IDA_CREATE_REJECT_CALL_MESSAGE,//Reject the call with new message
+ IDA_VOICE_CALL,
+ IDA_VIDEO_CALL,
+ IDA_MESSAGE,
+ IDA_END_CONF_CALL,
+ IDA_HOLD_CONF_CALL,
+ IDA_UNHOLD_CONF_CALL,
+ IDA_ADD_TO_CONTACTS, //add current contact to AddressBook
+ IDA_BACK_EVENT,
+ IDA_SWAP_CALLS,
+ IDA_MORE_OPTIONS_MENU,
+ IDA_MORE_CONF_CALLLIST_OPTION,
+ IDA_SEND_REJECT_MSG1,
+ IDA_SEND_REJECT_MSG2,
+ IDA_SEND_REJECT_MSG3,
+ IDA_SEND_REJECT_MSG4,
+ IDA_SEND_REJECT_MSG5,
+ IDA_SEND_REJECT_MSG6,
+ IDA_CALL_WAITING_OPTION_CHECKED,
+ IDA_CALL_WAITING_OPTION_UNCHECKED,
+ IDA_TOTAL_CMD_IDS,
+};
+
+//Command Ids for Ending Caller in Conference list.
+enum EndConfCallerCmdIds
+{
+ IDA_END_CALLER1 = IDA_TOTAL_CMD_IDS + 1,
+ IDA_END_CALLER2,
+ IDA_END_CALLER3,
+ IDA_END_CALLER4,
+ IDA_END_CALLER5,
+ IDA_TOTAL_ENDCONFCALLER_CMD_IDS,
+};
+
+enum SplitConfCallerCmdIds
+{
+ IDA_SPLIT_CALLER1 = IDA_TOTAL_ENDCONFCALLER_CMD_IDS + 1,
+ IDA_SPLIT_CALLER2,
+ IDA_SPLIT_CALLER3,
+ IDA_SPLIT_CALLER4,
+ IDA_SPLIT_CALLER5,
+ IDA_TOTAL_SPLITCONFCALLER_CMD_IDS,
+};
+
+enum CallAnsweringOptions
+{
+ ANSERWING_OPTION_HOLD_SINGLE_CALL = 503,//Hold previous call and accept incoming call.
+ ANSERWING_OPTION_END_SINGLE_CALL,//End previous call and accept incoming call.
+ ANSERWING_OPTION_REPLACE_ACTIVE_CALL,//Replace previous active call with incoming call.
+ ANSERWING_OPTION_REPLACE_HELD_CALL,//Replace previous held call with incoming call.
+ ANSERWING_OPTION_END_ALL_CALLS,//end all previous calls and accept incoming.
+ ANSERWING_OPTION_ACCEPT_CALL,//no previous active calls present
+};
+
+enum SoundMode
+{
+ SOUND_MODE_VOICE = 0,
+ SOUND_MODE_RINGTONE,
+ SOUND_MODE_MEDIA
+};
+
+//Type of the call (incoming, outgoing etc for call log database
+enum CallLogType
+{
+ CALL_LOG_TYPE_VOICE_INCOMING,
+ CALL_LOG_TYPE_VOICE_OUTGOING,
+ CALL_LOG_TYPE_VOICE_MISSED,
+ CALL_LOG_TYPE_VOICE_MISSED_UNSEEN,
+ CALL_LOG_TYPE_VOICE_REJECTED,
+ CALL_LOG_TYPE_VOICE_BLOCKED,
+ CALL_LOG_TYPE_SMS_INCOMING,
+ CALL_LOG_TYPE_SMS_OUTGOING,
+};
+
+//Error code to handle error scenarios
+enum ErrorCodes
+{
+ ERROR_NONE,
+ ERROR_INVALID_INPUT,
+ ERROR_DIAL_FAILED,
+ ERROR_INVALID_NUMBER,
+ ERROR_REJECT_FAILED,
+ ERROR_JOIN_FAILED,
+ ERROR_SWAP_FAILED,
+ ERROR_END_CALL_FAILED,
+ ERROR_END_FROM_CONFERENCE_FAILED,
+ ERROR_SPLIT_FROM_CONFERENCE_FAILED,
+ ERROR_CODE_SIM_INITIALIZATION_FAILED,
+ ERROR_NOT_EMERGENCY_NUM,
+ ERROR_TAPI_INIT_FAILED,
+ ERROR_TAPI_ERROR,
+ ERROR_BARRING_PWD_TOO_LONG,
+ ERROR_FLIGHT_MODE_SET,
+ ERROR_GENERAL,
+ ERROR_SERVICE_UNAVAILABLE,
+ ERROR_USSD_NUMBER,
+ ERROR_CALL_BARRED
+};
+
+enum DialerRequestType
+{
+ REQUEST_SHOW_SUGGESTION,
+ REQUEST_SHOW_ADD_TO_CONTACTS,
+ REQUEST_SHOW_SPEED_DIAL_POPUP,
+ REQUEST_CALL_SPEED_DIAL_NUM,
+};
+
+enum IncomingCallFormRequestType
+{
+ REQUEST_ITEM_SELECTED,
+};
+
+
+//Dimensions for Small photo of caller/callee.
+extern const int W_SMALL_PHOTO;
+extern const int H_SMALL_PHOTO;
+extern const int W_CONFERENCE_PHOTO;
+extern const int H_CONFERENCE_PHOTO;
+extern const int W_CALL_THUMBNAIL;
+extern const int H_CALL_THUMBNAIL;
+extern const int W_CALL_THUMBNAIL_SHADOW;
+extern const int H_CALL_THUMBNAIL_SHADOW;
+
+//Maximum number of calls
+extern const int IDI_MAX_ACTIVE_CALLS;
+extern const int IDI_MAX_CONF_CALL_PARTICIPANTS;
+//Constants used for custom list item in message panel in Incoming call screen
+extern const int IDA_FORMAT_SENDTEXT;
+extern const int IDA_BUTTON_CANCEL_OPTIONS_POPUP;
+extern const int ID_MULTI_PARTY_CALL;
+extern const int ID_SECOND_INCOMING_CALL;
+//Constants
+extern const wchar_t* IDI_KEY2_TXT;
+extern const wchar_t* IDI_KEY3_TXT;
+extern const wchar_t* IDI_KEY4_TXT;
+extern const wchar_t* IDI_KEY5_TXT;
+extern const wchar_t* IDI_KEY6_TXT;
+extern const wchar_t* IDI_KEY7_TXT;
+extern const wchar_t* IDI_KEY8_TXT;
+extern const wchar_t* IDI_KEY9_TXT;
+
+#endif /* PHNTYPES_H_ */
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CalllogManager.h
+ * @brief This is the header file for the %CallLogManager class.
+ *
+ * This header file contains the declarations for %CallLogManager, %CallLogDetails, %LogListComparer class.
+ */
+
+#ifndef _PHN_CALL_LOG_MANAGER_H_
+#define _PHN_CALL_LOG_MANAGER_H_
+#include "contacts.h"
+#include <FBase.h>
+#include <FSocial.h>
+#include "CallInfo.h"
+#include "CallTypes.h"
+#include "CallICalllogChangeListener.h"
+
+using namespace Tizen::Social;
+class CallLogDetails;
+
+/**
+ * @class LogListComparer
+ * @brief LogListComparer provides comparison functions used to
+ * sort an arraylist of CallLogDetails.
+ *
+ */
+class LogListComparer
+: public Tizen::Base::Collection::IComparerT<CallLogDetails>
+{
+public:
+ LogListComparer() {};
+ virtual ~LogListComparer() {};
+ result Compare (const CallLogDetails& obj1, const CallLogDetails& obj2, int& cmp) const;
+};
+
+/**
+ * @class CallLogDetails
+ * @brief CallLogDetails used to store information call logs.
+ *
+ */
+class CallLogDetails
+: public Tizen::Base::Object
+{
+public:
+ CallLogDetails();
+ virtual ~CallLogDetails();
+ bool operator ==(const CallLogDetails& rhs) const;
+ bool operator !=(const CallLogDetails& rhs) const;
+ CallLogDetails& operator =(const CallLogDetails& rhs);
+
+ void SetCalllogDbId(int id);
+ int GetCalllogDbId(void);
+ void SetCalllogType(contacts_phone_log_type_e type);
+ CallLogType GetCalllogType(void);
+ void SetContactDbId(int id);
+ int GetContactDbId(void);
+ void SetFirstName(char* name);
+ char* GetFirstName(void);
+ void SetLastName(char* name);
+ char* GetLastName(void);
+ void SetDisplayName(char* name);
+ char* GetDisplayName(void);
+ void SetContactImagePath(char* path);
+ char* GetContactImagePath(void);
+ void SetPhoneNumber(char* number);
+ char* GetPhoneNumber(void);
+ void SetShortMessage(char* message);
+ char* GetShortMessage(void);
+ void SetStartTime(time_t time);
+ time_t GetStartTime(void);
+ void SetDuration(int duration);
+ int GetDuration(void);
+ void ConvertTimetoDateTime(void);
+ Tizen::Base::DateTime GetDateTime(void);
+
+private:
+ //TODO: Naming conventions to be followed.
+ //NOTE: Below fields are not owned.
+ int calllog_db_id; /**< Call log entry id */
+ CallLogType calllog_type; /**< Call log entry type */
+ int contact_db_id; /**< Contact's id in database */
+ char* first_name; /**< Contact's first name (also known as given name) */
+ char* last_name; /**< Contact's last name (also known as family name) */
+ char* display_name; /**< Display name (how contact's name should be presented) */
+ char* contact_image_path; /**< Path to image with contact's picture */
+ // contact_number_type_e phone_number_type; /**< Phone number type (i.e.: work, cell) */
+ char* phone_number; /**< Phone number */
+ char* short_message; /**< Short message for this log */
+ time_t startTime; /**< Timestamp of this change */
+ int duration_sec;
+ Tizen::Base::DateTime dateTime;
+
+};
+
+/**
+ * @class CallLogManager
+ * @brief CallLogManager is a singleton class used to save and retrieve call log related data.
+ *
+ */
+class CallLogManager
+{
+public:
+ static CallLogManager* GetInstance(void);
+
+private:
+ CallLogManager(void);
+ virtual ~CallLogManager(void);
+ result Construct(void);
+ static void CreateInstance(void);
+ static void DestroyInstance(void);
+ unsigned long GetDuration(long long start_time);
+ int GetPersonId(Tizen::Base::String& personId);
+public:
+ result AddCallogInfoToDatabase(AppCallInfo* calllogInfo);
+private:
+ static CallLogManager* __pCallogManager;
+ Addressbook* pAddressBook;
+};
+
+
+#endif // _PHN_CALL_LOG_MANAGER_H_
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+ <Id>nI2PLNdTwi</Id>
+ <Version>1.0.0</Version>
+ <Type>C++App</Type>
+ <Requirements>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch.armv7">true</Feature>
+ <Feature Name="http://tizen.org/feature/platform.core.cpu.arch.x86">true</Feature>
+ <Feature Name="http://tizen.org/feature/platform.core.fpu.arch.vfpv3">true</Feature>
+ </Requirements>
+ <Apps>
+ <ApiVersion>2.1</ApiVersion>
+ <Privileges>
+ <Privilege>http://tizen.org/privilege/uimanager</Privilege>
+ <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+ <Privilege>http://tizen.org/privilege/notification</Privilege>
+ <Privilege>http://tizen.org/privilege/power</Privilege>
+ <Privilege>http://tizen.org/privilege/appusage</Privilege>
+ <Privilege>http://tizen.org/privilege/lockmanager</Privilege>
+ <Privilege>http://tizen.org/privilege/messaging.write</Privilege>
+ <Privilege>http://tizen.org/privilege/telephony</Privilege>
+ <Privilege>http://tizen.org/privilege/vibrator</Privilege>
+ <Privilege>http://tizen.org/privilege/contact.read</Privilege>
+ </Privileges>
+ <UiApp LaunchingHistoryVisible="False" Main="True" MenuIconVisible="False" Name="Call">
+ <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+ <UiTheme SystemTheme="White"/>
+ <DisplayNames>
+ <DisplayName Locale="eng-GB">CallApp</DisplayName>
+ </DisplayNames>
+ <Icons/>
+ <AppControls>
+ <AppControl>
+ <Operation>http://tizen.org/appcontrol/operation/call</Operation>
+ <Uri>tel</Uri>
+ </AppControl>
+ </AppControls>
+ <LaunchConditions/>
+ </UiApp>
+ </Apps>
+</Manifest>
--- /dev/null
+Name: apps.Call
+Summary: Call application
+Version: 1.0.0.0
+Release: 1
+Group: TO_BE/FILLED_IN
+License: Flora-1.1
+Source0: %{name}-%{version}.tar.gz
+BuildRequires: cmake
+BuildRequires: pkgconfig(osp-appfw)
+BuildRequires: pkgconfig(osp-uifw)
+BuildRequires: pkgconfig(osp-social)
+BuildRequires: pkgconfig(osp-messaging)
+BuildRequires: pkgconfig(osp-media)
+BuildRequires: pkgconfig(osp-image)
+BuildRequires: pkgconfig(osp-image-core)
+BuildRequires: pkgconfig(osp-shell)
+BuildRequires: pkgconfig(osp-telephony)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(capi-media-sound-manager)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(tapi)
+BuildRequires: pkgconfig(mm-sound)
+BuildRequires: pkgconfig(contacts-service2)
+BuildRequires: osp-appfw-internal-devel
+BuildRequires: osp-uifw-internal-devel
+BuildRequires: osp-media-internal-devel
+BuildRequires: hash-signer
+
+ # runtime requires
+Requires: osp-installer
+
+%description
+Verification application: Call
+
+%prep
+%setup -q
+
+%build
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+%ifarch %{ix86}
+%if 0%{?simulator}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
+
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp LICENSE.Flora %{buildroot}/usr/share/license/%{name}
+
+%make_install
+###### for package signing step ######
+PKG_ID=nI2PLNdTwi
+%define tizen_sign 1
+%define tizen_sign_base /usr/apps/${PKG_ID}
+%define tizen_sign_level platform
+%define tizen_author_sign 1
+%define tizen_dist_sign 1
+
+%post
+/sbin/ldconfig
+PKG_ID=nI2PLNdTwi
+echo "/usr/etc/package-manager/backend/tpk -i /usr/apps/"${PKG_ID}
+/usr/etc/package-manager/backend/tpk -i /usr/apps/${PKG_ID}
+cp -f /usr/lib/osp/osp-ui-app-loader /usr/apps/${PKG_ID}/bin/Call
+/usr/bin/vconftool set -t int memory/call/state "0" -g 6521 -i -f
+
+%postun
+/sbin/ldconfig
+PKG_ID=nI2PLNdTwi
+echo "/usr/etc/package-manager/backend/tpk -u "${PKG_ID}
+/usr/etc/package-manager/backend/tpk -u ${PKG_ID}
+
+%files
+%defattr(-,root,root,-)
+/usr/apps/*
+/usr/share/license/%{name}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="2.0.0.201302151552" Dversion="20120315">
+ <text id="IDS_SETTING_VOICEFORWARD_NOREPLY_STRING">If No Reply</text>
+ <text id="IDS_SETTING_CALLERID_SUB_STRING">Show</text>
+ <text id="IDS_SETTING_CONNECTTONE_STRING">Call Connect Tone</text>
+ <text id="IDS_CALLLOG_DELETE_FOOTER">Delete</text>
+ <text id="IDS_DIALER_MENU_ITEM_EXIT">Exit</text>
+ <text id="IDS_SETTING_CONNECTTONE_HLP_STRING">There will be a signal sound when the line is connected</text>
+ <text id="IDS_SETTING_MORE_SUB_STRING">Call waiting, Call barring, Prefix...</text>
+ <text id="IDS_KEYPAD_BTN_NAME">Keypad</text>
+ <text id="IDS_SETTINGS_MATCHCRITERIA_STRING">Match Criteria</text>
+ <text id="IDS_DATETIME_SEP">Sep</text>
+ <text id="IDS_MUTE_BTN_NAME">Mute</text>
+ <text id="IDS_SETTING_REJECT_HLP_STRING">Manage Auto Reject Mode</text>
+ <text id="IDS_SETTING_VOICEBARRING_INTERNATIONAL_STRING">Int'l calls</text>
+ <text id="IDS_SETTING_DONE_HEADER_ITEM">Done</text>
+ <text id="IDS_NO_MESSAGE_STR">No Messages</text>
+ <text id="IDS_SETTING_WAIT_INTERVAL_STRING">Seconds</text>
+ <text id="IDS_CALLERID_HIDE_STRING">Hide</text>
+ <text id="IDS_NO_LOGS">No Logs</text>
+ <text id="IDS_ADDCALL_BTN_NAME">Add Call</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_WAIT">Add Wait</text>
+ <text id="IDS_SPEEDDIAL_POP_YES_BTN_STRING">Yes</text>
+ <text id="IDS_MESSAGES_SELECTED">%d Messages Selected</text>
+ <text id="IDS_SETTING_CALLTYPE_VOICE_STRING">Voice Call</text>
+ <text id="IDS_SETTING_REMINDERS_STRING">Minute Reminders</text>
+ <text id="IDS_SETTINGS_DELETE_MSGS_TITLE_STRING">Set Reject Messages</text>
+ <text id="IDS_DEFAULT_SPEED_DIAL_TEXT">.Name</text>
+ <text id="IDS_ALREADY_USED_MSG">already in use</text>
+ <text id="IDS_SETTING_ENDTONE_HLP_STRING">There will be a signal sound when the line is disconnected</text>
+ <text id="IDS_SETTING_WAITING_HLP_STRING">During call, notify me of incoming calls</text>
+ <text id="IDS_SETTING_REJECT_MSG_STRING">Set Reject Messages</text>
+ <text id="IDS_ENDCALL_BTN_NAME">End Call</text>
+ <text id="IDS_SETTING_VOICEFORWARD_IFBUSY_STRING">If busy</text>
+ <text id="IDS_REMOVE_CONTACT">Remove</text>
+ <text id="IDS_CANCEL">Cancel</text>
+ <text id="IDS_MATCHCRITERIA_INCLUDE_STRING">Includes</text>
+ <text id="IDS_TIMER_ON_HOLD">On Hold</text>
+ <text id="IDS_SETTING_FORWARDING_STRING">Call Forwarding</text>
+ <text id="IDS_SETTING_AUTO_AREACODE_STRING">Auto Area Code</text>
+ <text id="IDS_INVALID_NUMBER_ERROR_MSG">Invalid Number.</text>
+ <text id="IDS_CALLLOG_REJECTED">Rejected Call</text>
+ <text id="IDS_PEOPLE_STR">people</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_CONTACT">Add Contact</text>
+ <text id="IDS_SETTING_CALLALERT_OFF_STRING">Off</text>
+ <text id="IDS_DIALER_MENU_ITEM_SPEED_DIAL">Speed Dial</text>
+ <text id="IDS_CONTACT_BTN_NAME">Contacts</text>
+ <text id="IDS_DATETIME_OCT">Oct</text>
+ <text id="IDS_AM_TIME">AM</text>
+ <text id="IDS_MATCHCRITERIA_END_STRING">Ends With</text>
+ <text id="IDS_SPEED_DIAL_TITLE">Speed Dial</text>
+ <text id="IDS_CALLLOG_CANCEL_FOOTER">Cancel</text>
+ <text id="IDS_CHANGE_CONTACT">Change contact</text>
+ <text id="IDS_SELECTED_ITEMS_STRING">%d call logs selected</text>
+ <text id="IDS_CALLLOG_NO_NUMBER">No Number</text>
+ <text id="IDS_SETTING_SAVE_HEADER_ITEM">Save</text>
+ <text id="IDS_SETTING_REJECT_STRING">Call rejection</text>
+ <text id="IDS_NUMBER_SELECTED">%d Number Selected</text>
+ <text id="IDS_SETTING_AUTO_AREACODE_HLP_STRING">Add the area code on the dialer by default</text>
+ <text id="IDS_CALLLOG_NO_NAME">No Name</text>
+ <text id="IDS_LONG_BARRING_PWD_ERROR_MSG">Barring Password length should be less than or equal to 4.</text>
+ <text id="IDS_DATETIME_APR">Apr</text>
+ <text id="IDS_SETTING_SPEEDDIAL_STRING">Speed Dial</text>
+ <text id="IDS_JOINCALL_BTN_NAME">Join Call</text>
+ <text id="IDS_DATETIME_JUN">Jun</text>
+ <text id="IDS_DATETIME_JUL">Jul</text>
+ <text id="IDS_DIALER_MOBILE_STR">Mobile</text>
+ <text id="IDS_SETTING_WAITING_TIME_STRING">Waiting Time</text>
+ <text id="IDS_SETTING_WAITING_STRING">Call Waiting</text>
+ <text id="IDS_SETTING_VOICEFORWARD_OUTOFREACH_STRING">If Out Of Reach</text>
+ <text id="IDS_SETTING_VOICEBARRING_WHENROAMING_STRING">Incoming When Roaming</text>
+ <text id="IDS_TAPI_INIT_ERROR_MSG">TAPI Server Initialization Failed.</text>
+ <text id="IDS_ADD_BTN_STRING">Add</text>
+ <text id="IDS_MSG_BTN_NAME">Message</text>
+ <text id="IDS_SETTING_VOICEFORWARD_OPTIONS_TITLE_STRING">Voice Call Forwarding</text>
+ <text id="IDS_DATETIME_MAY">May</text>
+ <text id="IDS_SPEED_DIAL_POPUP_TITLE">Edit</text>
+ <text id="IDS_SETTING_CALLERID_MAIN_STRING">Show My Caller Id</text>
+ <text id="IDS_DATETIME_MAR">Mar</text>
+ <text id="IDS_CALLLOG_RECEIVED_MSG">Received Message</text>
+ <text id="IDS_SETTING_CALL_ALERT_MAIN_STRING">Alerts On Call</text>
+ <text id="IDS_ADD_TO_CONTACTS">Add To Contacts</text>
+ <text id="IDS_SPEED_DIAL_DELETE_TITLE">Select Speed Dial</text>
+ <text id="IDS_DIALER_MENU_ITEM_SEND_MSG">Send Message</text>
+ <text id="IDS_MATCHCRITERIA_EXACT_STRING">Exactly The Same As</text>
+ <text id="IDS_HOLD_BTN_NAME">Hold</text>
+ <text id="IDS_CALL_OPTION_TITLE">Accept Call After</text>
+ <text id="IDS_CALLLOG_OUTGOING">Outgoing Call</text>
+ <text id="IDS_SETTING_WAITING_OPTIONS_TITLE_STRING">Call Waiting</text>
+ <text id="IDS_GENERAL_TAPI_ERROR_MSG">TAPI Error Occurred.</text>
+ <text id="IDS_SETTING_STATUS_TONES_STRING">Call Status Tones</text>
+ <text id="IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG">Emergency Calls Only.</text>
+ <text id="IDS_CALL_OPTION8">Putting Held Calls(%d) On Hold</text>
+ <text id="IDS_CALL_OPTION7">Putting Active Calls(%d) On Hold</text>
+ <text id="IDS_CALL_OPTION6">Ending All Calls</text>
+ <text id="IDS_DEFAULT_REJECT_ITEM_STRING">Unknown</text>
+ <text id="IDS_CALL_OPTION5">Ending Call </text>
+ <text id="IDS_CALL_OPTION4">Ending Active Calls(%d)</text>
+ <text id="IDS_SPLIT_PARTICIPANT_ERROR_MSG">Split From Conference Failed.</text>
+ <text id="IDS_CALL_OPTION3">Ending Held Calls(%d)</text>
+ <text id="IDS_CALL_OPTION2">Ending Call With </text>
+ <text id="IDS_CALL_OPTION1">Putting %ls On Hold</text>
+ <text id="IDS_SETTING_FORWARD_CALLTYPE_TITLE_STRING">Call Forwarding</text>
+ <text id="IDS_NUMBERS_SELECTED">%d Numbers Selected</text>
+ <text id="IDS_INCOMING_CALLING">Calling...</text>
+ <text id="IDS_VIEW_CONTACT">View Contact</text>
+ <text id="IDS_UNHOLD_BTN_NAME">Unhold</text>
+ <text id="IDS_FLIGHT_MODE_ON">Please Disable Filght Mode to Call</text>
+ <text id="IDS_DIALER_MENU_ITEM_ADD_PAUSE">Add Pause</text>
+ <text id="IDS_SETTING_CALL_WAITING_OPTIONS_STRING">Call Waiting</text>
+ <text id="IDS_SELECT_ALL_LIST_ITEM_STRING">Select All</text>
+ <text id="IDS_SETTING_ENDTONE_STRING">Call End Tone</text>
+ <text id="IDS_SETTING_CALLALERT_SOUND_STRING">Sound</text>
+ <text id="IDS_SETTING_BARRING_CALLTYPE_TITLE_STRING">Call Barring</text>
+ <text id="IDS_SETTING_VOICEBARRING_INCOMING_STRING">All Incoming Calls</text>
+ <text id="IDS_SETTINGS_DELETE_NUMBER_TITLE_STRING">Select Number</text>
+ <text id="IDS_MESSAGE_SELECTED">%d Message Selected</text>
+ <text id="IDS_NOT_ASSIGNED_STR">Not Assigned</text>
+ <text id="IDS_MATCHCRITERIA_START_STRING">Starts With</text>
+ <text id="IDS_VOICE_CALL_BTN_NAME">Voice Call</text>
+ <text id="IDS_INVALID_ARGS_ERROR_MSG">Invalid Parameters Passed.</text>
+ <text id="IDS_SETTING_STATUS_TONES_HLP_STRING">Edit alerts that sound during calls</text>
+ <text id="IDS_SETTING_VOICEBARRING_EXCEPTHOME_STRING">Int'l calls except home</text>
+ <text id="IDS_CONFERENCE_CALL_STRING">Conference Call</text>
+ <text id="IDS_SPEAKER_BTN_NAME">Speaker</text>
+ <text id="IDS_DELETE_BTN_STRING">Delete</text>
+ <text id="IDS_SPEEDDIAL_POP_NO_BTN_STRING">No</text>
+ <text id="IDS_SELECT_CALL_LOG">Select Call log</text>
+ <text id="IDS_CALLLOG_MISSED">Missed Call</text>
+ <text id="IDS_CALLLOG_RECEIVED">Received Call</text>
+ <text id="IDS_INVALID_NUMBER">Invalid Number</text>
+ <text id="IDS_DATETIME_FEB">Feb</text>
+ <text id="IDS_REJECT_MESSAGE_CREATE">Create</text>
+ <text id="IDS_DATETIME_DEC">Dec</text>
+ <text id="IDS_SELECT_NUMBER">Select Number</text>
+ <text id="IDS_SIM_INIT_ERROR_MSG">Sim initialization is failed or not completed.</text>
+ <text id="IDS_SELECT_MESSAGE">Select Message</text>
+ <text id="IDS_SETTING_BARRING_STRING">Call Barring</text>
+ <text id="IDS_DATETIME_NOV">Nov</text>
+ <text id="IDS_SETTING_CALL_ALERT_SUB_STRING">Sound</text>
+ <text id="IDS_SETTING_CALLALERT_VIBRATE_STRING">Vibration</text>
+ <text id="IDS_REJECT_MESSAGE_BTN">Reject With Message</text>
+ <text id="IDS_CANCEL_BTN_STRING">Cancel</text>
+ <text id="IDS_SETTING_VOICEBARRING_OUTGOING_STRING">All Outgoing Calls</text>
+ <text id="IDS_SETTING_CALLTYPE_VIDEO_STRING">Video Call</text>
+ <text id="IDS_MGR_CONF_CALL_LIST_STR">Manage Conference Call</text>
+ <text id="IDS_CALLLOG_SENT_MSG">Sent Message</text>
+ <text id="IDS_SETTINGS_ENTERNUMBER_STRING">Enter Number</text>
+ <text id="IDS_DIALER_SPEEDDIAL_POPUP_MSG">No Speed Dial Assigned.\n Assign now?</text>
+ <text id="IDS_LOGS_YESTERDAY">Yesterday</text>
+ <text id="IDS_CALLERID_BYNETWORK_STRING">By Network</text>
+ <text id="IDS_CLOSE_POPUP">Close</text>
+ <text id="IDS_LIST_SEND_BUTTON">Send</text>
+ <text id="IDS_EMERGENCY_CALL">Emergency Call</text>
+ <text id="IDS_PM_TIME">PM</text>
+ <text id="IDS_CALLERID_SHOW_STRING">Show</text>
+ <text id="IDS_DIAL_ERROR_MSG">Call Not Allowed.</text>
+ <text id="IDS_SETTING_REJECT_MSG_HLP_STRING">Edit Reject Messages</text>
+ <text id="IDS_GENERAL_ERROR_MSG">General Error.</text>
+ <text id="IDS_SETTING_MORE_MAIN_STRING">More Call Settings</text>
+ <text id="IDS_SETTING_VOICEBARRING_OPTIONS_TITLE_STRING">Voice Call Barring</text>
+ <text id="IDS_REJECT_FAILED_ERROR_MSG">Reject Failed.</text>
+ <text id="IDS_SETTING_VOICEFORWARD_ALWAYS_STRING">Always</text>
+ <text id="IDS_SETTING_REMINDERS_HLP_STRING">There will be signal sounds every minute</text>
+ <text id="IDS_VIDEO_CALL_BTN_NAME">Video call</text>
+ <text id="IDS_CALL_SWAP_ERROR_MSG">Swap Failed.</text>
+ <text id="IDS_SETTING_DEACTIVATE_STATUS_STRING">Deactivated</text>
+ <text id="IDS_END_PARTICIPANT_ERROR_MSG">End From Conference failed.</text>
+ <text id="IDS_JOIN_FAILED_ERROR_MSG">Join Failed.</text>
+ <text id="IDS_DATETIME_AUG">Aug</text>
+ <text id="IDS_LOGS_TODAY">Today</text>
+ <text id="IDS_DATETIME_JAN">Jan</text>
+ <text id="IDS_SELECTED_ITEM_STRING">%d call log selected</text>
+ <text id="IDS_NUMBER_UNKNOWN">Unknown</text>
+ <text id="IDS_USSD_NUMBER">USSD is not supported</text>
+ <text id="IDS_END_CALL_STRING">Call Ended</text>
+ <text id="IDS_SWAP_BTN_NAME">Swap</text>
+ <text id="IDS_CONF_TITLE_LABEL">Conference Call</text>
+ <text id="IDS_END_CONFCALL_BUTTON">End Call</text>
+ <text id="IDS_CALL_REJECT_FROM_STRING">Call Rejected From</text>
+ <text id="IDS_CALL_REJECTED_TITLE_STRING">Call Rejected</text>
+ <text id="IDS_MESSAGE_SENDING_FAILED">Message Sending failed</text>
+ <text id="IDS_LOW_MEMORY_MSG_TITLE">Low Memory</text>
+ <text id="IDS_LOW_MEMORY_MSG">Memory Low, Delete some data</text>
+ <text id="IDS_SERVICE_UNAVAILABLE">Network Unavailable</text>
+ <text id="IDS_CALL_BARRED">Call Barred</text>
+</string_table>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201308220944" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_CALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="584.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="Calling..." textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="536.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="15.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="1105.0" y="158.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="521.0" x="584.0" y="158.0"/>
+ </Label>
+ <Button id="IDC_HOLD_BUTTON" parent="IDL_CALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-1_button_hold_normal.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_01_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CALLER1_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="20.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="74.0" x="626.0" y="636.0"/>
+ <layout bottomRelation="IDC_CALLER1_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="20.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER1_BIGPHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="74.0" x="466.0" y="636.0"/>
+ </Button>
+ <Label id="IDC_HOLD_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="" textColor="#FFFFFF" textSize="36.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CALLER1_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_HOLD_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="466.0" y="636.0"/>
+ <layout bottomRelation="IDC_CALLER1_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_HOLD_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="306.0" y="636.0"/>
+ </Label>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="IDL_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="3.0.0.201212071727" Dversion="20120315">
+ <Popup id="IDL_CALL_OPTION_POPUP">
+ <property color="" titleText="::IDS_CALL_OPTION_TITLE" titleTextColor=""/>
+ <layout height="474" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="600"/>
+ <layout height="660" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="414"/>
+ </Popup>
+</ScenePopup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201308220944" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_CONFCALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CONFCALL_BIGPHOTO_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_call_group_caller ID_720x720.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_CONFCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CONFCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CONFCALL_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CONFCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Button id="IDC_CONF_CALL_MORE_BUTTON" parent="IDL_CONFCALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-1_button_more.png" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="C01-1_button_more_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="16.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="72.0" x="632.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_CONFCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Button>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Conference Call" textColor="#FFFFFF" textSize="64.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="2.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_CONF_CALL_MORE_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="606.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="25.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_CONFCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="585.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_PARTICIPANTS_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="70.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="487.0" x="584.0" y="104.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="00:00:01" textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_PARTICIPANTS_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="70.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="1072.0" y="98.0"/>
+ </Label>
+ <Button id="IDC_HOLD_BUTTON" parent="IDL_CONFCALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-1_button_hold_01.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_01_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CONFCALL_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="20.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="622.0" y="636.0"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="20.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CONFCALL_BIGPHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="462.0" y="636.0"/>
+ </Button>
+ <Label id="IDC_HOLD_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="" textColor="#FFFFFF" textSize="36.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CONFCALL_BIGPHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_HOLD_BUTTON" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="452.0" y="636.0"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="10.0" marginLeft="0.0" marginRight="114.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CONFCALL_BIGPHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="229.0" x="217.0" y="658.0"/>
+ </Label>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_CONFCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONFCALL_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="IDL_CONFCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CONFCALL_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201310071946" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_CONFCALL_LIST_FORM">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Button id="IDC_END_CONFCALL_BUTTON" parent="IDL_CONFCALL_LIST_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="#DDDDDD" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="#000000" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="#B33C3C" normalColorOpacity="100" normalTextColor="#F9F9F9" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="#409CD3" pressedColorOpacity="100" pressedTextColor="#000000" text="End Call" textSize="48.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_CONFCALL_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="26.0" marginLeft="16.0" marginRight="16.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="688.0" x="16.0" y="1082.0"/>
+ <layout bottomRelation="IDL_CONFCALL_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="10.0" marginLeft="26.0" marginRight="26.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1228.0" x="26.0" y="636.0"/>
+ </Button>
+ <TableView id="IDC_CONF_CALL_LIST_TABLEVIEW" parent="IDL_CONFCALL_LIST_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" fastScrollIndex="" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="560.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="108.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="336.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="94.0"/>
+ </TableView>
+ <Label id="IDC_CALL_TIME_LABEL" parent="IDL_CONFCALL_LIST_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="0" text="01:02:30" textColor="#000000" textSize="48.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_END_CONFCALL_BUTTON" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="true" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="118.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="300.0" x="210.0" y="886.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="100.0" marginRight="100.0" marginTop="25.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1080.0" x="100.0" y="455.0"/>
+ </Label>
+ <Label id="IDC_CONF_TITLE_LABEL" parent="IDL_CONFCALL_LIST_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#F8F6EF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Conference Call" textColor="#3B73B6" textSize="56.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="108.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_CONFCALL_LIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="93.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_CONFCALL_LIST_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="0.0" y="0.0"/>
+ </Label>
+ <Button id="IDC_HOLD_CONFCALL_BUTTON" parent="IDL_CONFCALL_LIST_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_LEFT" normalBGBitmapPath="" normalBitmapPath="" normalColor="#8E9BA3" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_press.png" pressedBitmapPath="C01-1_button_hold_press.png" pressedColor="#409CD3" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_END_CONFCALL_BUTTON" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="118.0" marginLeft="0.0" marginRight="40.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="602.0" y="886.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="26.0" marginTop="25.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="74.0" x="1180.0" y="455.0"/>
+ </Button>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201304081058" Dversion="20120315">
+ <Panel id="IDL_DTMF_KEYPAD_PANEL">
+ <property backgroundColor="#000000" backgroundColorOpacity="50" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="720.0" mode="Portrait" type="LAYOUT_RELATIVE" width="720.0" x="0.0" y="0.0"/>
+ <layout height="660.0" mode="Landscape" type="LAYOUT_RELATIVE" width="560.0" x="0.0" y="0.0"/>
+ </Panel>
+ <Label id="IDC_DTMF_KEY_BG_LABEL" parent="IDL_DTMF_KEYPAD_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_keypad_btn_normal.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_DTMF_KEYPAD_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="560.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="20.0" marginLeft="35.0" marginRight="35.0" marginTop="140.0" mode="Portrait" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_DTMF_KEYPAD_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="650.0" x="35.0" y="140.0"/>
+ <layout bottomRelation="IDL_DTMF_KEYPAD_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="20.0" marginLeft="20.0" marginRight="20.0" marginTop="16.0" mode="Landscape" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="520.0" x="20.0" y="140.0"/>
+ </Label>
+ <EditField id="IDC_NUM_EDITFIELD" parent="IDL_DTMF_KEYPAD_PANEL">
+ <property accessibilityHint="" disabledBGBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" disabledTextColor="" ellipsisPosition="ELLIPSIS_POSITION_END" enableClear="false" groupStyle="GROUP_STYLE_NONE" guideText="" guideTextColor="" highlightedBGBitmapPath="" highlightedColor="#FFFFFF" highlightedColorOpacity="0" highlightedTextColor="#FFFFFF" horizontalMargin="16.0" inputStyle="INPUT_STYLE_OVERLAY" keypadAction="KEYPAD_ACTION_ENTER" keypadEnabled="false" limitLength="100" linkTextColor="" lowerCaseMode="false" normalBGBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="#FFFFFF" pressedBGBitmapPath="" pressedColor="#FFFFFF" pressedColorOpacity="0" text="" textHorizontalAlignment="ALIGNMENT_LEFT" textSize="94.0" titleStyle="EDIT_FIELD_TITLE_STYLE_NONE" titleText="" titleTextColor="" verticalMargin="12.0" viewMode="false"/>
+ <layout bottomRelation="IDC_DTMF_KEY_BG_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="130.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="35.0" marginRight="35.0" marginTop="10.0" mode="Portrait" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDL_DTMF_KEYPAD_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="650.0" x="35.0" y="10.0"/>
+ <layout bottomRelation="IDC_DTMF_KEY_BG_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="130.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_DTMF_KEYPAD_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="10.0" mode="Landscape" rightRelation="IDL_DTMF_KEYPAD_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" style="EDIT_FIELD_STYLE_PHONE_NUMBER" topRelation="IDL_DTMF_KEYPAD_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="520.0" x="20.0" y="10.0"/>
+ </EditField>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+<ScenePanel Bversion="2.0.0.201310251600" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Panel id="IDL_DTMF_KEYS_PANEL">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout column1Collapsed="false" column1Shrinkable="true" column1Spacing="0.0" column1Stretchable="true" column2Collapsed="false" column2Shrinkable="true" column2Spacing="2.0" column2Stretchable="true" column3Collapsed="false" column3Shrinkable="true" column3Spacing="2.0" column3Stretchable="true" height="560.0" maxColumn="3" maxRow="5" mode="Portrait" row1Collapsed="false" row1Shrinkable="true" row1Spacing="0.0" row1Stretchable="true" row2Collapsed="false" row2Shrinkable="true" row2Spacing="2.0" row2Stretchable="true" row3Collapsed="false" row3Shrinkable="true" row3Spacing="2.0" row3Stretchable="true" row4Collapsed="false" row4Shrinkable="true" row4Spacing="2.0" row4Stretchable="true" row5Collapsed="false" row5Shrinkable="true" row5Spacing="0.0" row5Stretchable="true" type="LAYOUT_GRID" width="650.0" x="0.0" y="0.0"/>
+ <layout column1Collapsed="false" column1Shrinkable="true" column1Spacing="0.0" column1Stretchable="true" column2Collapsed="false" column2Shrinkable="true" column2Spacing="2.0" column2Stretchable="true" column3Collapsed="false" column3Shrinkable="true" column3Spacing="2.0" column3Stretchable="true" height="500.0" maxColumn="3" maxRow="5" mode="Landscape" row1Collapsed="false" row1Shrinkable="false" row1Spacing="0.0" row1Stretchable="false" row2Collapsed="false" row2Shrinkable="false" row2Spacing="2.0" row2Stretchable="false" row3Collapsed="false" row3Shrinkable="false" row3Spacing="2.0" row3Stretchable="false" row4Collapsed="false" row4Shrinkable="false" row4Spacing="2.0" row4Stretchable="true" row5Collapsed="false" row5Shrinkable="false" row5Spacing="2.0" row5Stretchable="true" type="LAYOUT_GRID" width="490.0" x="0.0" y="0.0"/>
+ </Panel>
+ <Button id="IDC_BUTTON1" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="138.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="5.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.0"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="5.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON2" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="138.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="5.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="5.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON3" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="138.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="6.0" marginTop="5.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="5.0" marginTop="5.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON4" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON5" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON6" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="6.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="5.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON7" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON8" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON9" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="137.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="6.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="119.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="5.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="2" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON10" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="132.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="5.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="210.99998"/>
+ <layout height="117.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="13.0" marginLeft="5.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON11" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="132.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="5.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="117.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="13.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+ <Button id="IDC_BUTTON12" parent="IDL_DTMF_KEYS_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="32.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="132.25" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="5.0" marginLeft="0.0" marginRight="6.0" marginTop="0.0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="211.99998"/>
+ <layout height="117.0" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="13.0" marginLeft="0.0" marginRight="5.0" marginTop="0.0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="3" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" visible="true" width="158.66667"/>
+ </Button>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_EMERGENCY_CALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_end call_default_caller ID_720x720.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_EMERGENCY_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_EMERGENCY_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="618.0" y="107.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="162.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_EMERGENCY_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="515.0" y="29.0"/>
+ </Label>
+ <Label id="IDC_LINE_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#ABF005" backgroundColorOpacity="100" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="10.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_EMERGENCY_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="254.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="IDL_EMERGENCY_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="512.0" y="431.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="Emergency Call" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="250.0" y="436.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_EMERGENCY_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_EMERGENCY_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="376.0" y="428.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_EMERGENCY_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="Calling..." textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_NUMBER1_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_EMERGENCY_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="734.0" y="462.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201302250946" Dversion="20120315">
+ <Panel id="IDL_ENDCALLKEYS_PANEL">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout height="500" mode="Portrait" type="LAYOUT_RELATIVE" width="720" x="0" y="720"/>
+ <layout height="500" mode="Landscape" type="LAYOUT_RELATIVE" width="720" x="560" y="160"/>
+ </Panel>
+ <Button id="IDC_ADD_TO_CONTACT_BUTTON" parent="IDL_ENDCALLKEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="122" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ENDCALLKEYS_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="214" marginLeft="10" marginRight="10" marginTop="164" mode="Portrait" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_ENDCALLKEYS_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="700" x="10" y="164"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="122" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ENDCALLKEYS_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="10" marginRight="10" marginTop="164" mode="Landscape" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_ENDCALLKEYS_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="700" x="10" y="164"/>
+ </Button>
+ <Button id="IDC_VIDEOCALL_BUTTON" parent="IDL_ENDCALLKEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ENDCALLKEYS_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="480" marginTop="16" mode="Portrait" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="0" y="302"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_ENDCALLKEYS_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="480" marginTop="16" mode="Landscape" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="0" y="302"/>
+ </Button>
+ <Button id="IDC_VOICECALL_BUTTON" parent="IDL_ENDCALLKEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_VIDEOCALL_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0" marginLeft="0" marginRight="240" marginTop="16" mode="Portrait" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="240" y="302"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_VIDEOCALL_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0" marginLeft="0" marginRight="240" marginTop="16" mode="Landscape" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="240" y="302"/>
+ </Button>
+ <Button id="IDC_MSG_BUTTON" parent="IDL_ENDCALLKEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_VOICECALL_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="16" mode="Portrait" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="480" y="302"/>
+ <layout bottomRelation="IDL_ENDCALLKEYS_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="198" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_VOICECALL_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="16" mode="Landscape" rightRelation="IDL_ENDCALLKEYS_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_ADD_TO_CONTACT_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="240" x="480" y="302"/>
+ </Button>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_END_CALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_end call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="24.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="672.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="584.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALL_TIME_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="::IDS_END_CALL_STRING" textColor="#FF4800" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="519.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1068.0" y="158.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALL_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="471.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALL_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="152.0"/>
+ </Label>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_END_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePopup SYSTEM "UIForm.dtd">
+<ScenePopup Bversion="2.0.0.201307011454" Dversion="20120315">
+ <Popup id="IDL_ERROR_MSG_POPUP">
+ <property accessibilityHint="" color="" titleText="" titleTextColor=""/>
+ <layout height="213.0" mode="Portrait" style="" type="LAYOUT_RELATIVE" width="720.0"/>
+ <layout height="612.0" mode="Landscape" style="" type="LAYOUT_RELATIVE" width="414.0"/>
+ </Popup>
+ <TextBox id="IDC_MSG_TEXTBOX" parent="IDL_ERROR_MSG_POPUP">
+ <property accessibilityHint="" disabledBackgroundBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" disabledTextColor="" highlightedBackgroundBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" lineSpacingExtra="1.0" lineSpacingMultiplier="1" normalBackgroundBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" text="" textAlignment="ALIGNMENT_CENTER" textSize="42.0" textboxBorder="TEXT_BOX_BORDER_NONE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="true" height="54.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="648.0" x="36.0" y="79.5"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="498.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="58.0" x="178.0" y="35.0"/>
+ </TextBox>
+</ScenePopup>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201310110948" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_INCOMING_CALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_FOOTER|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Footer>
+ <property backgroundBitmapPath="" color="" colorOpacity="100" disabledButtonColor="" disabledButtonColorOpacity="100" disabledButtonTextColor="" disabledItemColor="" disabledItemColorOpacity="100" disabledItemTextColor="" footerStyle="FOOTER_STYLE_BUTTON_ICON_TEXT" highlightedButtonColor="" highlightedButtonColorOpacity="100" highlightedButtonTextColor="" highlightedItemColor="" highlightedItemColorOpacity="100" highlightedItemTextColor="" normalButtonColor="" normalButtonColorOpacity="100" normalButtonTextColor="" normalItemColor="" normalItemColorOpacity="100" normalItemTextColor="" pressedButtonColor="" pressedButtonColorOpacity="100" pressedButtonTextColor="" pressedItemColor="" pressedItemColorOpacity="100" pressedItemTextColor="" selectedItemColor="" selectedItemColorOpacity="100" selectedItemTextColor="" showBackButton="false" showMenuButton="false"/>
+ <itemSet/>
+ </Footer>
+ <Label id="IDC_BIG_PHOTO_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_call_default_caller ID_720x720.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="420.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_INCOMING_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="280.0" marginRight="280.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_INCOMING_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="280.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BIG_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_BIG_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BIG_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="280.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="IDC_BIG_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BIG_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="906.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="304.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALL_TIME_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="::IDS_INCOMING_CALLING" textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Landscape" rightRelation="IDC_BIG_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_VOICE_CALL_ICON_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="152.0" x="824.0" y="98.0"/>
+ </Label>
+ <Label id="IDC_NUMBER_LABEL" parent="IDL_INCOMING_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BIG_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="IDC_CALL_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLER_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="520.0" x="304.0" y="98.0"/>
+ </Label>
+ <Panel id="IDC_REJECT_PANEL" parent="IDL_INCOMING_CALL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="310.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="910.0"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="310.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="410.0"/>
+ </Panel>
+ <Button id="IDC_REJECT_MESSAGE_CANCEL_BUTTON" parent="IDC_REJECT_PANEL">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="#F9F9F9" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="28.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="110.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_REJECT_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="200.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_REJECT_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_REJECT_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="110.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_REJECT_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_REJECT_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="0.0"/>
+ </Button>
+ <TableView id="IDC_MSG_TABLEVIEW" parent="IDC_REJECT_PANEL">
+ <property backgroundColor="#F8F6EF" backgroundColorOpacity="100" fastScrollIndex="" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
+ <layout bottomRelation="IDC_REJECT_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="200.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_REJECT_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_REJECT_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_REJECT_MESSAGE_CANCEL_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="110.0"/>
+ <layout bottomRelation="IDC_REJECT_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="200.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_REJECT_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_REJECT_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_REJECT_MESSAGE_CANCEL_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="110.0"/>
+ </TableView>
+ <Button id="IDC_REJECT_MESSAGE_BUTTON" parent="IDL_INCOMING_CALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="#F9F9F9" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="28.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="110.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="1110.0"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="110.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="610.0"/>
+ </Button>
+ <Panel id="IDC_CALLHANDEL_PANEL" parent="IDL_INCOMING_CALL_FORM">
+ <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout bottomRelation="None" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="20.0" marginRight="20.0" marginTop="110.0" mode="Portrait" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="None" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="20.0" y="830.0"/>
+ <layout bottomRelation="IDL_INCOMING_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_INCOMING_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="104.0" marginLeft="25.0" marginRight="25.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_INCOMING_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="1230.0" x="25.0" y="428.0"/>
+ </Panel>
+ <Label id="IDC_ACCEPT_LABEL" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLHANDEL_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLHANDEL_PANEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_REJECT_LEBEL" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDC_CALLHANDEL_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="492.0" y="0.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="188.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLHANDEL_PANEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1042.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_ACCEPT_ARROW_1" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="18.0" marginRight="0.0" marginTop="78.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="206.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="18.0" marginRight="0.0" marginTop="78.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="206.0" y="78.0"/>
+ </Label>
+ <Label id="IDC_ACCEPT_ARROW_2" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_ARROW_1" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="28.0" marginRight="0.0" marginTop="78.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="254.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_ARROW_1" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="28.0" marginRight="0.0" marginTop="78.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="254.0" y="78.0"/>
+ </Label>
+ <Label id="IDC_ACCEPT_ARROW_3" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_ARROW_2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="28.0" marginRight="0.0" marginTop="78.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="302.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_ACCEPT_ARROW_2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="78.0" marginLeft="28.0" marginRight="0.0" marginTop="78.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="302.0" y="78.0"/>
+ </Label>
+ <Label id="IDC_REJECT_ARROW_1" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="18.0" marginTop="78.0" mode="Portrait" rightRelation="IDC_REJECT_LEBEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="454.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="18.0" marginTop="78.0" mode="Landscape" rightRelation="IDC_REJECT_LEBEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="1004.0" y="78.0"/>
+ </Label>
+ <Label id="IDC_REJECT_ARROW_2" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="28.0" marginTop="78.0" mode="Portrait" rightRelation="IDC_REJECT_ARROW_1" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="406.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="28.0" marginTop="78.0" mode="Landscape" rightRelation="IDC_REJECT_ARROW_1" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="956.0" y="78.0"/>
+ </Label>
+ <Label id="IDC_REJECT_ARROW_3" parent="IDC_CALLHANDEL_PANEL">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="28.0" marginTop="78.0" mode="Portrait" rightRelation="IDC_REJECT_ARROW_2" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="358.0" y="78.0"/>
+ <layout bottomRelation="IDC_CALLHANDEL_PANEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="32.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="78.0" marginLeft="0.0" marginRight="28.0" marginTop="78.0" mode="Landscape" rightRelation="IDC_REJECT_ARROW_2" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLHANDEL_PANEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="20.0" x="908.0" y="78.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE ScenePanel SYSTEM "UIForm.dtd">
+
+<ScenePanel Bversion="2.0.0.201302250946" Dversion="20120315">
+ <Panel id="IDL_KEYS_PANEL">
+ <property backgroundColor="#FFFFFF" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+ <layout column1Collapsed="false" column1Shrinkable="true" column1Spacing="0" column1Stretchable="true" column2Collapsed="false" column2Shrinkable="true" column2Spacing="0" column2Stretchable="true" column3Collapsed="false" column3Shrinkable="true" column3Spacing="0" column3Stretchable="true" height="500" maxColumn="3" maxRow="2" mode="Portrait" row1Collapsed="false" row1Shrinkable="true" row1Spacing="0" row1Stretchable="true" row2Collapsed="false" row2Shrinkable="true" row2Spacing="0" row2Stretchable="true" type="LAYOUT_GRID" width="720" x="0" y="0"/>
+ <layout column1Collapsed="false" column1Shrinkable="true" column1Spacing="0" column1Stretchable="true" column2Collapsed="false" column2Shrinkable="true" column2Spacing="0" column2Stretchable="true" column3Collapsed="false" column3Shrinkable="true" column3Spacing="0" column3Stretchable="true" height="500" maxColumn="3" maxRow="2" mode="Landscape" row1Collapsed="false" row1Shrinkable="true" row1Spacing="0" row1Stretchable="true" row2Collapsed="false" row2Shrinkable="true" row2Spacing="0" row2Stretchable="true" type="LAYOUT_GRID" width="720" x="0" y="0"/>
+ </Panel>
+ <Button id="IDC_ADDJOINCALL_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+ <Button id="IDC_KEYPAD_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+ <Button id="IDC_ENDCALL_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="0" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+ <Button id="IDC_SPEAKER_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="0" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+ <Button id="IDC_MUTE_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_CENTER" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="1" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+ <Button id="IDC_CONTACT_BUTTON" parent="IDL_KEYS_PANEL">
+ <property DisabledBitmapX="0" DisabledBitmapY="0" NormalBitmapX="0" NormalBitmapY="0" PressedBitmapX="0" PressedBitmapY="0" disableTextColor="" disabledBitmapPath="" disabledColor="#FFFFFF" disabledColorOpacity="0" highlightedBGBitmapPath="" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33" verticalAlign="ALIGN_MIDDLE"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ <layout height="250" horizontalAlignment="LAYOUT_HORIZONTAL_ALIGN_RIGHT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" positionColumn="2" positionColumnSpan="1" positionRow="1" positionRowSpan="1" verticalAlignment="LAYOUT_VERTICAL_ALIGN_TOP" width="240"/>
+ </Button>
+</ScenePanel>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201309041510" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_MULTIPLE_CALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_PHOTO_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="350.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="390.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="330.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="94.0" marginTop="24.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="584.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="00:01:24" textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="70.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="1072.0" y="104.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="70.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="584.0" y="104.0"/>
+ </Label>
+ <Button id="IDC_CONF_CALL_MORE_BUTTON" parent="IDL_MULTIPLE_CALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-1_button_more.png" normalBitmapPath="" normalColor="#FFFFFF" normalColorOpacity="0" normalTextColor="" pressedBGBitmapPath="C01-1_button_more_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="72.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="16.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="72.0" x="632.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Button>
+ <Label id="IDC_CALLER2_PHOTO_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="370.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="350.0"/>
+ <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="390.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="330.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="330.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL2" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="162.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="350.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="330.0"/>
+ </Label>
+ <Label id="IDC_CALLER2_TIME_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="on hold" textColor="#FFFFFF" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="449.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_BACKGROUND_LABEL2" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="151.0" x="409.0" y="330.0"/>
+ </Label>
+ <Label id="IDC_CALLER2_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="24.0" y="374.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="409.0" x="0.0" y="330.0"/>
+ </Label>
+ <Label id="IDC_NUMBER2_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER2_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="449.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLER2_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="409.0" x="0.0" y="400.0"/>
+ </Label>
+ <Label id="IDC_SWAP_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="::IDS_SWAP_BTN_NAME" textColor="#FFFFFF" textSize="36.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="15.0" marginLeft="0.0" marginRight="14.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="None" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="536.0" y="627.0"/>
+ <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="390.0" y="622.0"/>
+ </Label>
+ <Button id="IDC_SWAP_BUTTON" parent="IDL_MULTIPLE_CALL_FORM">
+ <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="C01-1_button_hold_01.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_normal_01_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="15.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="458.0" y="627.0"/>
+ <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="15.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_SWAP_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="297.0" y="622.0"/>
+ </Button>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="2.0.0.201309111403" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_OUTCALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="IDL_OUTCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDL_OUTCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_OUTCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_OUTCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="199.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_OUTCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_OUTCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDL_OUTCALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="584.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="Calling..." textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="519.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="172.0" x="1084.0" y="98.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="471.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLER1_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="500.0" x="584.0" y="98.0"/>
+ </Label>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_OUTCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_OUTCALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="IDL_OUTCALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="521.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_OUTCALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="199.0"/>
+ </Label>
+</Scene>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+ <LogicalCoordinate>720</LogicalCoordinate>
+ <Form id="IDL_OUT_EMERGENCYCALL_FORM">
+ <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+ <layout mode="Portrait" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ <layout mode="Landscape" style="FORM_STYLE_PORTRAIT_INDICATOR|FORM_STYLE_LANDSCAPE_INDICATOR_AUTO_HIDE" type="LAYOUT_RELATIVE"/>
+ </Form>
+ <Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_call_default_caller ID_720x720.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="660.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_BACKGROUND_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ </Label>
+ <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="23.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="626.0" y="23.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="70.0" x="1186.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="IDC_VOICE_CALL_ICON_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="584.0" y="22.0"/>
+ </Label>
+ <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="Calling..." textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="154.0" x="554.0" y="99.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="172.0" x="1084.0" y="74.0"/>
+ </Label>
+ <Label id="IDC_NUMBER1_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="506.0" x="24.0" y="99.0"/>
+ <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLER1_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="98.0"/>
+ </Label>
+ <Label id="IDC_KEY_BG_LABEL" parent="IDL_OUT_EMERGENCYCALL_FORM">
+ <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
+ <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
+ <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="160.0"/>
+ </Label>
+</Scene>
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnActiveCallForm.cpp
+ * @brief Active Call Form class
+ */
+#include <FApp.h>
+#include <FUi.h>
+#include <FMedia.h>
+#include <FSystem.h>
+#include <FShell.h>
+#include "CallActiveCallForm.h"
+#include "CallButtonsPanel.h"
+#include "CallInfo.h"
+#include "CallAppUtility.h"
+#include "CallDtmfKeypadPanel.h"
+#include "CallPresentationModel.h"
+#include "CallSceneRegister.h"
+#include "CallTypes.h"
+#include "CallApp.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Shell;
+
+//constants
+const int IDI_MAX_SECONDS = 60;
+const int IDI_MAX_MINS = 60;
+const int W_HOLD_BITMAP = 78;
+const int H_HOLD_BITMAP = 78;
+//for Options menu list
+const int IDI_POPUP_TEXT_SIZE = 33;
+const unsigned int COLOR_POPUP_TEXT = Color32<255, 255, 255, 255>::Value;
+const int IDI_MOREOPTIONS_LIST_ITEMS = 1;
+const int W_OPTION_ANCHOR = 72;
+const int H_OPTION_ANCHOR = 22;
+const int W_MGR_CONFCALL_BITMAP = 64;
+const int H_MGR_CONFCALL_BITMAP = 64;
+const int X_POPUP_ANCHOR = 632;
+const int Y_POPUP_ANCHOR = 140;
+const int W_POPUP_ANCHOR = 72;
+const int H_POPUP_ANCHOR = 22;
+const int IDI_OPTIONMENU_ITEM_SPACING = 16;
+const Point IDI_OPTIONMENU_POS(238, 162);
+const Dimension IDI_OPTIONMENU_DIMEN(486, 99);
+const int X_PHOTO_LBL = 166;
+const int Y_PHOTO_LBL = 232;
+const int W_PHOTO_LBL = 388;
+const int H_PHOTO_LBL = 388;
+const int W_PHOTO_LABEL = 720;
+const int H_PHOTO_LABEL = 720;
+const int W_RIGHT_MORE_ICON_MARGIN = 24;
+const int W_MORE_LABEL = 466;
+const int H_MORE_LABEL = 162;
+const int W_MORE_ICON = 70;
+
+static const wchar_t* IDC_CONF_CALL_MORE_BUTTON = L"IDC_CONF_CALL_MORE_BUTTON";
+static const wchar_t* IDC_HOLD_BUTTON = L"IDC_HOLD_BUTTON";
+static const wchar_t* IDC_SWAP_BUTTON = L"IDC_SWAP_BUTTON";
+static const wchar_t* IDC_HOLD_LABEL = L"IDC_HOLD_LABEL";
+static const wchar_t* IDC_TEXTBOX = L"IDC_NUM_EDITFIELD";
+static const wchar_t* IDC_CALLER1_LABEL = L"IDC_CALLER1_LABEL";
+static const wchar_t* IDC_BACKGROUND_LABEL = L"IDC_BACKGROUND_LABEL";
+static const wchar_t* IDC_CALLER1_TIME_LABEL = L"IDC_CALLER1_TIME_LABEL";
+static const wchar_t* IDC_NUMBER1_LABEL = L"IDC_NUMBER1_LABEL";
+static const wchar_t* IDC_VOICE_CALL_ICON_LABEL = L"IDC_VOICE_CALL_ICON_LABEL";
+static const wchar_t* IDC_CALLER2_LABEL = L"IDC_CALLER2_LABEL";
+static const wchar_t* IDC_NUMBER2_LABEL = L"IDC_NUMBER2_LABEL";
+static const wchar_t* IDC_CALLER2_TIME_LABEL = L"IDC_CALLER2_TIME_LABEL";
+static const wchar_t* IDC_SWAP_LABEL = L"IDC_SWAP_LABEL";
+static const wchar_t* IDC_BACKGROUND_LABEL2 = L"IDC_BACKGROUND_LABEL2";
+static const wchar_t* IDC_PARTICIPANTS_LABEL = L"IDC_PARTICIPANTS_LABEL";
+static const wchar_t* IDC_CALLER1_BIGPHOTO_LABEL = L"IDC_CALLER1_BIGPHOTO_LABEL";
+static const wchar_t* IDC_CALLER2_PHOTO_LABEL = L"IDC_CALLER2_PHOTO_LABEL";
+static const wchar_t* IDC_CALLER1_PHOTO_LABEL = L"IDC_CALLER1_PHOTO_LABEL";
+static const wchar_t* IDC_KEY_BG_LABEL = L"IDC_KEY_BG_LABEL";
+static const wchar_t* IDC_DTMF_KEY_BG_LABEL = L"IDC_DTMF_KEY_BG_LABEL";
+
+const int MIN_MEMORY_NEEDED = 1048576;
+
+ActiveCallForm::ActiveCallForm(FormType formType)
+ : BaseForm(formType)
+{
+ __pActiveCallTimer = null;
+ __pCallButtonsPanel = null;
+ __pDTMFKeypad = null;
+ __pMoreOptionsList = null;
+ __pMoreOptionsListAnchor = null;
+ __pSmallPhotoLabel = null;
+ __pActiveCallInfo = null;
+ __pHeldCallInfo = null;
+ __isSwapInProgress = false;
+ __isCallStateInProgress = false;
+ __isConfCallStateInProgress = false;
+ __pAddressbook = null;
+}
+
+ActiveCallForm::~ActiveCallForm(void)
+{
+ if (__pActiveCallTimer != null)
+ {
+ __pActiveCallTimer->Cancel();
+ delete __pActiveCallTimer;
+ }
+ if (__pMoreOptionsList != null)
+ {
+ __pMoreOptionsList = null;
+ }
+ if (__pMoreOptionsListAnchor != null)
+ {
+ __pMoreOptionsListAnchor = null;
+ }
+ if (__pSmallPhotoLabel != null)
+ {
+ __pSmallPhotoLabel = null;
+ }
+ if (__pActiveCallInfo != null)
+ {
+ delete __pActiveCallInfo;
+ }
+ if (__pHeldCallInfo != null)
+ {
+ delete __pHeldCallInfo;
+ }
+ if(__pDTMFKeypad != null)
+ {
+ __pDTMFKeypad = null;
+ }
+}
+
+void
+ActiveCallForm::Initialize(void)
+{
+ switch (__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ Construct(IDL_OUTCALL_FORM);
+ break;
+
+ case FORMTYPE_EMERGENCYOUTGOINGCALL:
+ Construct(IDL_OUT_EMERGENCYCALL_FORM);
+ break;
+
+ case FORMTYPE_ACTIVECALL:
+ Construct(IDL_CALL_FORM);
+ break;
+
+ case FORMTYPE_EMERGENCYACTIVECALL:
+ Construct(IDL_EMERGENCY_CALL_FORM);
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ Construct(IDL_MULTIPLE_CALL_FORM);
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ Construct(IDL_CONFCALL_FORM);
+ break;
+
+ default:
+ break;
+ }
+}
+
+result
+ActiveCallForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ //Hold Button - Shown on single active/conf call scene
+ InitializeHoldButton();
+ //Swap button for multiple call screen
+ InitializeSwapButton();
+ //Initialize manage conf. call list form
+ InitializeManageConfCallButton();
+ __pCallPresentor = CallPresentationModel::GetInstance();
+ return r;
+}
+
+void
+ActiveCallForm::ShowDTMFKeypad(void)
+{
+ if(__pDTMFKeypad == null)
+ {
+ Rectangle rect(0, 0, 0, 0);
+ if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect.width = GetClientAreaBounds().width;
+ rect.height = GetClientAreaBounds().height - __pCallButtonsPanel->GetHeight();
+ }
+ else if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rect.height = GetClientAreaBounds().height;
+ rect.width = GetClientAreaBounds().width - __pCallButtonsPanel->GetWidth();
+ }
+
+ AppLog("DTMF Keypad rect(%d,%d,%d,%d)",rect.x,rect.y,rect.width,rect.height);
+ __pDTMFKeypad = new (std::nothrow) DtmfKeyPadPanel();
+ __pDTMFKeypad->Initialize(this, rect);
+ //set layout relation w.r.t call buttons panel
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT);
+ }
+ AddControl(__pDTMFKeypad);
+ }
+ EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
+ __pDTMFKeypad->SetBackgroundtoButton();
+ __pDTMFKeypad->SetShowState(true);
+ __pDTMFKeypad->Draw(true);
+ __pDTMFKeypad->Show();
+
+ pTextBox->SetPropagatedKeyEventListener(this);
+ pTextBox->SetEllipsisPosition(ELLIPSIS_POSITION_START);
+
+}
+
+void
+ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLog("ENTER");
+
+ Layout* pLayout = GetLayoutN();
+ if (pLayout != null)
+ {
+ pLayout->Update();
+ }
+ if (__pCallButtonsPanel != null)
+ {
+ //update position of call buttons panel
+ Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
+ //__pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
+
+ //bring button on top
+ __pCallButtonsPanel->SetButtonPosition();
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->Update();
+ }
+
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->Update();
+ }
+
+ //change orientation of DTMF Keypad, if it is visible.
+ if(__pDTMFKeypad != null)
+ {
+ Rectangle rect(0, 0, 0, 0);
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rect.height = GetClientAreaBounds().height;
+ rect.width = GetClientAreaBounds().width - __pCallButtonsPanel->GetWidth();
+ }
+ else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect.width = GetClientAreaBounds().width;
+ rect.height = GetClientAreaBounds().height - __pCallButtonsPanel->GetHeight();
+ }
+ __pDTMFKeypad->SetBounds(rect);
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ __pDTMFKeypad->setKeysPanelBounds();
+ __pDTMFKeypad->SetBackgroundtoButton();
+ __pDTMFKeypad->InvalidateBounds(rect);
+ __pDTMFKeypad->Invalidate(true);
+
+ //HideDTMFKeypad();
+ //ShowDTMFKeypad();
+ }
+
+ //change orientation of DTMF Keypad, if it is visible.
+ if (__pDTMFKeypad != null && __pDTMFKeypad->GetShowState() == true)
+ {
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ //in landscape mode, caller info is visible.
+ SetShowStateOnKeypad(true);
+ //Hide few labels and buttons in landscape mode when DTMF keypad is shown
+ SetShowStateOnKeypadLandscape(false);
+ SetHoldButtonShowState(false);
+ }
+ else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ //in Portrait mode it is hidden beneath DTMF Keypad.
+ SetShowStateOnKeypad(false);
+ DestroyMoreOptionsMenuList();
+ }
+ }
+ }
+
+
+ UpdateCallerPhoto();
+ //More option is displayed recreate it
+ //CreateMoreOptionsMenuList();
+ //CreateMoreOptionsMenuList();
+ //create options menu list
+ if (__pMoreOptionsList != null)
+ {
+ __pMoreOptionsList->SetPosition(Point(GetWidth()-W_RIGHT_MORE_ICON_MARGIN - W_MORE_LABEL,H_MORE_LABEL));
+
+ }
+ if (__pMoreOptionsListAnchor != null)
+ {
+ __pMoreOptionsListAnchor->SetPosition(Point(GetWidth()-W_RIGHT_MORE_ICON_MARGIN - W_MORE_ICON, Y_POPUP_ANCHOR));
+ Bitmap* pBgPopupArwBmp = AppUtility::GetBitmapFromResourcesN(IDB_POPUP_ARROW_ICON, W_OPTION_ANCHOR,
+ H_OPTION_ANCHOR);
+ __pMoreOptionsListAnchor->SetBackgroundBitmap(*pBgPopupArwBmp);
+ delete pBgPopupArwBmp;
+ pBgPopupArwBmp = null;
+
+ }
+
+
+
+}
+
+void
+ActiveCallForm::UpdateCallerPhoto()
+{
+ IListT<AppCallInfo>* activeCallsList = __pCallPresentor->GetCallListN();
+ if(activeCallsList != null && activeCallsList->GetCount() > 1)
+ {
+ for (int index = 0; index < activeCallsList->GetCount(); index++)
+ {
+ //Fetch call info
+ AppCallInfo callInfo;
+ activeCallsList->GetAt(index, callInfo);
+
+ String contactNo;
+ if(callInfo.GetContactNumber().IsEmpty() == false)
+ {
+ contactNo.Append(callInfo.GetContactNumber());
+ }
+ else
+ {
+ contactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+
+ if (callInfo.IsOnHold() == false)
+ {
+ AppCallInfo* activeCallInfo;
+ activeCallInfo = new (std::nothrow) AppCallInfo();
+ *activeCallInfo = callInfo;
+
+ if (activeCallInfo->IsConferenceCall() == false)
+ {
+
+ ShowPersonDetails(contactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,activeCallInfo);
+ delete activeCallInfo;
+ }
+ else
+ {
+
+ Bitmap* pPhotoBitmap = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BG_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ if (pPhotoBitmap != null)
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_CALLER1_PHOTO_LABEL));
+ if (pPhotoLbl)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pPhotoBitmap);
+ pPhotoLbl->Invalidate(true);
+ }
+ delete pPhotoBitmap;
+ }
+ }
+ }
+ else
+ {
+ AppCallInfo* heldCallInfo;
+ heldCallInfo = new (std::nothrow) AppCallInfo();
+ *heldCallInfo = callInfo;
+
+ if (heldCallInfo->IsConferenceCall() == false)
+ {
+ ShowPersonDetails(contactNo, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true, heldCallInfo);
+ delete heldCallInfo;
+ }
+ else
+ {
+ Bitmap* pPhotoBitmap = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BG_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ if (pPhotoBitmap != null)
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_CALLER2_PHOTO_LABEL));
+ if (pPhotoLbl)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pPhotoBitmap);
+ pPhotoLbl->Invalidate(true);
+ }
+ delete pPhotoBitmap;
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ if(__pActiveCallInfo != null)
+ {
+ Bitmap* pPhotoBitmap = __pActiveCallInfo->FetchLatestCallerPhotoN(__pActiveCallInfo->GetContactNumber());
+ ShowCallerPhoto(pPhotoBitmap, false);
+ delete pPhotoBitmap;
+ }
+ }
+
+ delete activeCallsList;
+ activeCallsList = null;
+}
+
+void
+ActiveCallForm::HideDTMFKeypad(void)
+{
+ if(__pDTMFKeypad != null)
+ {
+ EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
+ __DtmfString = pTextBox->GetText();
+ __pDTMFKeypad->SetShowState(false);
+ pTextBox->SetPropagatedKeyEventListener(null);
+ }
+}
+
+result
+ActiveCallForm::InitializeCallButtonsPanel(void)
+{
+ result r = E_SUCCESS;
+ //Set background bitmap for call keypad
+ Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
+ Bitmap* pBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_BACKGROUND_BITMAP, pKeysBgLbl->GetWidth(), pKeysBgLbl->GetHeight());
+ if (pBgBitmap != null)
+ {
+ pKeysBgLbl->SetBackgroundBitmap(*pBgBitmap);
+ }
+
+ if (__pCallButtonsPanel == null)
+ {
+ __pCallButtonsPanel = new (std::nothrow) CallButtonsPanel();
+ __pCallButtonsPanel->ConstructPanel(this, __formType);
+ __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
+ r = AddControl(__pCallButtonsPanel);
+ }
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
+ }
+
+ return r;
+}
+
+void
+ActiveCallForm::InitializeSwapButton(void)
+{
+ Button* pSwapBtn = static_cast<Button*>(GetControl(IDC_SWAP_BUTTON));
+ if (pSwapBtn)
+ {
+ Bitmap* pSwapBmp = AppUtility::GetBitmapFromResourcesN(IDB_SWAP_ICON_NORMAL,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ if (pSwapBmp)
+ {
+ pSwapBtn->SetNormalBitmap(Point(0, 0), *pSwapBmp);
+ }
+ delete pSwapBmp;
+ pSwapBmp = null;
+
+ pSwapBmp = AppUtility::GetBitmapFromResourcesN(IDB_SWAP_ICON_PRESS,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ if (pSwapBmp)
+ {
+ pSwapBtn->SetPressedBitmap(Point(0, 0), *pSwapBmp);
+ }
+ delete pSwapBmp;
+ pSwapBmp = null;
+ pSwapBtn->SetActionId(IDA_SWAP_CALLS);
+ pSwapBtn->AddActionEventListener(*this);
+ }
+}
+
+void
+ActiveCallForm::InitializeManageConfCallButton(void)
+{
+ Button* pMoreBtn = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+ if (pMoreBtn != null)
+ {
+ pMoreBtn->SetActionId(IDA_MORE_OPTIONS_MENU);
+ pMoreBtn->AddActionEventListener(*this);
+ if (__formType == FORMTYPE_MULTIPLECALLS)
+ {
+ //Correct state will be set in OnSceneActivated based on the call
+ pMoreBtn->SetShowState(false);
+ }
+ else if (__formType == FORMTYPE_ACTIVECONFCALL)
+ {
+ pMoreBtn->SetShowState(true);
+ }
+ }
+}
+
+void
+ActiveCallForm::InitializeHoldButton(void)
+{
+ Button* pHoldBtn = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
+ if (pHoldBtn != null)
+ {
+ //set status of Hold Button
+ SetHoldButtonStatus(true);
+ pHoldBtn->AddActionEventListener(*this);
+ }
+}
+
+void
+ActiveCallForm::SetHoldButtonStatus(bool toHoldCall)
+{
+ //background bitmap & button name
+ String btnName("");
+ Bitmap* normalImg = null;
+ Bitmap* pressImg = null;
+ if (toHoldCall)
+ {
+ btnName.Append(AppUtility::GetResourceString(IDS_HOLD_BTN_NAME));
+ normalImg = AppUtility::GetBitmapFromResourcesN(IDB_HOLD_NORMAL_BUTTON_ICON,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ pressImg = AppUtility::GetBitmapFromResourcesN(IDB_HOLD_PRESS_BUTTON_ICON,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ }
+ else
+ {
+ btnName.Append(AppUtility::GetResourceString(IDS_UNHOLD_BTN_NAME));
+ normalImg = AppUtility::GetBitmapFromResourcesN(IDB_UNHOLD_NORMAL_BUTTON_ICON,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ pressImg = AppUtility::GetBitmapFromResourcesN(IDB_UNHOLD_PRESS_BUTTON_ICON,
+ W_HOLD_BITMAP, H_HOLD_BITMAP);
+ }
+
+ //Action id
+ CommandIds cmdId = IDA_HOLD_CALL;
+ switch (__formType)
+ {
+ case FORMTYPE_ACTIVECALL:
+ {
+ cmdId = toHoldCall ? IDA_HOLD_CALL : IDA_UNHOLD_CALL;
+ }
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ cmdId = toHoldCall ? IDA_HOLD_CONF_CALL : IDA_UNHOLD_CONF_CALL;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //set background bitmap, button name & action id
+ Button* pHoldBtn = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
+ Label* pHoldLbl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
+ if (pHoldBtn)
+ {
+ pHoldBtn->SetActionId(cmdId);
+ pHoldBtn->SetNormalBitmap(Point(0, 0),*normalImg);
+ pHoldBtn->SetPressedBitmap(Point(0, 0),*pressImg);
+ pHoldBtn->Invalidate(true);
+ }
+ if (pHoldLbl)
+ {
+ pHoldLbl->SetText(btnName);
+ pHoldLbl->Invalidate(true);
+ }
+
+ //free the resources
+ delete normalImg;
+ normalImg = null;
+ delete pressImg;
+ pressImg = null;
+}
+
+void
+ActiveCallForm::CreateMoreOptionsMenuList(void)
+{
+ //create option list anchor
+ if (__pMoreOptionsListAnchor == null)
+ {
+ Bitmap* pBgPopupArwBmp = AppUtility::GetBitmapFromResourcesN(IDB_POPUP_ARROW_ICON, W_OPTION_ANCHOR,
+ H_OPTION_ANCHOR);
+ __pMoreOptionsListAnchor = new (std::nothrow) Label();
+ __pMoreOptionsListAnchor->Construct(Rectangle(GetWidth()-W_RIGHT_MORE_ICON_MARGIN - W_MORE_ICON, Y_POPUP_ANCHOR, W_POPUP_ANCHOR, H_POPUP_ANCHOR), L"");
+ __pMoreOptionsListAnchor->SetBackgroundBitmap(*pBgPopupArwBmp);
+
+ delete pBgPopupArwBmp;
+ pBgPopupArwBmp = null;
+
+ // Adds a Label to the Form
+ AddControl(__pMoreOptionsListAnchor);
+ }
+
+ //create options menu list
+ if (__pMoreOptionsList == null)
+ {
+ __pMoreOptionsList = new (std::nothrow) ListView();
+ __pMoreOptionsList->Construct(Rectangle(Point(GetWidth()-W_RIGHT_MORE_ICON_MARGIN - W_MORE_LABEL,H_MORE_LABEL), IDI_OPTIONMENU_DIMEN), false, SCROLL_STYLE_FADE_OUT);
+ __pMoreOptionsList->SetItemProvider(*this);
+ __pMoreOptionsList->AddListViewItemEventListener(*this);
+ //Add option list to the form
+ AddControl(__pMoreOptionsList);
+ }
+ else
+ {
+ //Hide option menu list
+ DestroyMoreOptionsMenuList();
+ }
+}
+
+void
+ActiveCallForm::DestroyMoreOptionsMenuList(void)
+{
+ if (__pMoreOptionsListAnchor != null)
+ {
+ //removes and delete the child control
+ //Commented this for the bug N_SE-52426 and added SetShowState(false) below
+ RemoveControl(__pMoreOptionsListAnchor);
+ __pMoreOptionsListAnchor = null;
+ }
+
+ if (__pMoreOptionsList != null)
+ {
+
+ //removes and delete the child control
+ //Commented this for the bug N_SE-52426 and added SetShowState(false) below
+ RemoveControl(__pMoreOptionsList);
+ __pMoreOptionsList = null;
+ }
+}
+
+result
+ActiveCallForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ if (__pCallPresentor != null)
+ {
+ __pCallPresentor = null;
+ }
+ if(__pDTMFKeypad != null)
+ {
+ __pDTMFKeypad = null;
+ }
+ return r;
+}
+
+void
+ActiveCallForm::OnActionPerformed(const Control& source, int actionId)
+{
+
+ String dtmfString;
+ switch (actionId)
+ {
+ case IDA_END_CALL:
+ {
+ //End the currently active / dialing call
+ if (__pActiveCallInfo != null && __pActiveCallInfo->IsConferenceCall() == false)
+ {
+ String activeContactNo;
+ activeContactNo.Append(__pActiveCallInfo->GetContactNumber());
+ //Check if it is call is in dialing state, then
+ if (__formType == FORMTYPE_EMERGENCYOUTGOINGCALL || __formType == FORMTYPE_OUTGOINGCALL)
+ {
+ __pCallPresentor->EndDialingCall(activeContactNo);
+ }
+ else
+ {
+ //end active calls
+ __pCallPresentor->EndActiveCall(*__pActiveCallInfo->GetCallHandle());
+ }
+ }
+ else
+ {
+ __pCallPresentor->EndConferenceCall();
+ }
+ }
+ break;
+
+ case IDA_END_CONF_CALL:
+ {
+ AppAssert(__formType == FORMTYPE_ACTIVECONFCALL);
+ __pCallPresentor->EndConferenceCall();
+ }
+ break;
+
+ case IDA_OPEN_NUMKEYPAD:
+ {
+ if(__pDTMFKeypad != null)
+ {
+ Rectangle rect(0, 0, 0, 0);
+ if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ rect.height = GetClientAreaBounds().height;
+ rect.width = GetClientAreaBounds().width - __pCallButtonsPanel->GetWidth();
+ }
+ else if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ rect.width = GetClientAreaBounds().width;
+ rect.height = GetClientAreaBounds().height - __pCallButtonsPanel->GetHeight();
+ }
+ __pDTMFKeypad->SetBounds(rect);
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ __pDTMFKeypad->setKeysPanelBounds();
+ __pDTMFKeypad->InvalidateBounds(rect);
+ __pDTMFKeypad->Invalidate(true);
+
+ }
+
+
+
+ if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ //hide only in portrait mode.
+ SetShowStateOnKeypad(false);
+ DestroyMoreOptionsMenuList();
+ }
+ if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ SetShowStateOnKeypadLandscape(false);
+ }
+
+ //Hide the hold button as it goes behind DTMF keypad
+ SetHoldButtonShowState(false);
+ ShowDTMFKeypad();
+ __pCallButtonsPanel->SetKeypadButtonState(IDA_CLOSE_NUMKEYPAD);
+ }
+ break;
+
+ case IDA_CLOSE_NUMKEYPAD:
+ {
+ if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+ {
+ SetShowStateOnKeypad(true);
+ }
+ if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+ {
+ SetShowStateOnKeypadLandscape(true);
+ }
+ HideDTMFKeypad();
+ __pCallButtonsPanel->SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
+ }
+ break;
+
+ case IDA_ADD_CALL:
+ {
+ long long mem = AppUtility::GetAvailableMemory();
+ AppLogDebug("Available Memory = %lld",mem);
+ if(mem < MIN_MEMORY_NEEDED)
+ {
+ MessageBox LowMemory;
+ String msg = L"";
+ LowMemory.Construct(AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG_TITLE), AppUtility::GetResourceString(IDS_LOW_MEMORY_MSG), MSGBOX_STYLE_NONE,1000);
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ LowMemory.ShowAndWait(modalResult);
+ return;
+ }
+ //switch to Dialer Form to make an call
+ if(__pCallPresentor->GetCurrentCallCount() == 1)
+ {
+ __pCallPresentor->LaunchDialAppControl();
+ }
+ }
+ break;
+
+ case IDA_HOLD_CALL:
+ {
+ bool success = true;
+ if (__pActiveCallInfo->IsConferenceCall() == false)
+ {
+ if(__pActiveCallInfo->GetCallHandle() != null)
+ {
+ if(IsCallStateInProgress() == false)
+ {
+ success = __pCallPresentor->HoldCall(*__pActiveCallInfo->GetCallHandle());
+ SetCallStateInProgress(true);
+ }
+ }
+ }
+ else
+ {
+ success = __pCallPresentor->HoldConferenceCall();
+ }
+ }
+ break;
+
+ case IDA_UNHOLD_CALL:
+ {
+ bool success = false;
+ if (__pActiveCallInfo->IsConferenceCall() == false)
+ {
+ if(__pActiveCallInfo->GetCallHandle() != null)
+ {
+ if(IsCallStateInProgress() == false)
+ {
+ success = __pCallPresentor->UnHoldCall(*__pActiveCallInfo->GetCallHandle());
+ SetCallStateInProgress(true);
+ }
+ }
+ }
+ else
+ {
+ success = __pCallPresentor->ActivateConferenceCall();
+ }
+ }
+ break;
+
+ case IDA_HOLD_CONF_CALL:
+ {
+ AppAssert(__formType == FORMTYPE_ACTIVECONFCALL);
+ if(IsConfCallStateInProgress() == false)
+ {
+ bool success = __pCallPresentor->HoldConferenceCall();
+ SetConfCallStateInProgress(true);
+ }
+ }
+ break;
+
+ case IDA_UNHOLD_CONF_CALL:
+ {
+ AppAssert(__formType == FORMTYPE_ACTIVECONFCALL);
+ if(IsConfCallStateInProgress() == false)
+ {
+ bool success = __pCallPresentor->ActivateConferenceCall();
+ SetConfCallStateInProgress(true);
+ }
+ }
+ break;
+
+ case IDA_OPEN_CONTACTS:
+ {
+ //Open Contacts APP
+ //Launch call application
+ AppManager* pAppManager = AppManager::GetInstance();
+ pAppManager->LaunchApplication(PROVIDER_ID_CONTACTS);
+ }
+ break;
+
+ case IDA_MUTE:
+ {
+ bool success = __pCallPresentor->SetMuteStatus(true);
+ if (success)
+ {
+ __pCallButtonsPanel->SetMuteButtonState(IDA_UNMUTE);
+ }
+ }
+ break;
+
+ case IDA_UNMUTE:
+ {
+ bool success = __pCallPresentor->SetMuteStatus(false);
+ if (success)
+ {
+ __pCallButtonsPanel->SetMuteButtonState(IDA_MUTE);
+ }
+ }
+ break;
+
+ case IDA_SPEAKER:
+ {
+ bool success = __pCallPresentor->SetSpeakerStatus(true);
+ if (success)
+ {
+ __pCallButtonsPanel->SetSpeakerButtonState(IDA_SPEAKER_OFF);
+ }
+ }
+ break;
+
+ case IDA_SPEAKER_OFF:
+ {
+ bool success = __pCallPresentor->SetSpeakerStatus(false);
+ if (success)
+ {
+ __pCallButtonsPanel->SetSpeakerButtonState(IDA_SPEAKER);
+ }
+ }
+ break;
+
+ case IDA_JOIN_CALL:
+ {
+ AppAssert(__formType == FORMTYPE_MULTIPLECALLS);
+ __pCallPresentor->JoinCall();
+ }
+ break;
+
+ case IDA_SWAP_CALLS:
+ {
+ if(IsSwapInProgress() == false)
+ {
+ AppAssert(__formType == FORMTYPE_MULTIPLECALLS);
+ __pCallPresentor->SwapCalls();
+ SetSwapInProgress(true);
+ }
+ }
+ break;
+
+ case IDA_MORE_OPTIONS_MENU:
+ {
+ //Show 'more' options menu
+ CreateMoreOptionsMenuList();
+ }
+ break;
+
+ case NUM_KEY0:
+ {
+ dtmfString.Append(L"0");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY1:
+ {
+ dtmfString.Append(L"1");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY2:
+ {
+ dtmfString.Append(L"2");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY3:
+ {
+ dtmfString.Append(L"3");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY4:
+ {
+ dtmfString.Append(L"4");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY5:
+ {
+ dtmfString.Append(L"5");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY6:
+ {
+ dtmfString.Append(L"6");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY7:
+ {
+ dtmfString.Append(L"7");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY8:
+ {
+ dtmfString.Append(L"8");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case NUM_KEY9:
+ {
+ dtmfString.Append(L"9");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ dtmfString.Append(L"*");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ case HASH_KEY:
+ {
+ dtmfString.Append(L"#");
+ SetTextToDTMFTextField(dtmfString);
+ __pCallPresentor->SendDTMFSignal(dtmfString);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+bool
+ActiveCallForm::IsConfCallStateInProgress(void)
+{
+ return __isConfCallStateInProgress;
+}
+
+
+bool
+ActiveCallForm::IsCallStateInProgress(void)
+{
+ return __isCallStateInProgress;
+}
+
+bool
+ActiveCallForm::IsSwapInProgress(void)
+{
+ return __isSwapInProgress;
+}
+
+
+void
+ActiveCallForm::OnActiveTelephonyCallback(bool isActive)
+{
+ AppLogDebug("Enter");
+ //reset hold status and show call timer
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, !isActive, __activeCallStartTime);
+ SetHoldButtonStatus(isActive);
+ SetCallStateInProgress(false);
+}
+
+void
+ActiveCallForm::OnHoldTelephonyCallback(bool isHeld)
+{
+ AppLogDebug("Enter");
+ //reset hold status and "OnHold" text
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, isHeld);
+ if(__pActiveCallTimer != null)
+ {
+ __pActiveCallTimer->Cancel();
+ }
+ SetHoldButtonStatus(!isHeld);
+ SetCallStateInProgress(false);
+}
+
+void
+ActiveCallForm::SetConfCallStateInProgress(bool progress)
+{
+ __isConfCallStateInProgress = progress;
+}
+
+void
+ActiveCallForm::SetCallStateInProgress(bool progress)
+{
+ __isCallStateInProgress = progress;
+}
+
+void
+ActiveCallForm::SetSwapInProgress(bool progress)
+{
+ __isSwapInProgress = progress;
+}
+
+void
+ActiveCallForm::SetTextToDTMFTextField(const String& dtmfStr)
+{
+ String dtmfString;
+ int cursorPos;
+ if(__pDTMFKeypad != null)
+ {
+ EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
+
+ int startpos=-1,endpos=-1;
+ pTextBox->GetBlockRange(startpos,endpos);
+ if(startpos != -1)
+ {
+ pTextBox->Remove();
+ pTextBox->ReleaseBlock();
+ }
+ pTextBox->InsertTextAtCursorPosition(dtmfStr);
+ cursorPos = pTextBox->GetCursorPosition();
+ dtmfString.Append(pTextBox->GetText());
+ pTextBox->Clear();
+ pTextBox->SetText(dtmfString);
+ pTextBox->SetCursorPosition(cursorPos);
+ pTextBox->Invalidate(true);
+ }
+}
+
+void
+ActiveCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppLog("ENTER");
+ //set itself as listener
+ __pCallPresentor->SetTelEventListener(this);
+ AddOrientationEventListener(*this);
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+
+ //Initialize keypad and buttons
+ InitializeCallButtonsPanel();
+
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(this);
+ }
+
+
+ if (__pActiveCallInfo != null)
+ {
+ delete __pActiveCallInfo;
+ __pActiveCallInfo = null;
+ }
+ if (__pHeldCallInfo != null)
+ {
+ delete __pHeldCallInfo;
+ __pHeldCallInfo = null;
+ }
+ DestroyMoreOptionsMenuList();
+
+ switch (__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ {
+ String contactNo;
+ contactNo.Append(*(static_cast<String*>(pArgs->GetAt(0))));
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ __pActiveCallInfo->SetContactNumber(contactNo);
+ Contact* pContact = __pCallPresentor->GetContactN(contactNo);
+ if (pContact != null)
+ {
+ __pActiveCallInfo->SetContactInfo(*pContact);
+ delete pContact;
+ }
+ ShowPersonDetails(contactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ //make an normal outgoing call
+ __pCallPresentor->DialCall(contactNo, false);
+ if (__pCallPresentor->IsAppControlRunning() == true)
+ {
+ __pCallPresentor->AbortAppControlRequest();
+ }
+ }
+ break;
+
+ case FORMTYPE_EMERGENCYOUTGOINGCALL:
+ {
+ String* pContactNo = static_cast<String*>(pArgs->GetAt(0));
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ long long phNumber = 0;
+ LongLong::Parse(*pContactNo, phNumber);
+ __pActiveCallInfo->SetContactNumber(*pContactNo);
+ //make an emergency call
+ __pCallPresentor->DialCall(*pContactNo, true);
+ }
+ break;
+
+ case FORMTYPE_ACTIVECALL:
+ {
+ //get contact number
+ AppCallInfo* pCall = static_cast<AppCallInfo*>(pArgs->GetAt(0));
+
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ *__pActiveCallInfo = *pCall;
+ String activeContactNo;
+ if(pCall->GetContactNumber().IsEmpty() == false)
+ {
+ activeContactNo.Append(pCall->GetContactNumber());
+ }
+ else
+ {
+ activeContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+ ShowPersonDetails(activeContactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ //show call active time using Timer
+ //__activeCallStartTime = pCall->GetCallConnectTime();
+ __activeCallStartTime = pCall->GetDurationTime();
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, pCall->IsOnHold(), __activeCallStartTime);
+ }
+ break;
+
+ case FORMTYPE_EMERGENCYACTIVECALL:
+ {
+ //get contact number
+ AppCallInfo* pCall = static_cast<AppCallInfo*>(pArgs->GetAt(0));
+
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ *__pActiveCallInfo = *pCall;
+
+ //show call active time using Timer
+ //__activeCallStartTime = pCall->GetCallConnectTime();
+ __activeCallStartTime = pCall->GetDurationTime();
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, pCall->IsOnHold(), __activeCallStartTime);
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ IListT<AppCallInfo>* pCallsList = __pCallPresentor->GetCallListN();
+ //update calls state
+ UpdateMultipleCallScreen(*pCallsList);
+ delete pCallsList;
+ pCallsList = null;
+ }
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ //get Conf call
+ AppCallInfo* pConfInfo = static_cast<AppCallInfo*>(pArgs->GetAt(0));
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ *__pActiveCallInfo = *pConfInfo;
+
+ int participantsCount = __pActiveCallInfo->GetCallerListCount();
+
+ // show participant count on name Label
+ Label* pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_PARTICIPANTS_LABEL));
+ if (pPeopleCountLbl)
+ {
+ String count;
+ count.Append(participantsCount);
+ count.Append(" ");
+ count.Append(AppUtility::GetResourceString(IDS_PEOPLE_STR));
+ pPeopleCountLbl->SetText(count);
+ }
+
+ /*if(participantsCount >= IDI_MAX_CONF_CALL_PARTICIPANTS)
+ {
+ __pCallButtonsPanel->EnableAddCallButton(false);
+ }
+ else
+ {
+ __pCallButtonsPanel->EnableAddCallButton(true);
+ }*/
+
+ __pCallButtonsPanel->EnableAddCallButton(true);
+
+ //bring button on top
+ __pCallButtonsPanel->SetButtonPosition();
+
+
+ //show call active time using Timer
+ //__activeCallStartTime = __pActiveCallInfo->GetCallConnectTime();
+ __activeCallStartTime = __pActiveCallInfo->GetDurationTime();
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, __pActiveCallInfo->IsOnHold(),__activeCallStartTime);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ if(__formType == FORMTYPE_ACTIVECALL || __formType == FORMTYPE_EMERGENCYACTIVECALL ||
+ __formType == FORMTYPE_MULTIPLECALLS || __formType == FORMTYPE_ACTIVECONFCALL)
+ {
+ //Unlock the phone if its locked
+ if(LockManager::GetInstance()->IsLocked())
+ {
+ AppLogDebug("Phone Locked");
+ LockManager::GetInstance()->Unlock();
+ }
+ }
+
+ //Hide DTMFKeypad, if visible and show caller info
+ HideDTMFKeypad();
+ SetShowStateOnKeypad(true);
+ SetShowStateOnKeypadLandscape(true);
+ __pCallButtonsPanel->SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
+
+ //Set the correct speaker status
+ if(__pCallPresentor->IsSpeakerOn() == true)
+ {
+ __pCallButtonsPanel->SetSpeakerButtonState(IDA_SPEAKER_OFF);
+ }
+ else
+ {
+ __pCallButtonsPanel->SetSpeakerButtonState(IDA_SPEAKER);
+ }
+
+ //Set the correct Mute status
+ if (__pCallPresentor->IsCallMuted() == true)
+ {
+ __pCallButtonsPanel->SetMuteButtonState(IDA_UNMUTE);
+ }
+ else
+ {
+ __pCallButtonsPanel->SetMuteButtonState(IDA_MUTE);
+ }
+
+ if (pArgs)
+ {
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+
+ //update position of call buttons panel
+ Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
+ __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
+
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(false);
+ // Adding check for N_SE-55109
+ if(CallAppControlRequestMgr::GetInstance()->IsAppControlRunning() == false)
+ {
+ __pCallPresentor->OnAppForeground();
+ }
+}
+
+void
+ActiveCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ if (__pActiveCallTimer != null)
+ {
+ __pActiveCallTimer->Cancel();
+ delete __pActiveCallTimer;
+ __pActiveCallTimer = null;
+ }
+ if (__pSmallPhotoLabel != null)
+ {
+ __pSmallPhotoLabel->SetShowState(false);
+ }
+ //Hide "Manage conf. Call" Context menu
+ if (__pMoreOptionsListAnchor != null)
+ {
+ __pMoreOptionsListAnchor->SetShowState(false);
+ }
+ if (__pMoreOptionsList != null)
+ {
+ __pMoreOptionsList->SetShowState(false);
+ }
+ __DtmfString.Clear();
+
+ if(__pDTMFKeypad != null)
+ {
+ __pDTMFKeypad->SetShowState(false);
+ }
+
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->RemoveAppStateChangeListener(*this);
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(null);
+ }
+
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+}
+
+void
+ActiveCallForm::HandleConfCallChanged(void)
+{
+ AppLog("ENTER");
+ AppAssert((__formType == FORMTYPE_ACTIVECONFCALL) || (__formType == FORMTYPE_MULTIPLECALLS));
+ //fetch changed conference call info
+ AppCallInfo* pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+ if (pConfCallInfo == null)
+ {
+ AppLog("EXIT");
+ return;
+ }
+
+ //fetch participant count in conf call
+ int participantsCount = pConfCallInfo->GetCallerListCount();
+ //update status of join and Add call
+ bool isEnableAddCall = false;
+ bool isEnableJoinCall = false;
+ if(participantsCount < IDI_MAX_CONF_CALL_PARTICIPANTS)
+ {
+ //available only at Active conf. call or active call screen
+ isEnableAddCall = true;
+ //join button is available only at multiple call screen
+ isEnableJoinCall = true;
+ }
+
+ Label* pPeopleCountLbl = null;
+ if (__pActiveCallInfo != null && __pActiveCallInfo->IsConferenceCall() == true)
+ {
+ //Active call is conference call
+ delete __pActiveCallInfo;
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ *__pActiveCallInfo = *pConfCallInfo;
+
+ if (__formType == FORMTYPE_MULTIPLECALLS)
+ {
+ pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_NUMBER1_LABEL));
+ }
+ else if (__formType == FORMTYPE_ACTIVECONFCALL)
+ {
+ pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_PARTICIPANTS_LABEL));
+ AppLog("Active conf call...(%d)", pPeopleCountLbl);
+ }
+ }
+ else if(__pHeldCallInfo != null && __pHeldCallInfo->IsConferenceCall() == true)
+ {
+ //Held call is conference call - this is definitely multiple call screen.
+ delete __pHeldCallInfo;
+ __pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ *__pHeldCallInfo = *pConfCallInfo;
+ pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_NUMBER2_LABEL));
+ }
+
+ // update participant count on name Label
+ if (pPeopleCountLbl != null)
+ {
+ String count;
+ count.Append(participantsCount);
+ count.Append(" ");
+ count.Append(AppUtility::GetResourceString(IDS_PEOPLE_STR));
+ pPeopleCountLbl->SetText(count);
+ pPeopleCountLbl->Invalidate(true);
+ }
+ //change AddCall Button status
+ //__pCallButtonsPanel->EnableAddCallButton(isEnableAddCall);
+ //change JoinCall Button status
+ __pCallButtonsPanel->EnableJoinCallButton(__pCallPresentor->IsEnableJoinCallButton());
+ AppLog("EXIT");
+}
+
+void
+ActiveCallForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+ AppLog("Enter");
+ switch (__formType)
+ {
+
+ case FORMTYPE_OUTGOINGCALL:
+ case FORMTYPE_ACTIVECALL:
+ {
+ String pContactNumber;
+ if(__pActiveCallInfo->GetContactNumber().IsEmpty() == false)
+ {
+ pContactNumber.Append(__pActiveCallInfo->GetContactNumber());
+ Contact* pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber());
+ if(pContact == null)
+ {
+ __pActiveCallInfo->ResetContactNumber(null);
+ __pActiveCallInfo->ResetContactInfo(null);
+
+ }
+ else
+ {
+ __pActiveCallInfo->SetContactNumber(pContactNumber);
+ __pActiveCallInfo->SetContactInfo(*pContact);
+ }
+ if(pContact != null)
+ {
+ delete pContact;
+ pContact = null;
+ }
+ ShowPersonDetails(pContactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ }
+ }
+ break;
+
+ case FORMTYPE_EMERGENCYACTIVECALL:
+ {
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+
+ IListT<AppCallInfo>* pCallsList = __pCallPresentor->GetCallListN();
+ if(pCallsList != null)
+ {
+ int listCount = pCallsList->GetCount();
+ for(int index = 0; index < listCount; index++)
+ {
+ AppCallInfo callInfo;
+ Contact* pContact;
+ pCallsList->GetAt(index, callInfo);
+ if(__pActiveCallInfo == null)
+ {
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ }
+ *__pActiveCallInfo = callInfo;
+ String contactNumber;
+ if(__pActiveCallInfo->GetContactNumber().IsEmpty() == false)
+ {
+ contactNumber.Append(__pActiveCallInfo->GetContactNumber());
+ pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber());
+ if(pContact == null)
+ {
+ __pActiveCallInfo->ResetContactNumber(null);
+ __pActiveCallInfo->ResetContactInfo(null);
+
+ }
+ else
+ {
+ __pActiveCallInfo->SetContactNumber(contactNumber);
+ __pActiveCallInfo->SetContactInfo(*pContact);
+ }
+ if(pContact != null)
+ {
+ delete pContact;
+ pContact = null;
+ }
+ if(callInfo.IsConferenceCall() == true)
+ {
+ continue;
+ }
+ if(callInfo.IsOnHold() == false)
+ {
+ ShowPersonDetails(contactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ }
+ else
+ {
+ ShowPersonDetails(contactNumber, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pActiveCallInfo);
+ }
+ }
+
+ }
+
+ delete pCallsList;
+ pCallsList = null;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ AppLog("Exit");
+}
+
+void
+ActiveCallForm::OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList)
+{
+ //No implementation
+}
+
+void
+ActiveCallForm::OnConfCallHoldTelephonyCallback(bool isHeld)
+{
+ //reset hold status and "OnHold" text
+ SetHoldButtonStatus(!isHeld);
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, isHeld);
+ if(__pActiveCallTimer != null)
+ {
+ __pActiveCallTimer->Cancel();
+ }
+ SetConfCallStateInProgress(false);
+}
+
+void
+ActiveCallForm::OnConfCallActiveTelephonyCallback(bool isActive)
+{
+ //reset hold status and show call timer
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL, !isActive, __activeCallStartTime);
+ SetHoldButtonStatus(isActive);
+ SetConfCallStateInProgress(false);
+}
+
+
+void
+ActiveCallForm::UpdateMultipleCallScreen(Tizen::Base::Collection::IListT<AppCallInfo>& activeCallsList)
+{
+ AppLog("ENTER");
+ if(__pActiveCallInfo != null)
+ {
+ delete __pActiveCallInfo;
+ __pActiveCallInfo = null;
+ }
+ if(__pHeldCallInfo != null)
+ {
+ delete __pHeldCallInfo;
+ __pHeldCallInfo = null;
+ }
+
+ Button* pMoreBtn = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+ if (pMoreBtn != null)
+ {
+ pMoreBtn->SetShowState(false);
+ }
+
+ //show caller's info.
+ for (int index = 0; index < activeCallsList.GetCount(); index++)
+ {
+ //Fetch call info
+ AppCallInfo callInfo;
+ activeCallsList.GetAt(index, callInfo);
+
+ String contactNo;
+ if(callInfo.GetContactNumber().IsEmpty() == false)
+ {
+ contactNo.Append(callInfo.GetContactNumber());
+ }
+ else
+ {
+ contactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+
+ if (callInfo.IsOnHold() == false)
+ {
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ *__pActiveCallInfo = callInfo;
+
+ if (__pActiveCallInfo->IsConferenceCall() == false)
+ {
+ Label* pVoiceIconLbl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
+ if (pVoiceIconLbl)
+ {
+ pVoiceIconLbl->SetShowState(true);
+ }
+ if (pMoreBtn != null)
+ {
+ pMoreBtn->SetShowState(false);
+ }
+ ShowPersonDetails(contactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ if(__pMoreOptionsListAnchor != null && __pMoreOptionsListAnchor->GetShowState() == true)
+ {
+ CreateMoreOptionsMenuList();
+ }
+ }
+ else
+ {
+ // show participant count on name Label
+ Label* pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_NUMBER1_LABEL));
+ if (pPeopleCountLbl)
+ {
+ String count;
+ count.Append(__pActiveCallInfo->GetCallerListCount());
+ count.Append(" ");
+ count.Append(AppUtility::GetResourceString(IDS_PEOPLE_STR));
+ pPeopleCountLbl->SetText(count);
+ }
+ String nameStr = AppUtility::GetResourceString(L"IDS_CONFERENCE_CALL_STRING");
+ Label* pNameLbl = static_cast<Label*>(GetControl(IDC_CALLER1_LABEL));
+ if (pNameLbl)
+ {
+ pNameLbl->SetText(nameStr);
+ }
+ Label* pVoiceIconLbl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
+ if (pVoiceIconLbl)
+ {
+ pVoiceIconLbl->SetShowState(false);
+ }
+ if (pMoreBtn != null)
+ {
+ pMoreBtn->SetShowState(true);
+ }
+ Bitmap* pPhotoBitmap = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BG_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ if (pPhotoBitmap != null)
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_CALLER1_PHOTO_LABEL));
+ if (pPhotoLbl)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pPhotoBitmap);
+ pPhotoLbl->Invalidate(true);
+ }
+ delete pPhotoBitmap;
+ }
+ }
+ //show call active time using Timer
+ //__activeCallStartTime = __pActiveCallInfo->GetCallConnectTime();
+ __activeCallStartTime = __pActiveCallInfo->GetDurationTime();
+ ShowTimerInfo(IDC_CALLER1_TIME_LABEL,false,__activeCallStartTime);
+ }
+ else
+ {
+ __pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ *__pHeldCallInfo = callInfo;
+
+ if (__pHeldCallInfo->IsConferenceCall() == false)
+ {
+ ShowPersonDetails(contactNo, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pHeldCallInfo);
+ }
+ else
+ {
+ // show participant count on name Label
+ Label* pPeopleCountLbl = static_cast<Label*>(GetControl(IDC_NUMBER2_LABEL));
+ if (pPeopleCountLbl)
+ {
+ String count;
+ count.Append(__pHeldCallInfo->GetCallerListCount());
+ count.Append(" ");
+ count.Append(AppUtility::GetResourceString(IDS_PEOPLE_STR));
+ pPeopleCountLbl->SetText(count);
+ }
+ String nameStr = AppUtility::GetResourceString(L"IDS_CONFERENCE_CALL_STRING");
+ Label* pNameLbl = static_cast<Label*>(GetControl(IDC_CALLER2_LABEL));
+ if (pNameLbl)
+ {
+ pNameLbl->SetText(nameStr);
+ }
+ Bitmap* pPhotoBitmap = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BG_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ if (pPhotoBitmap != null)
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_CALLER2_PHOTO_LABEL));
+ if (pPhotoLbl)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pPhotoBitmap);
+ pPhotoLbl->Invalidate(true);
+ }
+ delete pPhotoBitmap;
+ }
+ }
+ //show "On Hold"
+ ShowTimerInfo(IDC_CALLER2_TIME_LABEL, true);
+ }
+ }
+
+ //update JoinCall button status
+ __pCallButtonsPanel->EnableJoinCallButton(__pCallPresentor->IsEnableJoinCallButton());
+ Invalidate(true);
+ AppLog("EXIT");
+}
+
+void
+ActiveCallForm::ShowPersonDetails(const String& phoneNumber, const String& contactLblName, const String& nameLblName, bool isSecondCaller, AppCallInfo* pCallInfo)
+{
+ result r = E_FAILURE;
+
+ //call individual methods to show contact number, caller name & photo
+ ShowPhoneNumber(phoneNumber, contactLblName);
+
+ //fetch contact details based on phone number
+ String* pDisplayName = pCallInfo->FetchLatestCallerNameN(phoneNumber);
+ ShowCallerName(*pDisplayName, nameLblName);
+
+ Bitmap* pPhotoBitmap = pCallInfo->FetchLatestCallerPhotoN(phoneNumber);
+ ShowCallerPhoto(pPhotoBitmap, isSecondCaller);
+
+ //free resources
+ if (pDisplayName)
+ {
+ delete pDisplayName;
+ pDisplayName = null;
+ }
+ if (pPhotoBitmap)
+ {
+ delete pPhotoBitmap;
+ pPhotoBitmap = null;
+ }
+}
+
+void
+ActiveCallForm::ShowPhoneNumber(const String& phoneNumber, const String& contactLblName)
+{
+ String formattedNumber = phoneNumber;
+
+ Label* pContactLbl = static_cast<Label*>(GetControl(contactLblName));
+ if (pContactLbl)
+ {
+ pContactLbl->SetText(formattedNumber);
+ pContactLbl->Invalidate(true);
+ }
+}
+
+void
+ActiveCallForm::ShowCallerName(const String& callerName, const String& nameLblName)
+{
+ // show display name on name Label
+ Label* pNameLbl = static_cast<Label*>(GetControl(nameLblName));
+ if (pNameLbl)
+ {
+ //passing an empty string to SetText fails in label,
+ //if previously valid text has been set
+ if (callerName.IsEmpty() == true && pNameLbl->GetText().IsEmpty() == false)
+ {
+ String stringToBeSet(L" ");
+ pNameLbl->SetText(stringToBeSet);
+ }
+ else
+ {
+ pNameLbl->SetText(callerName);
+ }
+ pNameLbl->Invalidate(true);
+ }
+}
+
+void
+ActiveCallForm::ShowCallerPhoto(Bitmap* pPhotoId, bool isSecondCaller)
+{
+ //to check if default image is to be shown
+ bool showDefaultPhoto = false;
+ bool showSmallPhoto = false;
+ String photoLabel("");
+
+ switch (__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ case FORMTYPE_ACTIVECALL:
+ {
+ if (pPhotoId == null)
+ {
+ //show default caller image
+ showDefaultPhoto = true;
+ }
+ else
+ {
+ //Check the size of photo
+ // Now checking the condition with && but actually it should be ||
+ //But for now keeping it as && because _pContact->GetThubNail() returns image width as
+ // height 270 and width = 480 . So all images set thru gallery is show as small image
+ if(pPhotoId->GetHeight() <= H_SMALL_PHOTO
+ && pPhotoId->GetWidth() <= W_SMALL_PHOTO)
+ {
+ showSmallPhoto = true;
+ }
+
+ }
+ photoLabel.Append(IDC_CALLER1_BIGPHOTO_LABEL);
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ if (isSecondCaller)
+ {
+ photoLabel.Append(IDC_CALLER2_PHOTO_LABEL);
+ }
+ else
+ {
+ photoLabel.Append(IDC_CALLER1_PHOTO_LABEL);
+ }
+
+ if (pPhotoId == null)
+ {
+ showDefaultPhoto = true;
+ }
+ else
+ {
+ if (pPhotoId->GetHeight() <= H_SMALL_PHOTO
+ && pPhotoId->GetWidth() <= W_SMALL_PHOTO)
+ {
+ //pPhotoId->Scale(Dimension(W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO));
+ showSmallPhoto = true;
+ }
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Remove small photo label
+ if (__pSmallPhotoLabel != null)
+ {
+ RemoveControl(__pSmallPhotoLabel);
+ __pSmallPhotoLabel = null;
+ }
+
+ //show photo - for Big Photo Id, Animated Call Image
+ if (!showDefaultPhoto)
+ {
+ if(showSmallPhoto == true)
+ {
+ ShowThumbnailImage(pPhotoId,photoLabel);
+ }
+ else
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLabel));
+ if (pPhotoLbl)
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,*pPhotoId);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ }
+ }
+ }
+ else
+ {
+ Bitmap* pDefaultPhoto = null;
+ switch (__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ case FORMTYPE_ACTIVECALL:
+ pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_ACTIVE_CALL_DEFAULT_ICON,W_CONFERENCE_PHOTO,W_CONFERENCE_PHOTO);
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_MULTIPLE_CALL_DEFAULT_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BIG_BG_ICON,W_CONFERENCE_PHOTO,W_CONFERENCE_PHOTO);
+ break;
+
+ default:
+ break;
+ }
+ if (pDefaultPhoto != null)
+ {
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLabel));
+ if (pPhotoLbl)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pDefaultPhoto);
+ pPhotoLbl->Invalidate(true);
+ }
+ delete pDefaultPhoto;
+ }
+ }
+}
+
+void
+ActiveCallForm::ShowThumbnailImage(const Bitmap* pPhotoId,String& photoLabel)
+{
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLabel));
+
+ if (pPhotoLbl != null && pPhotoId != null)
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Bitmap* pBackground = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_BACKGROUND,W_CALL_THUMBNAIL,H_CALL_THUMBNAIL);
+ Bitmap* pShadow = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_SHADOW,W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW);
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the back ground
+ pCanvas->DrawBitmap(canvasRect,*pBackground);
+ //draw shadow (to be enabled after correct shadow image is provided )
+ //pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_CALL_THUMBNAIL_SHADOW/2),
+ // (pPhotoLbl->GetBounds().height/2)-(H_CALL_THUMBNAIL_SHADOW/2),W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW),*pShadow);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_SMALL_PHOTO/2),
+ (pPhotoLbl->GetBounds().height/2)-(H_SMALL_PHOTO/2),W_SMALL_PHOTO,H_SMALL_PHOTO),*pPhotoId);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ delete pBackground;
+ delete pShadow;
+ }
+
+}
+
+void
+ActiveCallForm::ShowCallersPhotoThumbnail(const Bitmap& pPhotoId)
+{
+ if (__pSmallPhotoLabel != null)
+ {
+ RemoveControl(__pSmallPhotoLabel);
+ __pSmallPhotoLabel = null;
+ }
+ //Draw Small Photo and show on small photo label
+ __pSmallPhotoLabel = new (std::nothrow) Label();//static_cast<Label*>(GetControl(IDC_SMALL_PHOTO_LABEL));
+ __pSmallPhotoLabel->Construct(Rectangle(X_PHOTO_LBL, Y_PHOTO_LBL, W_PHOTO_LBL, H_PHOTO_LBL), L"");
+ __pSmallPhotoLabel->SetBackgroundColor(Color(0,0,0));
+ __pSmallPhotoLabel->SetBackgroundBitmap(pPhotoId);
+ // Add a Label to the Form
+ AddControl(__pSmallPhotoLabel);
+ __pSmallPhotoLabel->Invalidate(true);
+}
+
+void
+ActiveCallForm::ShowTimerInfo(const String& timerLblName, bool isOnHold, long long startTime)
+{
+ Label* pTimerLbl = static_cast<Label*>(GetControl(timerLblName));
+
+ if (__pActiveCallTimer == null)
+ {
+ __pActiveCallTimer = new (std::nothrow) Tizen::Base::Runtime::Timer();
+ __pActiveCallTimer->Construct(*this);
+ }
+
+ if (pTimerLbl != null)
+ {
+ if (isOnHold == true)
+ {
+ pTimerLbl->SetText(AppUtility::GetResourceString(IDS_TIMER_ON_HOLD));
+ //update Hold button status
+ SetHoldButtonStatus(false);
+ }
+ else
+ {
+ //update Hold button status
+ SetHoldButtonStatus(true);
+ //current system time
+ long long currTime = 0;
+ //SystemTime::GetTicks(currTime);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ currTime = pPhoneApp->GetCallAppTicks();
+ //Set call duration
+ TimeSpan diffSpan(abs(startTime - currTime));
+
+ String activeCallTime(L"");
+
+ long long hr = diffSpan.GetHours();
+ if (hr <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(hr);
+ activeCallTime.Append(L":");
+
+ long long min = diffSpan.GetMinutes();
+ if (min <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(min);
+ activeCallTime.Append(L":");
+
+ long long sec = diffSpan.GetSeconds();
+ if (sec <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(sec);
+
+ pTimerLbl->SetText(activeCallTime);
+ __pActiveCallTimer->StartAsRepeatable(TimeSpan::NUM_OF_TICKS_IN_SECOND);
+ }
+ pTimerLbl->Invalidate(true);
+ }
+}
+
+void
+ActiveCallForm::SetHoldButtonShowState(bool showState)
+{
+ Label* pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
+ if(pLblControl != null)
+ {
+ pLblControl->SetShowState(showState);
+ }
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
+ if(pButtonControl != null)
+ {
+ pButtonControl->SetShowState(showState);
+ }
+}
+
+void
+ActiveCallForm::SetShowStateOnKeypadLandscape(bool showState)
+{
+ switch (__formType)
+ {
+ case FORMTYPE_ACTIVECONFCALL:
+ case FORMTYPE_ACTIVECALL:
+ {
+ SetHoldButtonShowState(showState);
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_NUMBER2_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_TIME_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_SWAP_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_BACKGROUND_LABEL2));
+ pLblControl->SetShowState(showState);
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_SWAP_BUTTON));
+ pButtonControl->SetShowState(showState);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+ActiveCallForm::SetShowStateOnKeypad(bool showState)
+{
+ Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER1_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_BACKGROUND_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_CALLER1_TIME_LABEL));
+ pLblControl->SetShowState(showState);
+ if (__pSmallPhotoLabel != null)
+ {
+ __pSmallPhotoLabel->SetShowState(showState);
+ }
+
+ switch (__formType)
+ {
+ case FORMTYPE_ACTIVECALL:
+ {
+ pLblControl = static_cast<Label*>(GetControl(IDC_NUMBER1_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
+ pLblControl->SetShowState(showState);
+ SetHoldButtonShowState(showState);
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ pLblControl = static_cast<Label*>(GetControl(IDC_NUMBER1_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_NUMBER2_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_TIME_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_SWAP_LABEL));
+ pLblControl->SetShowState(showState);
+ pLblControl = static_cast<Label*>(GetControl(IDC_BACKGROUND_LABEL2));
+ pLblControl->SetShowState(showState);
+ if (__pActiveCallInfo != null && __pActiveCallInfo->IsConferenceCall() == false)
+ {
+ pLblControl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
+ pLblControl->SetShowState(showState);
+ }
+ else
+ {
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+ pButtonControl->SetShowState(showState);
+ }
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_SWAP_BUTTON));
+ pButtonControl->SetShowState(showState);
+ }
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ pLblControl = static_cast<Label*>(GetControl(IDC_PARTICIPANTS_LABEL));
+ pLblControl->SetShowState(showState);
+ SetHoldButtonShowState(showState);
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+ pButtonControl->SetShowState(showState);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+ActiveCallForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ //Call default implementation of "Object.Equals()"
+ //returns true, if they are pointing to same address.
+ if (__pActiveCallTimer->Equals(timer))
+ {
+ Label* pTimerLbl = static_cast<Label*>(GetControl(IDC_CALLER1_TIME_LABEL));
+ if (pTimerLbl)
+ {
+ String activeCallTime = pTimerLbl->GetText();
+ // Create a StringTokenizer instance
+ StringTokenizer strTokens(activeCallTime, L":");
+
+ int count = strTokens.GetTokenCount(); // count == 3
+ String token;
+ int sec = 0;
+ int min = 0;
+ int hr = 0;
+ for (int index = 0; index < count; index++)
+ {
+ switch (index)
+ {
+ case 0:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, hr);
+ break;
+
+ case 1:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, min);
+ break;
+
+ case 2:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, sec);
+ break;
+ }
+ }
+ //update all values
+ sec = sec + 1;
+ if (sec == IDI_MAX_SECONDS)
+ {
+ sec = 0;
+ min = min + 1;
+ }
+ if (min == IDI_MAX_MINS)
+ {
+ min = 0;
+ hr = hr + 1;
+ }
+
+ //replace string
+ activeCallTime.Clear();
+ if (hr <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(hr);
+ activeCallTime.Append(":");
+ if (min <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(min);
+ activeCallTime.Append(":");
+ if (sec <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(sec);
+ //update timer label
+ pTimerLbl->SetText(activeCallTime);
+ pTimerLbl->Invalidate(true);
+ }
+ }
+}
+
+///////////////////////////////////////////////////////////
+/////////// Options Menu List Functionality /////////
+///////////////////////////////////////////////////////////
+void
+ActiveCallForm::OnListViewContextItemStateChanged(ListView& listView, int index, int elementId, ListContextItemStatus state)
+{
+}
+
+void
+ActiveCallForm::OnListViewItemStateChanged(ListView& listView, int index, int elementId, ListItemStatus status)
+{
+ //Goto conference call list form
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALLLIST, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_KEEP), null);
+}
+
+void
+ActiveCallForm::OnListViewItemSwept(ListView& listView, int index, SweepDirection direction)
+{
+}
+
+void
+ActiveCallForm::OnListViewItemLongPressed(ListView& listView, int index, int elementId, bool& invokeListViewItemCallback)
+{
+}
+
+int
+ActiveCallForm::GetItemCount(void)
+{
+ return IDI_MOREOPTIONS_LIST_ITEMS;
+}
+
+ListItemBase*
+ActiveCallForm::CreateItem(int index, int itemWidth)
+{
+ //create 1st Menu option
+ CustomItem* pItem = new (std::nothrow) CustomItem();
+ pItem->Construct(IDI_OPTIONMENU_DIMEN, LIST_ANNEX_STYLE_NORMAL);
+
+ //Set background 9-patch bitmap to option menu
+ Bitmap* pBgBmp = AppUtility::GetBitmapFromResourcesN(IDB_POPUP_BG_ICON);
+ if (pBgBmp != null && pBgBmp->IsNinePatchedBitmap())
+ {
+ Canvas bgCanvas;
+ bgCanvas.Construct(Rectangle(IDI_OPTIONMENU_POS, IDI_OPTIONMENU_DIMEN));
+ bgCanvas.DrawNinePatchedBitmap(bgCanvas.GetBounds(), *pBgBmp);
+ }
+ else
+ {
+ pItem->SetBackgroundColor(LIST_ITEM_DRAWING_STATUS_NORMAL, Color(40, 45, 48));
+ }
+ delete pBgBmp;
+ pBgBmp = null;
+
+ //Set bitmap to option menu
+ Bitmap* pNormalConfCallBmp = AppUtility::GetBitmapFromResourcesN(IDB_MORE_MANAGE_CONFERENCE_ICON ,
+ W_MGR_CONFCALL_BITMAP, H_MGR_CONFCALL_BITMAP);
+ pItem->AddElement(Rectangle(16, 17, W_MGR_CONFCALL_BITMAP, H_MGR_CONFCALL_BITMAP), 1, *pNormalConfCallBmp, null, null);
+ // Deallocate bitmaps
+ delete pNormalConfCallBmp;
+ pNormalConfCallBmp = null;
+
+ //Set text to menu option
+ String confCallName = AppUtility::GetResourceString(IDS_MGR_CONF_CALL_LIST_STR);
+
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(confCallName);
+ pTextElement->SetTextColor(COLOR_POPUP_TEXT);
+ //create font
+ Font font;
+ font.Construct(FONT_STYLE_PLAIN, IDI_POPUP_TEXT_SIZE);
+ pTextElement->SetFont(font);
+ //construct Enriched text
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ FloatDimension textDimension;
+ font.GetTextExtent(confCallName, confCallName.GetLength(), textDimension);
+ textDimension.height = textDimension.height + font.GetDescender();
+ pEnrichedText->Construct(textDimension);
+ //add text element to enriched text
+ pEnrichedText->Add(*pTextElement);
+
+ //Add Enriched text to pItem
+ FloatPoint textPos(((2 * IDI_OPTIONMENU_ITEM_SPACING) + W_MGR_CONFCALL_BITMAP), ((IDI_OPTIONMENU_DIMEN.height - textDimension.height) / 2));
+ pItem->AddElement(FloatRectangle(textPos, textDimension), 2, *pEnrichedText);
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ return pItem;
+}
+
+bool
+ActiveCallForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ return true;
+}
+
+void
+ActiveCallForm::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ __pCallPresentor->OnAppForeground();
+}
+
+void
+ActiveCallForm::OnSettingChanged(Tizen::Base::String& key)
+{
+ if(key == L"http://tizen.org/setting/contacts.order.firstname")
+ {
+ IListT<AppCallInfo>* pCallsList = __pCallPresentor->GetCallListN();
+ if(pCallsList != null)
+ {
+ int listCount = pCallsList->GetCount();
+ for(int index = 0; index < listCount; index++)
+ {
+ AppCallInfo callInfo;
+ Contact* pContact;
+ pCallsList->GetAt(index, callInfo);
+ if(__pActiveCallInfo == null)
+ {
+ __pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ }
+ *__pActiveCallInfo = callInfo;
+ String contactNumber;
+ contactNumber.Append(__pActiveCallInfo->GetContactNumber());
+ pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber());
+ if(pContact == null)
+ {
+ __pActiveCallInfo->ResetContactNumber(null);
+ __pActiveCallInfo->ResetContactInfo(null);
+
+ }
+ else
+ {
+ __pActiveCallInfo->SetContactNumber(contactNumber);
+ __pActiveCallInfo->SetContactInfo(*pContact);
+ }
+ if(pContact != null)
+ {
+ delete pContact;
+ pContact = null;
+ }
+ if(callInfo.IsConferenceCall() == true)
+ {
+ continue;
+ }
+ if(callInfo.IsOnHold() == false)
+ {
+ ShowPersonDetails(contactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+ }
+ else
+ {
+ ShowPersonDetails(contactNumber, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pActiveCallInfo);
+ }
+
+ }
+
+ delete pCallsList;
+ pCallsList = null;
+ }
+ }
+
+}
+
+
+bool
+ActiveCallForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+
+ if(keyEventInfo.GetKeyCode() == KEY_BACKSPACE || keyEventInfo.GetKeyCode() == KEY_DELETE)
+ {
+ if(__pDTMFKeypad != null)
+ {
+ EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
+ if(source.Equals(*pTextBox))
+ {
+ AppLogDebug("Enter");
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+/**
+ * Name : CallApp
+ * Version :
+ * Vendor :
+ * Description :
+ */
+
+#include <FUi.h>
+#include <FShell.h>
+#include "CallApp.h"
+#include "CallAppFrame.h"
+#include "CallPresentationModel.h"
+#include "CallTypes.h"
+#include "CallAppUtility.h"
+#include "CallIAppStateChangeListner.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Shell;
+
+static const int FONT_SIZE_AUTOREJECT_POPUP_TEXT = 36;
+
+
+CallApp::CallApp(void):__initialSceneId(L""), __pLaunchArgs(null)
+{
+ __listenerList.Construct();
+ __pCallRejectedIonPopup = null;
+ __pCallAppTimer = null;
+ __callTicks = 0;
+}
+
+CallApp::~CallApp(void)
+{
+}
+
+UiApp*
+CallApp::CreateInstance(void)
+{
+ // Create the instance through the constructor.
+ return new CallApp();
+}
+
+bool
+CallApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+ AppControlProviderManager* pProviderMgr = AppControlProviderManager::GetInstance();
+ pProviderMgr->SetAppControlProviderEventListener(this);
+ PowerManager::AddScreenEventListener(*this);
+ __callRejectedIontimer.Construct(*this);
+ return true;
+}
+
+bool
+CallApp::OnAppInitialized(void)
+{
+ // TODO:
+ // Comment.
+ AppManager::GetInstance()->AddActiveAppEventListener(*this);
+
+
+ // Create a Frame
+ CallAppFrame* pCallAppFrame = new CallAppFrame();
+ pCallAppFrame->Construct();
+ pCallAppFrame->SetName(L"CallApp");
+ AddFrame(*pCallAppFrame);
+
+ //Check if there is no initial scene, then exit application.
+ //This case will normally come when invalid AppControl request has come,
+ //or incoming call is coming from unknown number and "reject unknown number" settings is enabled.
+ if (GetInitialScene().IsEmpty() == true)
+ {
+ return false;
+ }
+
+ if (__pCallAppTimer == null)
+ {
+ __pCallAppTimer = new (std::nothrow) Tizen::Base::Runtime::Timer();
+ __pCallAppTimer->Construct(*this);
+ long long currTime = 0;
+ SystemTime::GetTicks(currTime);
+ __callTicks = currTime;
+ __pCallAppTimer->StartAsRepeatable(TimeSpan::NUM_OF_TICKS_IN_SECOND);
+ }
+
+
+ return true;
+}
+
+bool
+CallApp::OnAppWillTerminate(void)
+{
+ // TODO:
+ // Comment.
+ return true;
+}
+
+bool
+CallApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+ // TODO:
+ // Deallocate resources allocated by this App for termination.
+ // The App's permanent data and context can be saved via appRegistry.
+ PowerManager::RemoveScreenEventListener(*this);
+ if (__pCallAppTimer != null)
+ {
+ __pCallAppTimer->Cancel();
+ delete __pCallAppTimer;
+ }
+
+ AppManager::GetInstance()->RemoveActiveAppEventListener(*this);
+ return true;
+}
+
+void
+CallApp::OnForeground(void)
+{
+ AppLogDebug("Enter");
+}
+
+void
+CallApp::OnBackground(void)
+{
+ // TODO:
+ // Stop drawing when the application is moved to the background.
+}
+
+void
+CallApp::OnLowMemory(void)
+{
+ // TODO:
+ // Free unused resources or close the application.
+}
+
+void
+CallApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+ // TODO:
+ // Handle any changes in battery level here.
+ // Stop using multimedia features(camera, mp3 etc.) if the battery level is CRITICAL.
+}
+
+void
+CallApp::OnScreenOn(void)
+{
+ // TODO:
+ // Get the released resources or resume the operations that were paused or stopped in OnScreenOff().
+}
+
+void
+CallApp::OnScreenOff(void)
+{
+ AppLogDebug("Enter");
+ IEnumerator* pEnum = __listenerList.GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ IAppStateChangeListener* pInterface = static_cast<IAppStateChangeListener*>(pEnum->GetCurrent());
+ if (pInterface == null)
+ {
+ delete pEnum;
+
+ return;
+ }
+ pInterface->OnScreenOff();
+ }
+ delete pEnum;
+
+}
+
+SceneId
+CallApp::GetInitialScene(void)
+{
+ return __initialSceneId;
+}
+
+IList*
+CallApp::GetAppLaunchArguments(void)
+{
+ return __pLaunchArgs;
+}
+
+void
+CallApp::AddAppStateChangeListener(const IAppStateChangeListener& listener)
+{
+ __listenerList.Add(listener);
+
+}
+void
+CallApp::RemoveAppStateChangeListener(const IAppStateChangeListener& listener)
+{
+ __listenerList.Remove(listener);
+}
+
+void
+CallApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUriData,
+ const String* pMimeType, const IMap* pExtraData)
+{
+ AppLogDebug("Enter ");
+ if(pUriData != null)
+ {
+ AppLogDebug("%ls ",pUriData->GetPointer());
+ }
+
+ if(pExtraData == null && pUriData != null)
+ {
+ //The request is from web app
+ AppLogDebug("%ls",pUriData->GetPointer());
+ ProcessWebAppControlRequest(reqId, operationId, pUriData);
+ }
+ else
+ {
+ //process AppControl parameters
+ ProcessAppControlRequest(reqId, operationId, pExtraData,pUriData);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+CallApp::ProcessWebAppControlRequest(RequestId reqId, const String& operationId,const String* pUriData)
+{
+ //Construct map from string
+ String delim(DELIMITER);
+ StringTokenizer st(*pUriData,delim);
+ String token;
+ HashMap extraData;
+ extraData.Construct();
+ while(st.HasMoreTokens())
+ {
+ String key=L"";
+ String value=L"";
+ st.GetNextToken(token);
+ token.Trim();
+ key.Append(token);
+ if(st.HasMoreTokens())
+ {
+ token.Clear();
+ st.GetNextToken(token);
+ token.Trim();
+ value.Append(token);
+ }
+ extraData.Add(new (std::nothrow) String(key), new (std::nothrow) String(value));
+ }
+
+ //Adding this explicitly as there no other way to invoke call from webapp
+ extraData.Add(new (std::nothrow) String(PARAM_CALL_TYPE), new (std::nothrow) String(PARAM_CALL_VALUE_VOICE));
+
+ ProcessAppControlRequest(reqId,operationId,&extraData);
+
+ extraData.RemoveAll(true);
+}
+
+void
+CallApp::ProcessAppControlRequest(RequestId reqId, const String& operationId,const IMap* pArgsMap,const String* pUriData)
+{
+ AppLogDebug("Enter %ls",operationId.GetPointer());
+ __pLaunchArgs = null;
+ if(operationId.Equals(OPERATION_ID_CALL,true) == true)
+ {
+ AppLogDebug("OPERATION_ID_CALL");
+ if(pArgsMap != null)
+ {
+ bool isIncomingCallRequest = false;
+ String* pKey = new (std::nothrow) String(LAUNCHTYPE);
+ if (pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if ((pValue != null) && (pValue->Equals(PARAM_ORIGIN_MT, true) == true))
+ {
+ isIncomingCallRequest = true;
+ }
+ }
+ //Check if incoming call request or outgoing call request
+ if(isIncomingCallRequest == true)
+ {
+ HandleIncomingCallAppControlRequest(reqId, pArgsMap);
+ }
+ else
+ {
+ HandleDialCallAppControlRequest(reqId, pArgsMap,pUriData);
+ }
+ }
+ else
+ {
+ AppLogDebug("pArgsMap == null");
+ }
+ }
+}
+
+void
+CallApp::HandleIncomingCallAppControlRequest(RequestId reqId,const IMap* pArgsMap)
+{
+ AppLogDebug("Enter");
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ //response message
+ AppCtrlResult appControlResult = APP_CTRL_RESULT_FAILED;
+
+ //call handle
+ String callHandle(L"");
+ String* pKey = new (std::nothrow) String(CALL_HANDLE);
+ if (pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if (pValue != null)
+ {
+ callHandle.Append(*pValue);
+ }
+ }
+ delete pKey;
+ //contact number
+ String contactNumber(L"");
+ pKey = new (std::nothrow) String(CONTACT_NUMBER);
+ if (pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pContactValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if (pContactValue != null)
+ {
+ contactNumber.Append(*pContactValue);
+ AppLogDebug("%ls",contactNumber.GetPointer());
+ }
+ }
+ delete pKey;
+ pKey = null;
+
+ //Fetch incoming call details
+ CallPresentationModel* pCallPresentor = CallPresentationModel::GetInstance();
+ //Check if there is already a dial call present .This can happen in some
+ //race conditions N_SE-39531
+ // removing this as per N_SE-49099
+ if(pCallPresentor->IsIncomingorDialingCallPresent())
+ {
+ int incomingHandle;
+ Integer::Parse(callHandle,incomingHandle);
+ pCallPresentor->RejectCall(incomingHandle,false,contactNumber);
+ AppLog("Cancelled already an incoming call present");
+ appControlResult = APP_CTRL_RESULT_CANCELED;
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+ return;
+ }
+
+ AppCallInfo* pIncomingCall = pCallPresentor->FetchIncomingCallDetailsN(callHandle, contactNumber);
+ if(pIncomingCall != null)
+ {
+ bool isCallRejected = pCallPresentor->CheckIncomingCallToBeRejected(pIncomingCall);
+ if(isCallRejected == false)
+ {
+ //save app launch argument list
+ __pLaunchArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pLaunchArgs->Construct(1);
+ __pLaunchArgs->Add(pIncomingCall);
+ if(__initialSceneId.IsEmpty() == true)
+ {
+ __initialSceneId = IDSCN_SCENE_INCOMINGCALL;
+ }
+ else
+ {
+ //App already initialized, goto incoming call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_INCOMINGCALL, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_DESTROY), __pLaunchArgs);
+ __pLaunchArgs = null;
+ }
+
+
+ }
+ else
+ {
+ //Show messageBox showing automatic call rejection
+ /*MessageBox callRejectedInoMsgBox;
+ String msg(L"Call From ");
+ msg.Append(contactNumber);
+ msg.Append(L" Rejected.");
+ callRejectedInoMsgBox.Construct(L"Call Rejected", msg, MSGBOX_STYLE_NONE,1000);
+ int modalResult = 0;
+ // Calls ShowAndWait() : Draws and Shows itself and processes events
+ callRejectedInoMsgBox.ShowAndWait(modalResult);*/
+ //go back to previous scene if App was already running, else exit application.
+ if(__initialSceneId.IsEmpty() == true)
+ {
+ //KEEP "__initialSceneId" as empty and return false from "OnAppInitialized()"
+ AppLog("Terminate Phone Application");
+ Terminate();
+ }
+ else
+ {
+
+ ShowAutoRejectPopup(contactNumber);
+
+ }
+ }
+ //set success message
+ appControlResult = APP_CTRL_RESULT_SUCCEEDED;
+ }
+ else
+ {
+ appControlResult = APP_CTRL_RESULT_FAILED;
+ }
+ AppLogDebug("Exiting %d",appControlResult);
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+}
+
+void
+CallApp::ShowAutoRejectPopup(Tizen::Base::String contactNumber)
+{
+ String msg(AppUtility::GetResourceString(IDS_CALL_REJECT_FROM_STRING));
+ msg.Append(L" ");
+ msg.Append(contactNumber);
+ if(__pCallRejectedIonPopup != null)
+ {
+ delete __pCallRejectedIonPopup;
+ __pCallRejectedIonPopup = null;
+ }
+ __pCallRejectedIonPopup = new (std::nothrow) Popup();
+ Tizen::Graphics::Dimension dim(600,200);
+ __pCallRejectedIonPopup->Construct(true, dim);
+ __pCallRejectedIonPopup->SetTitleText(AppUtility::GetResourceString(IDS_CALL_REJECTED_TITLE_STRING));
+ Label* pLabelText = new (std::nothrow) Label();
+ pLabelText->Construct(Tizen::Graphics::Rectangle(0, 0, dim.width, dim.height-100), msg);
+ pLabelText->SetTextConfig(FONT_SIZE_AUTOREJECT_POPUP_TEXT, LABEL_TEXT_STYLE_NORMAL);
+ pLabelText->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pLabelText->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ __pCallRejectedIonPopup->AddControl(pLabelText);
+ __pCallRejectedIonPopup->Show();
+ __pCallRejectedIonPopup->SetShowState(true);
+ __callRejectedIontimer.Start(3000);
+}
+
+void
+CallApp::OnTimerExpired(Tizen::Base::Runtime::Timer &timer)
+{
+ if (__callRejectedIontimer.Equals(timer))
+ {
+ if(__pCallRejectedIonPopup != null)
+ {
+ delete __pCallRejectedIonPopup;
+ __pCallRejectedIonPopup = null;
+ }
+ }
+
+ if(__pCallAppTimer->Equals(timer))
+ {
+ __callTicks += 1000;
+ }
+}
+
+void
+CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,const String* pUriData)
+{
+ //response message
+ AppCtrlResult appControlResult = APP_CTRL_RESULT_FAILED;
+
+ if (pArgsMap != null)
+ {
+ String callType(L"");
+ String phoneNumber(L"");
+ //phone number
+ String* pKey = new (std::nothrow) String(PARAM_PHONE_NUMBER);
+ if(pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pPhoneValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if(pPhoneValue != null)
+ {
+ AppLogDebug("%ls",pPhoneValue->GetPointer());
+ phoneNumber.Append(*pPhoneValue);
+ }
+ }
+ else
+ {
+ AppLogDebug("PARAM_PHONE_NUMBER not present");
+ //Now check if tel uri is present
+ if(pUriData != null)
+ {
+ AppLogDebug("pUriData is present %ls",pUriData->GetPointer());
+ phoneNumber.Append(*pUriData);
+ if(phoneNumber.Contains(PARAM_PHONE_NUMBER))
+ {
+ phoneNumber.Replace(PARAM_PHONE_NUMBER,L"");
+ if(phoneNumber.Contains(DELIMITER))
+ {
+ phoneNumber.Replace(DELIMITER,L"");
+ AppLogDebug("%ls",phoneNumber.GetPointer());
+ }
+ }
+ AppLogDebug("%ls",phoneNumber.GetPointer());
+ }
+ }
+ delete pKey;
+ //Check if its a valid number
+ /* if(CheckNumberIsValid(phoneNumber) == false)
+ {
+ //go back to previous scene if App was already running, else exit application.
+ if(__initialSceneId.IsEmpty() == true)
+ {
+ //KEEP "__initialSceneId" as empty and return false from "OnAppInitialized()"
+ AppLog("Terminate Phone Application");
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+ Terminate();
+ return;
+ }
+ else
+ {
+ //invalid phone number.always return, but App will come to foreground
+ //and show current screen, if any calls is present.
+ return;
+ }
+ }*/
+ //call type
+ pKey = new (std::nothrow) String(PARAM_CALL_TYPE);
+ if(pArgsMap->ContainsKey(*pKey) == true)
+ {
+ const String* pCallTypeValue = static_cast<const String*>(pArgsMap->GetValue(*pKey));
+ if(pCallTypeValue != null)
+ {
+ callType.Append(*pCallTypeValue);
+ }
+ }
+ delete pKey;
+ pKey = null;
+
+ //Fetch currently active call count
+ if (callType.IsEmpty() == false
+ && callType.Equals(PARAM_CALL_VALUE_VOICE, false) == true
+ && phoneNumber.IsEmpty() == false)
+ {
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ //check if there is already a call in dialing mode, then dont accept any other dialing request.
+ if (pSceneManager->GetCurrentSceneId() == IDSCN_SCENE_OUTCALL
+ || pSceneManager->GetCurrentSceneId()
+ == IDSCN_SCENE_OUT_EMERGENCYCALL)
+ {
+ AppLog("Cancelled");
+ appControlResult = APP_CTRL_RESULT_CANCELED;
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+ return;
+ }
+
+ CallPresentationModel* pCallPresentor = CallPresentationModel::GetInstance();
+ //Check if there is already an incoming call
+ //this can happen in some race conditions N_SE-39531
+ if(pCallPresentor->IsIncomingorDialingCallPresent() == true)
+ {
+ AppLog("Cancelled already an incoming call present");
+ appControlResult = APP_CTRL_RESULT_CANCELED;
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+ return;
+ }
+ int currentActiveCallCount = pCallPresentor->GetCurrentCallCount();
+ if(currentActiveCallCount <= 1)
+ {
+ //Abort any AppControl Request running already to show incoming call screen
+ /* if (pCallPresentor->IsAppControlRunning() == true)
+ {
+ pCallPresentor->AbortAppControlRequest();
+ }*/
+ //make an outgoing call with given number
+ String* contactTxt = new (std::nothrow) String(phoneNumber);
+ __pLaunchArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pLaunchArgs->Construct();
+ __pLaunchArgs->Add(contactTxt);
+ bool isEmergencyCall = pCallPresentor->IsEmergencyNumber(*contactTxt, true);
+
+ SceneId nextScene = IDSCN_SCENE_OUTCALL;
+ if (isEmergencyCall)
+ {
+ nextScene = IDSCN_SCENE_OUT_EMERGENCYCALL;
+ }
+ //Check if app was already running
+ if(__initialSceneId.IsEmpty() == true)
+ {
+ //phone App is not already launched
+ __initialSceneId = nextScene;
+ }
+ else
+ {
+ AppLog("Outgoing call");
+ pSceneManager->GoForward( ForwardSceneTransition( nextScene, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
+ SCENE_HISTORY_OPTION_NO_HISTORY, SCENE_DESTROY_OPTION_KEEP), __pLaunchArgs);
+ }
+ appControlResult = APP_CTRL_RESULT_SUCCEEDED;
+ }
+ else
+ {
+ //already 2 active calls, 3rd call not allowed
+ appControlResult = APP_CTRL_RESULT_CANCELED;
+ }
+ }
+ else
+ {
+ appControlResult = APP_CTRL_RESULT_FAILED;
+ }
+ }
+ //send response message
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId, appControlResult, null);
+}
+
+bool
+CallApp::CheckNumberIsValid(String phoneNumber)
+{
+ //Pattern to compare all characters except 0-9 * # P ; , +
+ String phoneNumberPattern(L"[^0-9*#P,p+;]");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(phoneNumber,false);
+ //return false for patterns other than 0-9 * # P ; , +
+ if(resultMatch == true)
+ {
+ //return phone number is invalid
+ return false;
+ }
+
+ return true;
+
+}
+
+void
+CallApp::SetTopMostWindow(bool bTopMost)
+{
+ AppLogDebug("bTopMost = %d",bTopMost);
+ result res = E_FAILURE;
+ //ToDO: Need to see if there is better way to handle
+ //this case
+
+ if(bTopMost == true)
+ {
+ GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGHEST);
+ // AppManager::GetInstance()->AddActiveAppEventListener(*this);
+ if(PowerManager::IsScreenOn() == false)
+ {
+ AppLogDebug("TurnScreenOn");
+ res = PowerManager::TurnScreenOn();
+ AppLogDebug("TurnScreenOn %d",res);
+ }
+ result res = PowerManager::KeepScreenOnState(true,false);
+ AppLogDebug("KeepScreenOnState %d",res);
+
+
+ }
+ else
+ {
+ GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_NORMAL);
+ PowerManager::KeepScreenOnState(false);
+ // AppManager::GetInstance()->RemoveActiveAppEventListener(*this);
+ }
+
+ if(LockManager::GetInstance()->IsLocked())
+ {
+ AppLogDebug("Phone Locked");
+ LockManager::GetInstance()->Unlock();
+ }
+
+}
+void
+CallApp::OnActiveAppChanged(const String& appId)
+{
+ AppLogDebug("Enter %ls",appId.GetPointer());
+ if(GetAppId().Equals(appId) == true)
+ {
+
+ CallPresentationModel* pCallPresentor = CallPresentationModel::GetInstance();
+ if(pCallPresentor->IsIncomingCallPresent() == true)
+ {
+ result res = PowerManager::KeepScreenOnState(true,false);
+ AppLogDebug("KeepScreenOnState %d",res);
+ }
+
+ // We should not treat foreground when autorejected pop-up as actually foreground
+ //when appcontrol is running as appcontrol is still not completed
+ if(__pCallRejectedIonPopup != null && CallPresentationModel::GetInstance()->IsAppControlRunning() == true)
+ {
+ return;
+ }
+ IEnumerator* pEnum = __listenerList.GetEnumeratorN();
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ IAppStateChangeListener* pInterface = static_cast<IAppStateChangeListener*>(pEnum->GetCurrent());
+ if (pInterface == null)
+ {
+ delete pEnum;
+
+ return;
+ }
+ pInterface->OnForeground();
+ }
+ delete pEnum;
+ }
+
+}
+
+long long
+CallApp::GetCallAppTicks(void)
+{
+ return __callTicks;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallAppControlRequestMgr.cpp
+ * @brief Manages AppControl Request to other apps.
+ */
+#include <FApp.h>
+#include "CallAppControlRequestMgr.h"
+#include "CallTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+CallAppControlRequestMgr* CallAppControlRequestMgr::__pInstance = null;
+
+CallAppControlRequestMgr::CallAppControlRequestMgr(void)
+{
+ __pOpenedAppControl = null;
+}
+
+CallAppControlRequestMgr::~CallAppControlRequestMgr(void)
+{
+ if (__pOpenedAppControl != null)
+ {
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ }
+}
+
+void
+CallAppControlRequestMgr::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) CallAppControlRequestMgr();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+
+ std::atexit(DestroyInstance);
+}
+
+CallAppControlRequestMgr*
+CallAppControlRequestMgr::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+CallAppControlRequestMgr::DestroyInstance(void)
+{
+ if (__pInstance != null)
+ {
+ delete __pInstance;
+ __pInstance = null;
+ }
+}
+
+result
+CallAppControlRequestMgr::Construct(void)
+{
+ return E_SUCCESS;
+}
+
+bool
+CallAppControlRequestMgr::IsAppControlRunning(void)
+{
+ AppLog("ENTER %x",__pOpenedAppControl);
+ return (__pOpenedAppControl != null);
+}
+
+void
+CallAppControlRequestMgr::AbortAppControlRequest(void)
+{
+ AppLog("ENTER");
+ if (__pOpenedAppControl != null)
+ {
+ result r = __pOpenedAppControl->Stop();
+ AppLog("Abort failed with r=%d", r);
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ }
+ AppLog("ENTER");
+}
+
+void
+CallAppControlRequestMgr::AppControlRequestCompleted(void)
+{
+ AppLog("ENTER");
+ if (__pOpenedAppControl != null)
+ {
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ }
+}
+
+bool
+CallAppControlRequestMgr::LaunchComposeMessageAppControl(String& contactNumber, IAppControlResponseListener* pListener)
+{
+ String tempContactNumber;
+ int commaIndex = 0;
+ int semiColonIndex = 0;
+ int index = 0;
+ contactNumber.IndexOf(",", 0, commaIndex);
+ contactNumber.IndexOf(";", 0, semiColonIndex);
+
+ if(commaIndex != -1 && semiColonIndex != -1)
+ {
+ index = commaIndex < semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else if(commaIndex != -1 || semiColonIndex != -1)
+ {
+ index = commaIndex > semiColonIndex ? commaIndex : semiColonIndex;
+ }
+ else
+ {
+ index = contactNumber.GetLength();
+ }
+ contactNumber.SubString(0, index, tempContactNumber);
+
+ if (__pOpenedAppControl != null)
+ {
+ //An AppControl is already running.
+ String provider = __pOpenedAppControl->GetAppControlProviderId();
+ String operation = __pOpenedAppControl->GetOperationId();
+ AppLog( "Error:- AppControl is already running for provider id = %ls, operation id = %ls",
+ provider.GetPointer(), operation.GetPointer());
+ return false;
+ }
+
+ result r = E_FAILURE;
+ //request parameters
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(MESSAGE_TYPE), new (std::nothrow) String(MESSAGE_SMS_TYPE));
+ extraData.Add(new (std::nothrow) String(MESSAGE_TO), new (std::nothrow) String(tempContactNumber));
+
+ __pOpenedAppControl = AppManager::FindAppControlN(PROVIDER_ID_MESSAGE, OPERATION_ID_COMPOSE);
+ if (__pOpenedAppControl != null)
+ {
+
+ r = __pOpenedAppControl->Start(null, null, &extraData, pListener);
+ }
+ extraData.RemoveAll(true);
+
+ if(r != E_SUCCESS)
+ {
+ //AppControl request failed, delete AppControl.
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ return false;
+ }
+ else
+ {
+ //AppControl request was successful.
+ return true;
+ }
+}
+
+bool
+CallAppControlRequestMgr::LaunchViewContactAppControl(String& contactId, IAppControlResponseListener* pListener)
+{
+ AppLogDebug("ENTER");
+ if (__pOpenedAppControl != null)
+ {
+ //An AppControl is already running.
+ String provider = __pOpenedAppControl->GetAppControlProviderId();
+ String operation = __pOpenedAppControl->GetOperationId();
+ AppLog( "Error:- AppControl is already running for provider id = %ls, operation id = %ls",
+ provider.GetPointer(), operation.GetPointer());
+ return false;
+ }
+
+ result r = E_FAILURE;
+ //request parameters
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT), new (std::nothrow) String(CONTACTS_VIEW_TYPE_CONTACT));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_ID), new (std::nothrow) String(contactId));
+ extraData.Add(new (std::nothrow) String(CONTACTS_ID_KEY), new (std::nothrow) String(contactId));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_PERSON));
+
+ __pOpenedAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_VIEW);
+ if (__pOpenedAppControl != null)
+ {
+ r = __pOpenedAppControl->Start(null, null, &extraData, pListener);
+ }
+ extraData.RemoveAll(true);
+
+ if(r != E_SUCCESS)
+ {
+ //AppControl request failed, delete AppControl.
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ return false;
+ }
+ else
+ {
+ //AppControl request was successful.
+ return true;
+ }
+}
+
+bool
+CallAppControlRequestMgr::LaunchAddContactAppControl(String& contactNumber, IAppControlResponseListener* pListener)
+{
+ AppLogDebug("ENTER");
+ if (__pOpenedAppControl != null)
+ {
+ //An AppControl is already running.
+ String provider = __pOpenedAppControl->GetAppControlProviderId();
+ String operation = __pOpenedAppControl->GetOperationId();
+ AppLog( "Error:- AppControl is already running for provider id = %ls, operation id = %ls",
+ provider.GetPointer(), operation.GetPointer());
+ return false;
+ }
+
+ result r = E_FAILURE;
+ //request parameters
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(INPUT_TYPE_PHONE), new (std::nothrow) String(contactNumber));
+ extraData.Add(new (std::nothrow) String(CONTACT_KEY_ITEM_TYPE), new (std::nothrow) String(ITEM_TYPE_CONTACT));
+
+ __pOpenedAppControl = AppManager::FindAppControlN(PROVIDER_ID_CONTACTS, OPERATION_ID_ADD);
+ if (__pOpenedAppControl != null)
+ {
+ r = __pOpenedAppControl->Start(null, null, &extraData, pListener);
+ }
+ extraData.RemoveAll(true);
+
+ if(r != E_SUCCESS)
+ {
+ //AppControl request failed, delete AppControl.
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ return false;
+ }
+ else
+ {
+ //AppControl request was successful.
+ return true;
+ }
+}
+
+bool
+CallAppControlRequestMgr::LaunchDialerAppControl(IAppControlResponseListener* pListener)
+{
+ AppLogDebug("ENTER");
+ if (__pOpenedAppControl != null)
+ {
+ //An AppControl is already running.
+ String provider = __pOpenedAppControl->GetAppControlProviderId();
+ String operation = __pOpenedAppControl->GetOperationId();
+ AppLog( "Error:- AppControl is already running for provider id = %ls, operation id = %ls",
+ provider.GetPointer(), operation.GetPointer());
+ return false;
+ }
+
+ result r = E_FAILURE;
+ HashMap extraData;
+ extraData.Construct();
+ extraData.Add(new (std::nothrow) String(PARAM_PHONE_NUMBER), new (std::nothrow) String(L""));
+
+ //Using OPERATION_ID_CONFIGURE instead of OPERATION_ID_DIAL because using OPERATION_ID_DIAL
+ //makes Phone to run in mainmode which creates lots of issue, so working around using
+ //OPERATION_ID_CONFIGURE to make it run in submode
+ __pOpenedAppControl = AppManager::FindAppControlN(PROVIDER_ID_PHONE, OPERATION_ID_CONFIGURE);
+ if (__pOpenedAppControl != null)
+ {
+ r = __pOpenedAppControl->Start(null, null, &extraData, pListener);
+ }
+ extraData.RemoveAll(true);
+
+ if(r != E_SUCCESS)
+ {
+ //AppControl request failed, delete AppControl.
+ delete __pOpenedAppControl;
+ __pOpenedAppControl = null;
+ return false;
+ }
+ else
+ {
+ //AppControl request was successful.
+ return true;
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+//
+// This file contains the Tizen application entry point.
+//
+#include "CallApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+
+//
+// The entry function of Tizen application called by the operating system.
+//
+_EXPORT_ int
+OspMain(int argc, char* pArgv[])
+{
+ AppLog("Application started.");
+ ArrayList args(SingleObjectDeleter);
+ args.Construct();
+ for (int i = 0; i < argc; i++)
+ {
+ args.Add(new (std::nothrow) String(pArgv[i]));
+ }
+
+ result r = Tizen::App::UiApp::Execute(CallApp::CreateInstance, &args);
+ TryLog(r == E_SUCCESS, "[%s] Application execution failed", GetErrorMessage(r));
+ AppLog("Application finished.");
+
+ return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#include "CallApp.h"
+#include "CallAppFrame.h"
+#include "CallPhoneFormFactory.h"
+#include "CallPanelFactory.h"
+#include "CallSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+CallAppFrame::CallAppFrame(void)
+{
+}
+
+CallAppFrame::~CallAppFrame(void)
+{
+}
+
+result
+CallAppFrame::OnInitializing(void)
+{
+ result r = E_FAILURE;
+ CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+ AppLogDebug("Enter");
+
+ //Initialize factory methods and register all scenes.
+ r = SceneRegister::RegisterAllScenes();
+ TryReturn(r == E_SUCCESS, r , "Scene registration failed");
+
+ //start initial Form
+ if (pPhoneApp->GetInitialScene().IsEmpty() == false)
+ {
+ //goto next scene
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ r = pSceneManager->GoForward( ForwardSceneTransition(pPhoneApp->GetInitialScene(),
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP),
+ pPhoneApp->GetAppLaunchArguments());
+ }
+ AppLogDebug("Exit %d",r);
+ return r;
+}
+
+result
+CallAppFrame::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ // TODO:
+ // Add your termination code here
+ return r;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file PhnAppUtility.cpp
+ * @brief Utility Class for Phone Application
+ */
+#include <FApp.h>
+#include <FSystem.h>
+#include "CallAppUtility.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+
+AppUtility::AppUtility(void)
+{
+}
+
+AppUtility::~AppUtility(void)
+{
+}
+
+String
+AppUtility::GetResourceString(const String& stringId)
+{
+ String resourceString(L"");
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource)
+ {
+ pAppResource->GetString(stringId, resourceString);
+ }
+
+ return resourceString;
+}
+
+Bitmap*
+AppUtility::GetBitmapFromResourcesN(const String& imagePath, int imgWidth, int imgHeight)
+{
+ Bitmap* pBitmap = null;
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource)
+ {
+ pBitmap = pAppResource->GetBitmapN(imagePath);
+ if (pBitmap && imgWidth > 0 && imgHeight > 0)
+ {
+ //scale bitmap to predefined size
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pBitmap->Scale(Dimension(imgWidth, imgHeight));
+ }
+ }
+ return pBitmap;
+}
+
+long long
+AppUtility::GetAvailableMemory(void)
+{
+ result r = E_SUCCESS;
+
+ String key(L"http://tizen.org/runtime/storage.available.internal");
+ long long allocatedMemory = 0;
+
+ r = RuntimeInfo::GetValue(key, allocatedMemory);
+ TryCatch(r == E_SUCCESS, , "MyRuntimeInfo: Failed to get value");
+
+ return allocatedMemory;
+
+ CATCH:
+ return 0;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallBaseForm.cpp
+ * @brief Base class for all Call forms
+ */
+#include "CallActiveCallForm.h"
+#include "CallIncomingCallForm.h"
+#include "CallBaseForm.h"
+#include "CallInfo.h"
+#include "CallPresentationModel.h"
+#include "CallConfCallerListForm.h"
+#include "CallPhoneFormFactory.h"
+#include "CallSceneRegister.h"
+#include "CallApp.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Ui::Controls;
+
+BaseForm::BaseForm(FormType formType)
+ : __formType(formType)
+{
+ __pCallPresentor = null;
+ __pErrorMsgPopup = null;
+}
+
+BaseForm::~BaseForm(void)
+{
+ AppLogDebug("Enter");
+ if(__pErrorMsgPopup != null)
+ {
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+ }
+}
+
+result
+BaseForm::OnInitializing(void)
+{
+ //To be implemented in sub classes
+ return E_SUCCESS;
+}
+
+void
+BaseForm::OnActionPerformed(const Control& source, int actionId)
+{
+}
+
+/////////////////////////////////////////////////////////////////
+///// Event Listener methods from ITelephonyEventListener /////
+/////////////////////////////////////////////////////////////////
+
+void
+BaseForm::HandleCallConnected(IListT<AppCallInfo>& pCallList)
+{
+ if(__pCallPresentor->IsIncomingorDialingCallPresent() == true)
+ {
+ //This scenario will come, if 1 call is disconnected from conf. call having 2 participants.
+ //In this case, if there is any dialing call exists, then ignore.
+ //Else, if there is any incoming call exists, then update call option popup.
+ switch (__formType)
+ {
+ case FORMTYPE_INCOMINGCALL:
+ {
+ IncomingCallForm* pIncomingCallForm = dynamic_cast<IncomingCallForm*>(this);
+ if (pIncomingCallForm != null)
+ {
+ pIncomingCallForm->CallDisconnected();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ return;
+ }
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+
+ switch (__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ case FORMTYPE_INCOMINGCALL:
+ case FORMTYPE_CONFCALLLIST:
+ case FORMTYPE_ACTIVECALL:
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ int noOfCalls = pCallList.GetCount();
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(noOfCalls);
+
+ for (int index = 0; index < noOfCalls; index++)
+ {
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCallList.GetAt(index, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ }
+ }
+
+ if (noOfCalls == 1)
+ {
+ //Check if active call is conference call
+ AppCallInfo* pActiveCallInfo = static_cast<AppCallInfo*>(pCallInfoList->GetAt(0));
+ if(pActiveCallInfo->IsConferenceCall() == true)
+ {
+ //single Conference call - goto active Conf. call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ else
+ {
+ //single active call - goto active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ }
+ else if(noOfCalls == 2)
+ {
+ //goto multiple active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MULTIPLEACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ //This case can come on Multiple Calls screen, when one of the calls is conference call with 2 participants
+ //and one of the participants exits himself from ConfCall.
+ int noOfCalls = pCallList.GetCount();
+ AppLogDebug("Active Call Count = %d", noOfCalls);
+ //this is just a safety check, call count will aleays be 2 here.
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(noOfCalls == IDI_MAX_ACTIVE_CALLS && pActiveCallForm != null)
+ {
+ //update calls state
+ pActiveCallForm->UpdateMultipleCallScreen(pCallList);
+ }
+ }
+ break;
+
+ case FORMTYPE_EMERGENCYOUTGOINGCALL:
+ {
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(1);
+
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCallList.GetAt(0, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ //single active call - goto active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ACTIVE_EMERGENCYCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+BaseForm::HandleCallActive(bool isActive)
+{
+ AppLogDebug("Enter");
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(pActiveCallForm != null)
+ {
+ pActiveCallForm->OnActiveTelephonyCallback(isActive);
+ }
+}
+
+void
+BaseForm::HandleCallHeld(bool isHeld)
+{
+ AppLogDebug("Enter");
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ switch (__formType)
+ {
+ case(FORMTYPE_ACTIVECALL):
+ case(FORMTYPE_ACTIVECONFCALL):
+ case(FORMTYPE_MULTIPLECALLS):
+ {
+ if(pActiveCallForm != null)
+ {
+ pActiveCallForm->OnHoldTelephonyCallback(isHeld);
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+BaseForm::HandleCallDisconnected(bool isLastCall, IListT<AppCallInfo>& pCurrentActiveCallList)
+{
+ AppLogDebug("Enter");
+ if(__pCallPresentor->IsIncomingorDialingCallPresent() == true)
+ {
+ //This scenario will come, if this disconnected call is neither incoming nor dialing call.
+ //In this case, if there is any dialing call exists, then ignore.
+ //Else, if there is any incoming call exists, then update call option popup.
+ AppLogDebug("IsIncomingorDialingCallPresent %d",__formType);
+ switch (__formType)
+ {
+ case FORMTYPE_INCOMINGCALL:
+ {
+ IncomingCallForm* pIncomingCallForm = dynamic_cast<IncomingCallForm*>(this);
+ if (pIncomingCallForm != null)
+ {
+ pIncomingCallForm->CallDisconnected();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ return;
+ }
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+
+ int callCount = pCurrentActiveCallList.GetCount();
+ if (callCount > 0)
+ {
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(callCount);
+ for (int index = 0; index < callCount; index++)
+ {
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCurrentActiveCallList.GetAt(index, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ }
+ }
+
+ if (callCount == 1)
+ {
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCurrentActiveCallList.GetAt(0, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ }
+
+ if (isLastCall == true)
+ {
+ //list contains 1 last ended call to show EndCall screen.
+ //goto End Call form if single call was ended else terminate
+ // if (callInfo.IsConferenceCall() == false)
+ if (1)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ENDCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ else
+ {
+ pPhoneApp->Terminate();
+ }
+ }
+ else
+ {
+ //list contains 1 active call
+ if (pCurrentActiveCallList.GetCount() == 1)
+ {
+ if (callInfo.IsConferenceCall() == true)
+ {
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ else
+ {
+ //goto Single Active Call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ }
+ }
+ }
+ else
+ {
+ //multiple active calls are present.
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MULTIPLEACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ }
+ else
+ {
+ //This is done to show end call form in missed call case also
+ //this was done on request received from HQ to solve a bug in
+ //camera application. In which if a call comes when camera is
+ //running and user disconnects before the ui is shown the camera
+ //application hangs
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(1);
+ AppCallInfo callInfo;
+ result r = pCurrentActiveCallList.GetAt(0, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ //multiple active calls are present.
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_ENDCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+
+ }
+ else
+ {
+ pPhoneApp->Terminate();
+ }
+
+ }
+}
+
+
+void
+BaseForm::HandleConferenceCall(AppCallInfo& pCallInfo)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(1);
+
+ //update list to be passed
+ AppCallInfo* pConfInfo = new (std::nothrow) AppCallInfo();
+ *pConfInfo = pCallInfo;
+ pCallInfoList->Add(pConfInfo);
+
+ //Todo: create screens for single conf call and conf call with another held call
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP), pCallInfoList);
+}
+
+void
+BaseForm::HandleIncomingCall(AppCallInfo& pCallInfo)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(1);
+
+ //update list to be passed
+ AppCallInfo* pIncomingCall = new (std::nothrow) AppCallInfo();
+ *pIncomingCall = pCallInfo;
+ pCallInfoList->Add(pIncomingCall);
+
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_INCOMINGCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP), pCallInfoList);
+}
+
+void
+BaseForm::HandleConfCallHoldOccured(bool success)
+{
+
+ switch (__formType)
+ {
+ case FORMTYPE_CONFCALLLIST:
+ {
+ ConfCallerListForm* pConfCallerListForm = dynamic_cast<ConfCallerListForm*>(this);
+ if(pConfCallerListForm != null)
+ {
+ pConfCallerListForm->OnConfCallHoldTelephoneCallBackOccured(success);
+ }
+ }
+ break;
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(pActiveCallForm != null)
+ {
+ pActiveCallForm->OnConfCallHoldTelephonyCallback(success);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+BaseForm::HandleConfCallActiveOccured(bool success)
+{
+ switch (__formType)
+ {
+ case FORMTYPE_CONFCALLLIST:
+ {
+ ConfCallerListForm* pConfCallerListForm = dynamic_cast<ConfCallerListForm*>(this);
+ if(pConfCallerListForm != null)
+ {
+ pConfCallerListForm->OnConfCallActiveTelephoneCallBackOccured(success);
+ }
+ }
+ break;
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(pActiveCallForm != null)
+ {
+ pActiveCallForm->OnConfCallActiveTelephonyCallback(success);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+BaseForm::HandleCallSwapOccured(IListT<AppCallInfo>& pCallList)
+{
+ int noOfCalls = pCallList.GetCount();
+ if(noOfCalls != IDI_MAX_ACTIVE_CALLS && __formType != FORMTYPE_MULTIPLECALLS)
+ {
+ return;
+ }
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(pActiveCallForm != null)
+ {
+ //update calls state
+ pActiveCallForm->UpdateMultipleCallScreen(pCallList);
+ pActiveCallForm->SetSwapInProgress(false);
+
+ }
+}
+
+void
+BaseForm::HandleConferenceChange(void)
+{
+ if(__pCallPresentor->IsIncomingorDialingCallPresent() == true)
+ {
+ //This scenario will come, if 1 call is disconnected from conf. call having more than 2 participants.
+ //In this case, if there is any dialing call exists, then ignore.
+ //Else, if there is any incoming call exists, then update call option popup.
+ switch (__formType)
+ {
+ case FORMTYPE_INCOMINGCALL:
+ {
+ IncomingCallForm* pIncomingCallForm = dynamic_cast<IncomingCallForm*>(this);
+ if (pIncomingCallForm != null)
+ {
+ pIncomingCallForm->CallDisconnected();
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ return;
+ }
+
+ switch (__formType)
+ {
+ case FORMTYPE_CONFCALLLIST:
+ {
+ ConfCallerListForm* pConfCallerListForm = dynamic_cast<ConfCallerListForm*>(this);
+ if(pConfCallerListForm != null)
+ {
+ pConfCallerListForm->HandleParticipantsChanged();
+ }
+ }
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ ActiveCallForm* pActiveCallForm = dynamic_cast<ActiveCallForm*>(this);
+ if(pActiveCallForm != null)
+ {
+ pActiveCallForm->HandleConfCallChanged();
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+void
+BaseForm::HandleTelephonyError(int errorCode)
+{
+ //show error msg Popup
+ if (__pErrorMsgPopup == null)
+ {
+ __pErrorMsgPopup = new (std::nothrow) ErrorMsgPopup(this);
+ __pErrorMsgPopup->ShowErrorMsgPopupN(errorCode);
+ }
+}
+
+void
+BaseForm::HandlePopupClosed(void)
+{
+ Draw();
+ delete __pErrorMsgPopup;
+ __pErrorMsgPopup = null;
+
+ switch(__formType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ {
+ //fetch no of calls from telephony
+ CallPresentationModel* pPresentor = CallPresentationModel::GetInstance();
+ if(pPresentor != null)
+ {
+ //check if any call is present
+ if(pPresentor->GetCurrentCallCount() > 0)
+ {
+ //fetch current call list
+ IListT<AppCallInfo>* pCurrentCallList = pPresentor->GetCallListN();
+ HandleCallDisconnected(false,*pCurrentCallList);
+ delete pCurrentCallList;
+ pCurrentCallList = null;
+ }
+ else
+ {
+ //No more calls are active
+ CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+ pPhoneApp->Terminate();
+
+ }
+ }
+ }
+ break;
+
+ case FORMTYPE_ENDCALL:
+ {
+ //It comes here, only when we make voice call for Last call from EndCallForm
+ //and some TAPI error is encountered.
+ CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+ pPhoneApp->Terminate();
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallButtonsPanel.cpp
+ * @brief Base class for all Call forms
+ */
+#include "CallButtonsPanel.h"
+#include "CallAppUtility.h"
+#include "CallTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+
+//Constants - Scene name
+const wchar_t* IDC_ADDJOINCALL_BUTTON = L"IDC_ADDJOINCALL_BUTTON";
+const wchar_t* IDC_KEYPAD_BUTTON = L"IDC_KEYPAD_BUTTON";
+const wchar_t* IDC_MUTE_BUTTON = L"IDC_MUTE_BUTTON";
+const wchar_t* IDC_CONTACT_BUTTON = L"IDC_CONTACT_BUTTON";
+const wchar_t* IDC_SPEAKER_BUTTON = L"IDC_SPEAKER_BUTTON";
+const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
+const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
+const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
+const wchar_t* IDC_ENDCALL_BUTTON = L"IDC_ENDCALL_BUTTON";
+const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
+
+//Button Dimensions
+const int W_BG_BITMAP = 80;
+const int H_BG_BITMAP = 80;
+const int Y_BG_BITMAP_POS = 56;
+const int IDI_TEXT_SIZE = 38;
+const int IDI_VERTICAL_SPACE = 6;
+const int W_VIEW_CONTACT_BITMAP = 50;
+const int H__VIEW_CONTACT_BITMAP = 50;
+const int Y_VIEW_CONTACT_BITMAP_POS = 14;
+const int W_KEYPAD_BTN = 240;
+const int H_KEYPAD_BTN = 250;
+
+CallButtonsPanel::CallButtonsPanel(void)
+{
+}
+
+CallButtonsPanel::~CallButtonsPanel(void)
+{
+ //Empty Implementation
+}
+
+bool
+CallButtonsPanel::ConstructPanel(IActionEventListener* pEventListener, FormType parentFormType)
+{
+ if (pEventListener == null)
+ {
+ return false;
+ }
+
+ result r = E_SUCCESS;
+
+ //set action listener & save form state
+ __pActionListener = pEventListener;
+ __parentFormType = parentFormType;
+
+ switch (__parentFormType)
+ {
+ case FORMTYPE_ENDCALL:
+ r = Construct(IDL_END_CALL_PANEL);
+ break;
+
+ default:
+ r = Construct(IDL_CALL_PANEL);
+ break;
+ }
+ TryCatch(r == E_SUCCESS, , "CallButtonsPanel::Initialise() resource not found");
+
+ return true;
+CATCH:
+ return false;
+}
+
+result
+CallButtonsPanel::OnInitializing(void)
+{
+ result r = E_FAILURE;
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+
+ //set buttons as child controls
+ switch (__parentFormType)
+ {
+ case FORMTYPE_ENDCALL:
+ r = ConstructEndCallPanel();
+ break;
+
+ default:
+ r = ConstructActiveCallPanel();
+ break;
+ }
+
+ if (IsFailed(r))
+ {
+ return r;
+ }
+ SetButtonPosition();
+ Draw();
+ Show();
+ return r;
+}
+
+result
+CallButtonsPanel::OnTerminating(void)
+{
+ //remove all child controls...
+// RemoveAllControls();
+ return E_SUCCESS;
+}
+
+void
+CallButtonsPanel::SetSpeakerButtonState(CommandIds cmdId)
+{
+ //Speaker
+ String speakerButtonId(IDC_SPEAKER_BUTTON);
+ Button* pButton = static_cast<Button*>(GetControl(speakerButtonId));
+ //Check if Button exist and needs to change state.
+ if(pButton == null || pButton->GetActionId() == cmdId)
+ {
+ return;
+ }
+
+ String btnName = AppUtility::GetResourceString(IDS_SPEAKER_BTN_NAME);
+ AddKeyPadActionListener(speakerButtonId, cmdId);
+ switch (cmdId)
+ {
+ case IDA_SPEAKER:
+ {
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_ICON, BTN_NORMAL);
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_OFF_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ case IDA_SPEAKER_OFF:
+ {
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_ICON, BTN_NORMAL);
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(speakerButtonId, btnName, IDB_SPEAKER_ON_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+CallButtonsPanel::SetMuteButtonState(CommandIds cmdId)
+{
+ String muteButtonId(IDC_MUTE_BUTTON);
+ Button* pButton = static_cast<Button*>(GetControl(muteButtonId));
+ //Check if Button exist and needs to change state.
+ if(pButton == null || pButton->GetActionId() == cmdId)
+ {
+ return;
+ }
+
+ String btnName = AppUtility::GetResourceString(IDS_MUTE_BTN_NAME);
+ AddKeyPadActionListener(muteButtonId, cmdId);
+ switch(cmdId)
+ {
+ case IDA_UNMUTE:
+ {
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_ICON, BTN_NORMAL);
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_ON_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ case IDA_MUTE:
+ {
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_ICON, BTN_NORMAL);
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(muteButtonId, btnName, IDB_MUTE_OFF_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+CallButtonsPanel::SetKeypadButtonState(CommandIds cmdId)
+{
+ String keypadButtonId(IDC_KEYPAD_BUTTON);
+ Button* pButton = static_cast<Button*>(GetControl(keypadButtonId));
+ //Check if Button exist and needs to change state.
+ if(pButton == null || pButton->GetActionId() == cmdId)
+ {
+ return;
+ }
+
+ String btnName = AppUtility::GetResourceString(IDS_KEYPAD_BTN_NAME);
+ AddKeyPadActionListener(keypadButtonId, cmdId);
+ switch (cmdId)
+ {
+ case IDA_CLOSE_NUMKEYPAD:
+ {
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ case IDA_OPEN_NUMKEYPAD:
+ {
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_ICON, BTN_NORMAL);
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(keypadButtonId, btnName, IDB_CLOSE_KEYPAD_DIM_ICON, BTN_DIM);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+result
+CallButtonsPanel::AddBackgroundBitmap(void)
+{
+ result r = E_FAILURE;
+
+ Rectangle panelRect = GetBounds();
+ //Set BackGround bitmap
+ Bitmap* pBgBitmap = null;
+ AppResource* pAppResource = AppResource::GetInstance();
+ if (pAppResource)
+ {
+ pBgBitmap = pAppResource->GetBitmapN(IDB_BACKGROUND_BITMAP);
+ if (pBgBitmap)
+ {
+ Label* pBackgroundLabel = new (std::nothrow) Label();
+ pBackgroundLabel->Construct(Rectangle(0, 1, panelRect.width, panelRect.height), L"");
+ pBackgroundLabel->SetBackgroundBitmap(*pBgBitmap);
+ r = AddControl(pBackgroundLabel);
+
+ //always display in background
+ SetControlAlwaysAtBottom(*pBackgroundLabel, true);
+
+ delete pBgBitmap;
+ pBgBitmap = null;
+ }
+ }
+ return r;
+}
+
+result
+CallButtonsPanel::ConstructEndCallPanel(void)
+{
+ result r = E_SUCCESS;
+ Rectangle relativeCtrlRect = GetBounds();
+
+ //Voice Call
+ String voiceButtonId(IDC_VOICECALL_BUTTON);
+ String btnName = AppUtility::GetResourceString(IDS_VOICE_CALL_BTN_NAME);
+ SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(voiceButtonId, btnName, IDB_VOICE_CALL_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(voiceButtonId, IDA_VOICE_CALL);
+
+ //Video Call
+ String videoButtonId(IDC_VIDEOCALL_BUTTON);
+ btnName = AppUtility::GetResourceString(IDS_VIDEO_CALL_BTN_NAME);
+ SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(videoButtonId, btnName, IDB_VIDEO_CALL_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(videoButtonId, IDA_VIDEO_CALL);
+
+ //Message
+ String msgButtonId(IDC_MSG_BUTTON);
+ btnName = AppUtility::GetResourceString(IDS_MSG_BTN_NAME);
+ SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_ICON, BTN_NORMAL);
+ SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(msgButtonId, btnName, IDB_MESSAGE_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(msgButtonId, IDA_MESSAGE);
+
+ Button* pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
+ if (pButton != null)
+ {
+ AddKeyPadActionListener(IDC_ADD_TO_CONTACT_BUTTON,IDA_ADD_TO_CONTACTS);
+ }
+ //set initial show state to false. Correct state set on OnSceneActivatedN
+ SetEndCallPanelState(false);
+
+ return r;
+}
+
+void
+CallButtonsPanel::ShowViewContactButton(void)
+{
+ //Present show View Contact else show Add to contact
+ SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
+ IDB_VIEW_CONTACT_BG_ICON,IDB_VIEW_CONTACT_ICON,BTN_NORMAL);
+
+ SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON,AppUtility::GetResourceString(IDS_VIEW_CONTACT),
+ IDB_VIEW_CONTACT_BG_PRESS_ICON,IDB_VIEW_CONTACT_PRESS_ICON,BTN_PRESS);
+}
+
+void
+CallButtonsPanel::ShowAddContactButton(void)
+{
+ //Present show View Contact else show Add to contact
+ SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON, AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
+ IDB_VIEW_CONTACT_BG_ICON, IDB_VIEW_CONTACT_ICON, BTN_NORMAL);
+
+ SetViewContacBitmapToButton(IDC_ADD_TO_CONTACT_BUTTON, AppUtility::GetResourceString(IDS_ADD_TO_CONTACTS),
+ IDB_VIEW_CONTACT_BG_PRESS_ICON, IDB_VIEW_CONTACT_PRESS_ICON, BTN_PRESS);
+}
+
+result
+CallButtonsPanel::ConstructActiveCallPanel(void)
+{
+ result r = E_SUCCESS;
+
+ //End Call
+ String endButtonId(IDC_ENDCALL_BUTTON);
+ String btnName = AppUtility::GetResourceString(IDS_ENDCALL_BTN_NAME);
+ SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(endButtonId, btnName, IDB_END_CALL_DIM_ICON, BTN_DIM);
+
+ //Add or Join call based on form state
+ String addJoinButtonId(IDC_ADDJOINCALL_BUTTON);
+ switch (__parentFormType)
+ {
+ case FORMTYPE_OUTGOINGCALL:
+ case FORMTYPE_ACTIVECALL:
+ case FORMTYPE_EMERGENCYOUTGOINGCALL:
+ case FORMTYPE_EMERGENCYACTIVECALL:
+ {
+ //End call listener
+ AddKeyPadActionListener(endButtonId, IDA_END_CALL);
+ //Add Call
+ btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
+ }
+ break;
+
+ case FORMTYPE_ACTIVECONFCALL:
+ {
+ //End call listener
+ AddKeyPadActionListener(endButtonId, IDA_END_CONF_CALL);
+ //Add Call
+ btnName = AppUtility::GetResourceString(IDS_ADDCALL_BTN_NAME);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_ADD_CALL_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(addJoinButtonId, IDA_ADD_CALL);
+ }
+ break;
+
+ case FORMTYPE_MULTIPLECALLS:
+ {
+ //End call listener
+ AddKeyPadActionListener(endButtonId, IDA_END_CALL);
+ //Join Call
+ btnName = AppUtility::GetResourceString(IDS_JOINCALL_BTN_NAME);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_ICON, BTN_NORMAL);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(addJoinButtonId, btnName, IDB_JOIN_CALL_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(addJoinButtonId, IDA_JOIN_CALL);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Keypad is closed, by default
+ SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
+ //Speaker is off, by default
+ SetSpeakerButtonState(IDA_SPEAKER);
+ //Mute is off, by default
+ SetMuteButtonState(IDA_MUTE);
+ //Contact
+ String contactButtonId(IDC_CONTACT_BUTTON);
+ btnName = AppUtility::GetResourceString(IDS_CONTACT_BTN_NAME);
+ SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_ICON, BTN_NORMAL);
+ SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_PRESS_ICON, BTN_PRESS);
+ SetBitmapsToButton(contactButtonId, btnName, IDB_CONTACT_DIM_ICON, BTN_DIM);
+ AddKeyPadActionListener(contactButtonId, IDA_OPEN_CONTACTS);
+
+ //disable all keys except 'Speaker' keys while dialing outgoing call
+ if (__parentFormType == FORMTYPE_OUTGOINGCALL || __parentFormType == FORMTYPE_EMERGENCYOUTGOINGCALL
+ || __parentFormType == FORMTYPE_EMERGENCYACTIVECALL)
+ {
+ DisableKeysForOutgoingCall();
+ }
+
+ return r;
+}
+
+void
+CallButtonsPanel::SetBitmapsToButton(const String& buttonId, const String& buttonName, const String& imgPath, ButtonState state)
+{
+ Button* pButton = static_cast<Button*>(GetControl(buttonId));
+ if (pButton != null)
+ {
+ //Fetch Bitmap from resource
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
+ W_BG_BITMAP, H_BG_BITMAP);
+
+ //Create a new canvas
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ pCanvas->Construct(Rectangle(0, 0, pButton->GetWidth(), pButton->GetHeight()));
+
+ //Set Text to Canvas
+ Point bitmapPos(0, 0);
+ bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_BG_BITMAP_POS);
+ SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
+
+ //set normal bitmap to canvas
+ pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+
+ //Set the final Bitmap to Button
+ Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
+ pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
+ //scale to button size
+ pActualBgBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pActualBgBmp->Scale(pButton->GetSize());
+
+ switch (state)
+ {
+ case BTN_NORMAL:
+ {
+ pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
+ }
+ break;
+
+ case BTN_PRESS:
+ {
+ pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
+ }
+ break;
+
+ case BTN_DIM:
+ {
+ pButton->SetDisabledBackgroundBitmap(*pActualBgBmp);
+ }
+ break;
+ }
+ pButton->Invalidate(true);
+
+ delete pBitmap;
+ delete pActualBgBmp;
+ delete pCanvas;
+ }
+}
+
+void
+CallButtonsPanel::SetViewContacBitmapToButton(const String& buttonId, const String& buttonName, const String& imgBackgroundPath,const String& imgPath, ButtonState state)
+{
+ Button* pButton = static_cast<Button*>(GetControl(buttonId));
+ if (pButton != null)
+ {
+
+ //Fetch Bitmap from resource
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(imgPath,
+ W_VIEW_CONTACT_BITMAP, W_VIEW_CONTACT_BITMAP);
+
+ //Create a new canvas
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ pCanvas->Construct(Rectangle(0, 0, pButton->GetBounds().width, pButton->GetBounds().height));
+
+ // Draw background bitmap
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBackGroundBitmap = pAppResource->GetBitmapN(imgBackgroundPath);
+ if (pBackGroundBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas->DrawNinePatchedBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
+ }
+ else
+ {
+ pCanvas->DrawBitmap(pCanvas->GetBounds(), *pBackGroundBitmap);
+ }
+ delete pBackGroundBitmap;
+ //Set Text to Canvas
+ Point bitmapPos(0, 0);
+ bitmapPos.SetPosition(((pCanvas->GetBounds().width - pBitmap->GetWidth()) / 2), Y_VIEW_CONTACT_BITMAP_POS);
+ SetEnrichedTextToButton(buttonName, pCanvas, state, (bitmapPos.y + pBitmap->GetHeight() + IDI_VERTICAL_SPACE));
+
+
+ //set normal bitmap to canvas
+ pCanvas->DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+
+ //Set the final Bitmap to Button
+ Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
+ pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
+
+ switch (state)
+ {
+ case BTN_NORMAL:
+ {
+ pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
+ }
+ break;
+
+ case BTN_PRESS:
+ {
+ pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
+ }
+ break;
+
+ }
+ pButton->Invalidate(true);
+
+ delete pBitmap;
+ delete pActualBgBmp;
+ delete pCanvas;
+ }
+}
+
+void
+CallButtonsPanel::SetEnrichedTextToButton(const String& buttonName, Canvas* pCanvas, ButtonState state, int verticalPos)
+{
+ //find text color
+ Color textColor(255, 255, 255);
+ switch (state)
+ {
+ case BTN_NORMAL:
+ textColor.SetAlpha(255);
+ break;
+
+ case BTN_PRESS:
+ textColor.SetAlpha(127);
+ break;
+
+ case BTN_DIM:
+ textColor.SetAlpha(77);
+ break;
+ }
+
+ Font font;
+ font.Construct(FONT_STYLE_PLAIN, IDI_TEXT_SIZE);
+ FloatDimension textDimension;
+ font.GetTextExtent(buttonName, buttonName.GetLength(), textDimension);
+ textDimension.height = textDimension.height + font.GetDescender();
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(buttonName);
+ pTextElement->SetTextColor(textColor);
+ pTextElement->SetFont(font);
+
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+
+ //Draw text
+ Point textPos(((pCanvas->GetBounds().width - pEnrichedText->GetWidth()) / 2), verticalPos);
+ pCanvas->DrawText(textPos, *pEnrichedText);
+
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+}
+
+void
+CallButtonsPanel::AddKeyPadActionListener(const String& buttonId, CommandIds cmdId)
+{
+ Button* pButton = static_cast<Button*>(GetControl(buttonId));
+ if (pButton != null)
+ {
+ pButton->SetActionId(cmdId);
+ pButton->AddActionEventListener(*__pActionListener);
+ }
+}
+
+void
+CallButtonsPanel::DisableKeysForOutgoingCall(void)
+{
+ //add call
+ EnableAddCallButton(false);
+
+ //keypad
+ Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
+ pButton->SetEnabled(false);
+
+ //mute
+ pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
+ pButton->SetEnabled(false);
+
+ //contact
+ pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
+ pButton->SetEnabled(false);
+}
+
+void
+CallButtonsPanel::ShowOrHideAddtoContactsButton(bool isEnabled)
+{
+ Button* pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
+ pButton->SetShowState(isEnabled);
+}
+
+void
+CallButtonsPanel::SetEndCallPanelState(bool isEnabled)
+{
+ //Voice Call
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
+ pButton->SetEnabled(isEnabled);
+
+ //Video Call
+ pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
+ pButton->SetEnabled(false);
+
+ //Message
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
+ pButton->SetEnabled(isEnabled);
+
+ //AddToContact or Viewcontact button
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON));
+ pButton->SetShowState(isEnabled);
+ pButton->SetEnabled(isEnabled);
+ /*pButton->Invalidate(true);*/
+}
+
+void
+CallButtonsPanel::EnableAddCallButton(bool enable)
+{
+ //add call
+ Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
+ if(pButton != null && pButton->GetActionId() == IDA_ADD_CALL)
+ {
+ pButton->SetEnabled(enable);
+ pButton->Invalidate(true);
+ }
+}
+
+void
+CallButtonsPanel::EnableJoinCallButton(bool enable)
+{
+ //join call
+ Button* pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
+ if(pButton != null && pButton->GetActionId() == IDA_JOIN_CALL)
+ {
+ pButton->SetEnabled(enable);
+ pButton->Invalidate(true);
+ }
+}
+
+void
+CallButtonsPanel::SetButtonPosition(void)
+{
+ switch (__parentFormType)
+ {
+ case FORMTYPE_ENDCALL:
+ {
+ //Voice Call
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+
+ //Video Call
+ pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+
+ //Message
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ }
+ break;
+
+ default:
+ {
+ //keypad
+ Button* pButton = static_cast<Button*>(GetControl(IDC_KEYPAD_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ //mute
+ pButton = static_cast<Button*>(GetControl(IDC_MUTE_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ //contact
+ pButton = static_cast<Button*>(GetControl(IDC_CONTACT_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ //Add or Join call based on form state
+ pButton = static_cast<Button*>(GetControl(IDC_ADDJOINCALL_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ //End call
+ pButton = static_cast<Button*>(GetControl(IDC_ENDCALL_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ //Speaker
+ pButton = static_cast<Button*>(GetControl(IDC_SPEAKER_BUTTON));
+ SetControlAlwaysOnTop(*pButton,true);
+ }
+ break;
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCommonUtils.cpp
+ * @brief commonly used functions
+ */
+
+#include <FApp.h>
+#include <FMedia.h>
+#include <FGraphics.h>
+#include "CallAppUtility.h"
+#include "CallCommonUtils.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Base::Collection;
+
+const int ID_NAME_STRING = 100;
+const int ID_NUMBER_STRING = 101;
+const int ID_TIME_STRING = 102;
+const int ID_CONTACT_BITMAP = 103;
+const int ID_CALLTYPE_BITMAP = 104;
+
+
+const int X_TEXT_LINE1_ITEM = 16;
+const int Y_TEXT_LINE1_ITEM = 10;
+const int H_TEXT_LINE1_ITEM = 60;
+const int W_TEXT_LINE1_ITEM = 560;
+
+const int X_TEXT_LINE2_ITEM = 64;
+const int Y_TEXT_LINE2_ITEM = 70;
+const int H_TEXT_LINE2_ITEM = 48;
+const int W_TEXT_LINE2_ITEM = 256;
+
+const int X_TEXT_TIME_ITEM = 320;
+const int Y_TEXT_TIME_ITEM = 70;
+const int H_TEXT_TIME_ITEM = 48;
+const int W_TEXT_TIME_ITEM = 256;
+
+const int X_CONTACT_BITMAP_ITEM = 592;
+const int Y_CONTACT_BITMAP_ITEM = 0;
+const int H_CONTACT_BITMAP_ITEM = 128;
+const int W_CONTACT_BITMAP_ITEM = 128;
+
+const int X_CALLTYPE_BITMAP_ITEM = 16;
+const int Y_CALLTYPE_BITMAP_ITEM = 70 + 8;
+const int H_CALLTYPE_BITMAP_ITEM = 32;
+const int W_CALLTYPE_BITMAP_ITEM = 32;
+
+const int X_DIALER_BTN_TXT = 13;
+const int W_DIALER_BTN_NUM_TXT = 77;
+const int W_DIALER_BTN_ALPHA_TXT = 121;
+
+const int W_ENRICHED_TEXT = 190;
+const int X_ENRICHED_TEXT = 143;
+
+Font*
+DialUtil::GetTextFontN(int textFontStyle)
+{
+ Font* font = new (std::nothrow) Font();
+
+ switch (textFontStyle)
+ {
+ case FONT_CALLING_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 94);
+ }
+ break;
+
+ case FONT_KEYPAD_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 116);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ {
+ font->Construct(FONT_STYLE_BOLD, 40);
+ }
+ break;
+
+ case FONT_KEYPAD_P:
+ {
+ font->Construct(FONT_STYLE_BOLD, 56);
+ }
+ break;
+
+ case FONT_KEYPAD_PLUS:
+ {
+ font->Construct(FONT_STYLE_BOLD, 64);
+ }
+ break;
+
+ case FONT_KEYPAD_CANCEL:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 34);
+ }
+ break;
+
+ case FONT_SUGGESTION_NAME:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 40);
+ }
+ break;
+
+ case FONT_SUGGESTION_MOBILE:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 35);
+ }
+ break;
+
+ case FONT_SUGGESTION_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 35);
+ }
+ break;
+
+ case FONT_SUGGESTION_LIST_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 40);
+ }
+ break;
+ }
+ return font;
+}
+
+Color*
+DialUtil::GetTextColorN(int textColor, int buttonStatus)
+{
+ Color* color = new (std::nothrow) Color();
+
+ if (buttonStatus == BUTTON_STATUS_PRESSED)
+ {
+ color->SetColorComponents(249, 249, 249);
+ return color;
+ }
+
+ switch (textColor)
+ {
+ case FONT_CALLING_TEXT:
+ {
+ color->SetColorComponents(0, 0, 0);
+ }
+ break;
+
+ case FONT_KEYPAD_NUMBER:
+ {
+ color->SetColorComponents(255, 255, 255);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ case FONT_KEYPAD_P:
+ case FONT_KEYPAD_PLUS:
+ {
+ color->SetColorComponents(148, 177, 200);
+ }
+ break;
+
+ case FONT_KEYPAD_CANCEL:
+ {
+ color->SetColorComponents(255, 255, 255);
+ }
+ break;
+
+ case FONT_SUGGESTION_NAME:
+ {
+ color->SetColorComponents(255, 255, 255);
+ }
+ break;
+
+ case FONT_SUGGESTION_MOBILE:
+ {
+ color->SetColorComponents(148, 177, 200);
+ }
+ break;
+
+ case FONT_HIGHLIGHT_SEARCH_KEYWORD:
+ case FONT_SUGGESTION_NUMBER:
+ {
+ color->SetColorComponents(26, 214, 227);
+ }
+ break;
+
+ case FONT_SUGGESTION_LIST_NUMBER:
+ {
+ color->SetColorComponents(124, 189, 224);
+ }
+ break;
+ }
+ return color;
+}
+
+bool
+DialUtil::IsNumericString(Tizen::Base::String& keyWord)
+{
+ bool isDigit = false;
+ String digitStr(L"");
+ if(keyWord.SubString(0,1,digitStr) == E_SUCCESS)
+ {
+ int digit;
+ if(Integer::Parse(digitStr,digit) == E_SUCCESS)
+ {
+ isDigit = true;
+ }
+ }
+ return isDigit;
+}
+
+void
+DialUtil::Draw9PatchToCanvas(Canvas& pCanvas, const String& bgImg)
+{
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ pCanvas.DrawNinePatchedBitmap(pCanvas.GetBounds(), *pBitmap);
+ }
+ delete pBitmap;
+
+ return;
+}
+
+void
+DialUtil::DrawImageToCanvas(const String& image, Dimension imageDimention, Canvas& pCanvas, int pos)
+{
+ //create and scale bitmap
+ Bitmap* pBitmap = AppUtility::GetBitmapFromResourcesN(image, imageDimention.width, imageDimention.height);
+
+ //Find position to draw bitmap
+ Point bitmapPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ bitmapPos.SetPosition(X_DIALER_BTN_TXT + (W_DIALER_BTN_NUM_TXT - pBitmap->GetWidth()) / 2, (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ bitmapPos.SetPosition(X_DIALER_BTN_TXT + W_DIALER_BTN_NUM_TXT + ((W_DIALER_BTN_ALPHA_TXT - pBitmap->GetWidth()) / 2), (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2, (pCanvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_BOTTOM_CENTER:
+ {
+ bitmapPos.SetPosition((pCanvas.GetBounds().width - pBitmap->GetWidth()) / 2, pCanvas.GetBounds().height / 2 + (pCanvas.GetBounds().height / 2 - pBitmap->GetHeight()) / 2);
+ }
+ break;
+ }
+
+ //draw bitmap
+ pCanvas.DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+
+ return;
+}
+
+void
+DialUtil::DrawTextToCanvas(const String& buttonText, int textFontStyle, Canvas& pCanvas, int pos, int buttonStatus)
+{
+ AppLogDebug("ENTER");
+ if (buttonText == null)
+ {
+ return;
+ }
+
+ //get text font
+ Font* font = GetTextFontN(textFontStyle);
+
+ //get text color
+ Color* textColor = GetTextColorN(textFontStyle, buttonStatus);
+
+ //create text element
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(buttonText);
+ pTextElement->SetTextColor(*textColor);
+ pTextElement->SetFont(*font);
+ delete textColor;
+
+ //get dimensions of the text
+ FloatDimension textDimension;
+ font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension);
+ if(textFontStyle != FONT_KEYPAD_NUMBER)
+ {
+ textDimension.height += font->GetDescender();
+ }
+
+ //create enriched text
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+
+ //set the position of the text in canvas
+ Point textPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ //Margin 13, rectangle for left text (13,0,77, height of canvas), center aligned
+ textPos.SetPosition(X_DIALER_BTN_TXT + ((W_DIALER_BTN_NUM_TXT - pEnrichedText->GetWidth()) / 2), (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ //rectangle for right text (13+77,0, 121, height of canvas), center aligned
+ textPos.SetPosition(X_DIALER_BTN_TXT + W_DIALER_BTN_NUM_TXT + ((121 - pEnrichedText->GetWidth()) / 2), (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ //rectangle for image : entire canvas, center aligned
+ textPos.SetPosition((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2, (pCanvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_TOP_LEFT:
+ {
+ textPos.SetPosition(10, (pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_TOP_CENTER:
+ {
+ textPos.SetPosition((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2, (pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_BOTTOM_LEFT:
+ {
+ textPos.SetPosition(10, pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+ break;
+
+ case POSITION_BOTTOM_CENTER:
+ {
+ int width = pEnrichedText->GetWidth();
+ if(width > W_ENRICHED_TEXT)
+ {
+ textPos.SetPosition(X_ENRICHED_TEXT, pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+ else
+ {
+ textPos.SetPosition(10 + ((pCanvas.GetBounds().width - pEnrichedText->GetWidth()) / 2), pCanvas.GetBounds().height / 2 + ((pCanvas.GetBounds().height / 2 - pEnrichedText->GetHeight()) / 2));
+ }
+
+ }
+ break;
+ }
+
+ //Draw EnrichedText to canvas
+ pCanvas.DrawText(textPos, *pEnrichedText);
+
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ delete font;
+
+ AppLogDebug("EXIT");
+ return;
+}
+
+void
+DialUtil::DrawCanvasToButton(Canvas* pCanvasNormal, Canvas* pCanvasPressed, Button* pButton)
+{
+ Bitmap* pNormalBgBmp = new (std::nothrow) Bitmap();
+ pNormalBgBmp->Construct(*pCanvasNormal, pCanvasNormal->GetBounds());
+ //scale bitmap to button size
+ pNormalBgBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pNormalBgBmp->Scale(pButton->GetSize());
+
+ pButton->SetNormalBackgroundBitmap(*pNormalBgBmp);
+
+ if (pCanvasPressed != null)
+ {
+ Bitmap* pPressedBgBmp = new (std::nothrow) Bitmap();
+ pPressedBgBmp->Construct(*pCanvasPressed, pCanvasPressed->GetBounds());
+ //scale bitmap to button size
+ pPressedBgBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pPressedBgBmp->Scale(pButton->GetSize());
+ pButton->SetPressedBackgroundBitmap(*pPressedBgBmp);
+ delete pPressedBgBmp;
+ pPressedBgBmp = null;
+ }
+ else
+ {
+ pButton->SetPressedBackgroundBitmap(*pNormalBgBmp);
+ }
+
+ pButton->SetDisabledBitmap(Point(0, 0), *pNormalBgBmp);
+ pButton->Invalidate(true);
+ delete pNormalBgBmp;
+ pNormalBgBmp = null;
+
+ return;
+}
+
+String
+DialUtil::ConvertDialedNumberToString(int dialNumber)
+{
+ switch (dialNumber)
+ {
+ case NUM_KEY1:
+ {
+ return L"1";
+ }
+ case NUM_KEY2:
+ {
+ return L"2";
+ }
+ case NUM_KEY3:
+ {
+ return L"3";
+ }
+ case NUM_KEY4:
+ {
+ return L"4";
+ }
+ case NUM_KEY5:
+ {
+ return L"5";
+ }
+ case NUM_KEY6:
+ {
+ return L"6";
+ }
+ case NUM_KEY7:
+ {
+ return L"7";
+ }
+ case NUM_KEY8:
+ {
+ return L"8";
+ }
+ case NUM_KEY9:
+ {
+ return L"9";
+ }
+ break;
+ case NUM_KEY0:
+ {
+ return L"0";
+ }
+ break;
+ }
+ return null;
+}
+
+IList*
+DialUtil::FetchPossibleNamesListN(const String& prevSearchStr, int nextDigit)
+{
+ //Fetch matching names for mapping char for digit, e.g. 2->ABC, 3->DEF.
+ ArrayList* pNamesList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pNamesList->Construct(8);
+
+ if(nextDigit >=2 && nextDigit <= 9)
+ {
+ switch(nextDigit)
+ {
+ case 2:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"a")));
+ pNamesList->Add((new String(prevSearchStr+L"b")));
+ pNamesList->Add((new String(prevSearchStr+L"c")));
+ pNamesList->Add((new String(prevSearchStr+L"A")));
+ pNamesList->Add((new String(prevSearchStr+L"B")));
+ pNamesList->Add((new String(prevSearchStr+L"C")));
+ }
+ break;
+
+ case 3:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"d")));
+ pNamesList->Add((new String(prevSearchStr+L"e")));
+ pNamesList->Add((new String(prevSearchStr+L"f")));
+ pNamesList->Add((new String(prevSearchStr+L"D")));
+ pNamesList->Add((new String(prevSearchStr+L"E")));
+ pNamesList->Add((new String(prevSearchStr+L"F")));
+ }
+ break;
+
+ case 4:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"g")));
+ pNamesList->Add((new String(prevSearchStr+L"h")));
+ pNamesList->Add((new String(prevSearchStr+L"i")));
+ pNamesList->Add((new String(prevSearchStr+L"G")));
+ pNamesList->Add((new String(prevSearchStr+L"H")));
+ pNamesList->Add((new String(prevSearchStr+L"I")));
+ }
+ break;
+
+ case 5:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"j")));
+ pNamesList->Add((new String(prevSearchStr+L"k")));
+ pNamesList->Add((new String(prevSearchStr+L"l")));
+ pNamesList->Add((new String(prevSearchStr+L"J")));
+ pNamesList->Add((new String(prevSearchStr+L"K")));
+ pNamesList->Add((new String(prevSearchStr+L"L")));
+ }
+ break;
+
+ case 6:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"m")));
+ pNamesList->Add((new String(prevSearchStr+L"n")));
+ pNamesList->Add((new String(prevSearchStr+L"o")));
+ pNamesList->Add((new String(prevSearchStr+L"M")));
+ pNamesList->Add((new String(prevSearchStr+L"N")));
+ pNamesList->Add((new String(prevSearchStr+L"O")));
+ }
+ break;
+
+ case 7:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"p")));
+ pNamesList->Add((new String(prevSearchStr+L"q")));
+ pNamesList->Add((new String(prevSearchStr+L"r")));
+ pNamesList->Add((new String(prevSearchStr+L"s")));
+ pNamesList->Add((new String(prevSearchStr+L"P")));
+ pNamesList->Add((new String(prevSearchStr+L"Q")));
+ pNamesList->Add((new String(prevSearchStr+L"R")));
+ pNamesList->Add((new String(prevSearchStr+L"S")));
+ }
+ break;
+
+ case 8:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"t")));
+ pNamesList->Add((new String(prevSearchStr+L"u")));
+ pNamesList->Add((new String(prevSearchStr+L"v")));
+ pNamesList->Add((new String(prevSearchStr+L"T")));
+ pNamesList->Add((new String(prevSearchStr+L"U")));
+ pNamesList->Add((new String(prevSearchStr+L"V")));
+ }
+ break;
+
+ case 9:
+ {
+ pNamesList->Add((new String(prevSearchStr+L"w")));
+ pNamesList->Add((new String(prevSearchStr+L"x")));
+ pNamesList->Add((new String(prevSearchStr+L"y")));
+ pNamesList->Add((new String(prevSearchStr+L"z")));
+ pNamesList->Add((new String(prevSearchStr+L"W")));
+ pNamesList->Add((new String(prevSearchStr+L"X")));
+ pNamesList->Add((new String(prevSearchStr+L"Y")));
+ pNamesList->Add((new String(prevSearchStr+L"Z")));
+ }
+ break;
+
+ }
+ }
+ return pNamesList;
+}
+
+void
+DialUtil::ConvertNameToNumericKeys(String& subContactName, String& possibleKeysTyped)
+{
+ for(int charPos=0;charPos < subContactName.GetLength();charPos++)
+ {
+ wchar_t nextChar;
+ subContactName.GetCharAt(charPos,nextChar);
+ switch(nextChar)
+ {
+ case 'a':case 'A':
+ case 'b':case 'B':
+ case 'c':case 'C':
+ possibleKeysTyped.Append(2);
+ break;
+
+ case 'd':case 'D':
+ case 'e':case 'E':
+ case 'f':case 'F':
+ possibleKeysTyped.Append(3);
+ break;
+
+ case 'g':case 'G':
+ case 'h':case 'H':
+ case 'i':case 'I':
+ possibleKeysTyped.Append(4);
+ break;
+
+ case 'j':case 'J':
+ case 'k':case 'K':
+ case 'l':case 'L':
+ possibleKeysTyped.Append(5);
+ break;
+
+ case 'm':case 'M':
+ case 'n':case 'N':
+ case 'o':case 'O':
+ possibleKeysTyped.Append(6);
+ break;
+
+ case 'p':case 'P':
+ case 'q':case 'Q':
+ case 'r':case 'R':
+ case 's':case 'S':
+ possibleKeysTyped.Append(7);
+ break;
+
+ case 't':case 'T':
+ case 'u':case 'U':
+ case 'v':case 'V':
+ possibleKeysTyped.Append(8);
+ break;
+
+ case 'w':case 'W':
+ case 'x':case 'X':
+ case 'y':case 'Y':
+ case 'z':case 'Z':
+ possibleKeysTyped.Append(9);
+ break;
+
+ default:
+ break;
+ }
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallConfCallerListForm.cpp
+ * @brief Conference caller list form
+ */
+#include <FSystem.h>
+#include "CallApp.h"
+#include "CallConfCallerListForm.h"
+#include "CallAppUtility.h"
+#include "CallPresentationModel.h"
+#include "CallSceneRegister.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//Constants
+const int W_HOLD_BITMAP = 78;
+const int H_HOLD_BITMAP = 78;
+const int W_BACK_BITMAP = 56;
+const int H_BACK_BITMAP = 56;
+const int X_BACK_BITMAP = 8;
+const int Y_BACK_BITMAP = 8;
+const int W_SPLIT_BITMAP = 74;
+const int H_SPLIT_BITMAP = 74;
+const int W_END_BITMAP = 80;
+const int H_END_BITMAP = 74;
+const int IDI_MAX_SECONDS = 60;
+const int IDI_MAX_MINS = 60;
+const int LIST_ITEM_HEIGHT = 112;
+const int X_SPLIT_BUTTON_MARGIN = 26;
+const int Y_SPLIT_BUTTON_MARGIN = 19;
+const int X_END_BUTTON_PADDING = 26;
+const int X_CALLER_LABEL = 116;
+const int Y_CALLER_LABEL = 0;
+const int W_CALLER_LABEL = 488;
+const int H_CALLER_LABEL = 112;
+
+
+static const wchar_t* IDL_CONFCALL_LIST_FORM = L"IDL_CONFCALL_LIST_FORM";
+static const wchar_t* IDC_CALL_TIME_LABEL = L"IDC_CALL_TIME_LABEL";
+static const wchar_t* IDB_SPLIT_NORMAL_BUTTON_ICON = L"C01-1_conference_split.png";
+static const wchar_t* IDB_SPLIT_PRESS_BUTTON_ICON = L"C01-1_conference_split_press.png";
+static const wchar_t* IDB_END_NORMAL_BUTTON_ICON = L"C01-1_conference_end.png";
+static const wchar_t* IDB_END_PRESS_BUTTON_ICON = L"C01-1_conference_end_press.png";
+static const wchar_t* IDC_END_CONFCALL_BUTTON = L"IDC_END_CONFCALL_BUTTON";
+static const wchar_t* IDC_HOLD_CONFCALL_BUTTON = L"IDC_HOLD_CONFCALL_BUTTON";
+static const wchar_t* IDC_CALLER1_PANEL = L"IDC_CALLER1_PANEL";
+static const wchar_t* IDC__LINE_LABEL1 = L"IDC__LINE_LABEL1";
+static const wchar_t* IDC_CALLER2_PANEL = L"IDC_CALLER2_PANEL";
+static const wchar_t* IDC__LINE_LABEL2 = L"IDC__LINE_LABEL2";
+static const wchar_t* IDC_CALLER3_PANEL = L"IDC_CALLER3_PANEL";
+static const wchar_t* IDC__LINE_LABEL3 = L"IDC__LINE_LABEL3";
+static const wchar_t* IDC_CALLER4_PANEL = L"IDC_CALLER4_PANEL";
+static const wchar_t* IDC__LINE_LABEL4 = L"IDC__LINE_LABEL4";
+static const wchar_t* IDC_CALLER5_PANEL = L"IDC_CALLER5_PANEL";
+static const wchar_t* IDC__LINE_LABEL5 = L"IDC__LINE_LABEL5";
+static const wchar_t* IDC_CONF_CALL_LIST_TABLEVIEW = L"IDC_CONF_CALL_LIST_TABLEVIEW";
+
+//color
+const unsigned int COLOR_END_CALL_BG = Color32<180, 60, 60>::Value;
+const unsigned int COLOR_END_CALL_BG_PRESS = Color32<61, 153, 208>::Value;
+const unsigned int COLOR_SPLIT_CALL_BG = Color32<129, 140, 148>::Value;
+const unsigned int COLOR_SPLIT_CALL_BG_PRESS = Color32<63, 155, 210>::Value;
+ConfCallerListForm::ConfCallerListForm(void)
+: BaseForm(FORMTYPE_CONFCALLLIST)
+{
+ __pConfCallInfo = null;
+ __pConfCallTimer = null;
+ __isCallSplit = false;
+ __isConfCallStateInProgress = false;
+ __pAddressbook = null;
+}
+
+ConfCallerListForm::~ConfCallerListForm(void)
+{
+ if (__pConfCallTimer != null)
+ {
+ __pConfCallTimer->Cancel();
+ delete __pConfCallTimer;
+ }
+}
+
+void
+ConfCallerListForm::Initialize(void)
+{
+ Construct(IDL_CONFCALL_LIST_FORM);
+}
+
+result
+ConfCallerListForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ //Add action listener to buttons
+ AddActionListener(IDC_END_CONFCALL_BUTTON, IDA_END_CONF_CALL);
+ AddActionListener(IDC_HOLD_CONFCALL_BUTTON, IDA_HOLD_CONF_CALL);
+ SetFormBackEventListener(this);
+ Label* pTimerLbl = static_cast<Label*>(GetControl(IDC_CALL_TIME_LABEL));
+ SetControlAlwaysOnTop(*pTimerLbl,true);
+
+ CreateTableView();
+ __pCallPresentor = CallPresentationModel::GetInstance();
+ return r;
+}
+
+void
+ConfCallerListForm::CreateTableView(void)
+{
+ __pList = static_cast <TableView*> (GetControl(IDC_CONF_CALL_LIST_TABLEVIEW));
+ __pList->SetItemProvider(this);
+ AddControl(__pList);
+}
+
+void
+ConfCallerListForm::AddActionListener(const String& keyName, CommandIds cmdId)
+{
+ Button* pButtonKeypad = static_cast<Button*>(GetControl(keyName));
+ if (pButtonKeypad != null)
+ {
+ pButtonKeypad->SetActionId(cmdId);
+ pButtonKeypad->AddActionEventListener(*this);
+ }
+}
+
+result
+ConfCallerListForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pCallPresentor != null)
+ {
+ __pCallPresentor = null;
+ }
+
+ if (__pConfCallInfo != null)
+ {
+ delete __pConfCallInfo;
+ __pConfCallInfo = null;
+ }
+
+ //RemoveAllControls();
+ return r;
+}
+
+void
+ConfCallerListForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ switch (actionId)
+ {
+ case IDA_END_CONF_CALL:
+ {
+ bool success = __pCallPresentor->EndConferenceCall();
+ if (success == true)
+ {
+ delete __pConfCallInfo;
+ __pConfCallInfo = null;
+ }
+ }
+ break;
+
+ case IDA_HOLD_CONF_CALL:
+ {
+ // User has pressed end conference call and we are waiting for TAPI response
+ if(__pConfCallInfo == null)
+ {
+ return;
+ }
+ bool success = true;
+ bool isCallOnHold = __pConfCallInfo->IsOnHold();
+ if(IsConfCallStateInProgress() == false)
+ {
+ if (isCallOnHold == false)
+ {
+ success = __pCallPresentor->HoldConferenceCall();
+ SetConfCallStateInProgress(true);
+ }
+ else
+ {
+ success = __pCallPresentor->ActivateConferenceCall();
+ SetConfCallStateInProgress(true);
+ }
+ }
+ }
+ break;
+
+ case IDA_BACK_EVENT:
+ {
+ ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
+ int noOfCalls = pCallList->GetCount();
+
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(noOfCalls);
+
+ for (int index = 0; index < noOfCalls; index++)
+ {
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCallList->GetAt(index, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ }
+ }
+
+ if (noOfCalls == 1)
+ {
+ //single active call - goto active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ else
+ {
+ //goto multiple active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MULTIPLEACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ pCallList->RemoveAll();
+ delete pCallList;
+ }
+ break;
+
+ case IDA_SPLIT_CALLER1:
+ case IDA_SPLIT_CALLER2:
+ case IDA_SPLIT_CALLER3:
+ case IDA_SPLIT_CALLER4:
+ case IDA_SPLIT_CALLER5:
+ {
+ // User has pressed end conference call and we are waiting for TAPI response
+ if(__pConfCallInfo == null)
+ {
+ break;
+ }
+ __isCallSplit = __pCallPresentor->SplitFromConference(SplitConfCallerCmdIds(actionId),__pConfCallInfo->GetCallerList());
+ if(__isCallSplit == true)
+ {
+ __pList->UpdateTableView();
+ }
+ }
+ break;
+
+ case IDA_END_CALLER1:
+ case IDA_END_CALLER2:
+ case IDA_END_CALLER3:
+ case IDA_END_CALLER4:
+ case IDA_END_CALLER5:
+ {
+ __pList->SetEnabled(false);
+ // User has pressed end conference call and we are waiting for TAPI response
+ if(__pConfCallInfo == null)
+ {
+ break;
+ }
+ __pCallPresentor->EndCallFromConference(EndConfCallerCmdIds(actionId),__pConfCallInfo->GetCallerList());
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ //set itself as listener
+ __pCallPresentor->SetTelEventListener(this);
+ __isCallSplit = false;
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+ AppLogDebug("Enter");
+
+ //DisableAllControls();
+ if (__pConfCallInfo != null)
+ {
+ delete __pConfCallInfo;
+ __pConfCallInfo = null;
+ }
+ //show 1st caller's info.
+ //Fetch Conference call info from telephony manager
+ __pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+ AppLogDebug("Enter %x",__pConfCallInfo);
+
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(this);
+ }
+
+ //show active call timer
+// ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
+ ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetDurationTime());
+
+ //Set the correct bitmap to the "hold" button based on the current state of the call
+ SetHoldButtonStatus(__pConfCallInfo->IsOnHold());
+ //disable Hold Button, if 2 active calls are present,Else enable it.
+ Button* pButtonHold = static_cast<Button*>(GetControl(IDC_HOLD_CONFCALL_BUTTON));
+ if(pButtonHold != null)
+ {
+ if (__pCallPresentor->GetCurrentCallCount() == IDI_MAX_ACTIVE_CALLS)
+ {
+ pButtonHold->SetShowState(false);
+ }
+ else
+ {
+ pButtonHold->SetShowState(true);
+ }
+ pButtonHold->Invalidate(true);
+ }
+
+ __pList->UpdateTableView();
+ __pList->SetEnabled(true);
+ AddOrientationEventListener(*this);
+}
+
+void
+ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ if (__pConfCallTimer != null)
+ {
+ __pConfCallTimer->Cancel();
+ delete __pConfCallTimer;
+ __pConfCallTimer = null;
+ }
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(null);
+ }
+
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+}
+
+result
+ConfCallerListForm::OnDraw(void)
+{
+ return E_SUCCESS;
+}
+
+void
+ConfCallerListForm::SetHoldButtonStatus(bool isCallOnHold)
+{
+ Button* pButtonHold = static_cast<Button*>(GetControl(IDC_HOLD_CONFCALL_BUTTON));
+ if(pButtonHold != null)
+ {
+ Bitmap* pNormalBitmapToBeDrawn = null;
+ Bitmap* pPressBitmapToBeDrawn = null;
+
+ if (isCallOnHold == true)
+ {
+ pNormalBitmapToBeDrawn = AppUtility::GetBitmapFromResourcesN(IDB_UNHOLD_NORMAL_BUTTON_ICON,
+ W_HOLD_BITMAP, W_HOLD_BITMAP);
+ pPressBitmapToBeDrawn = AppUtility::GetBitmapFromResourcesN(IDB_UNHOLD_PRESS_BUTTON_ICON,
+ W_HOLD_BITMAP, W_HOLD_BITMAP);
+ }
+ else
+ {
+ pNormalBitmapToBeDrawn = AppUtility::GetBitmapFromResourcesN(IDB_HOLD_NORMAL_BUTTON_ICON,
+ W_HOLD_BITMAP, W_HOLD_BITMAP);
+ pPressBitmapToBeDrawn = AppUtility::GetBitmapFromResourcesN(IDB_HOLD_PRESS_BUTTON_ICON,
+ W_HOLD_BITMAP, W_HOLD_BITMAP);
+ }
+
+ if (pNormalBitmapToBeDrawn)
+ {
+ pButtonHold->SetNormalBitmap(Point(0, 0), *pNormalBitmapToBeDrawn);
+ }
+ if (pPressBitmapToBeDrawn)
+ {
+ pButtonHold->SetPressedBitmap(Point(0, 0), *pPressBitmapToBeDrawn);
+ }
+
+ pButtonHold->Invalidate(true);
+ delete pNormalBitmapToBeDrawn;
+ pNormalBitmapToBeDrawn = null;
+ delete pPressBitmapToBeDrawn;
+ pPressBitmapToBeDrawn = null;
+ }
+}
+
+void
+ConfCallerListForm::HandleParticipantsChanged(void)
+{
+ AppLogDebug("Enter");
+ AppCallInfo* pCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+ if (pCallInfo == null)
+ {
+ return;
+ }
+ if (__pConfCallInfo != null)
+ {
+ delete __pConfCallInfo;
+ __pConfCallInfo = null;
+ }
+ __pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *__pConfCallInfo = *pCallInfo;
+ __pList->UpdateTableView();
+ __pList->SetEnabled(true);
+}
+
+
+void
+ConfCallerListForm::OnConfCallHoldTelephoneCallBackOccured(bool success)
+{
+ bool isCallOnHold = __pConfCallInfo->IsOnHold();
+ isCallOnHold = !(isCallOnHold);
+ __pConfCallInfo->SetOnHold(isCallOnHold);
+ __pList->UpdateTableView();
+ SetHoldButtonStatus(isCallOnHold);
+ SetConfCallStateInProgress(false);
+
+}
+
+bool
+ConfCallerListForm::IsConfCallStateInProgress(void)
+{
+ return __isConfCallStateInProgress;
+}
+
+void
+ConfCallerListForm::SetConfCallStateInProgress(bool progress)
+{
+ __isConfCallStateInProgress = progress;
+}
+
+
+void
+ConfCallerListForm::OnConfCallActiveTelephoneCallBackOccured(bool success)
+{
+ bool isCallOnHold = __pConfCallInfo->IsOnHold();
+ isCallOnHold = !(isCallOnHold);
+ __pConfCallInfo->SetOnHold(!success);
+ __pList->UpdateTableView();
+ SetHoldButtonStatus(!success);
+ SetConfCallStateInProgress(false);
+
+}
+
+/*void
+ConfCallerListForm::HandleHoldConferenceCallback(bool success)
+{
+ if(success == true)
+ {
+ __pList->UpdateTableView();
+ SetHoldButtonStatus(success);
+ }
+}*/
+
+void
+ConfCallerListForm::DisableAllControls(void)
+{
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_CALLER1_PANEL));
+ if (pKeysPanel != null)
+ {
+ pKeysPanel->SetShowState(false);
+ Label* pLineLabel1 = static_cast<Label*>(GetControl(IDC__LINE_LABEL1));
+ pLineLabel1->SetShowState(false);
+ pKeysPanel = null;
+ }
+ pKeysPanel = static_cast<Panel*>(GetControl(IDC_CALLER2_PANEL));
+ if (pKeysPanel != null)
+ {
+ pKeysPanel->SetShowState(false);
+ Label* pLineLabel1 = static_cast<Label*>(GetControl(IDC__LINE_LABEL2));
+ pLineLabel1->SetShowState(false);
+ pKeysPanel = null;
+ }
+ pKeysPanel = static_cast<Panel*>(GetControl(IDC_CALLER3_PANEL));
+ if (pKeysPanel != null)
+ {
+ pKeysPanel->SetShowState(false);
+ Label* pLineLabel1 = static_cast<Label*>(GetControl(IDC__LINE_LABEL3));
+ pLineLabel1->SetShowState(false);
+ pKeysPanel = null;
+ }
+ pKeysPanel = static_cast<Panel*>(GetControl(IDC_CALLER4_PANEL));
+ if (pKeysPanel != null)
+ {
+ pKeysPanel->SetShowState(false);
+ Label* pLineLabel1 = static_cast<Label*>(GetControl(IDC__LINE_LABEL4));
+ pLineLabel1->SetShowState(false);
+ pKeysPanel = null;
+ }
+ pKeysPanel = static_cast<Panel*>(GetControl(IDC_CALLER5_PANEL));
+ if (pKeysPanel != null)
+ {
+ pKeysPanel->SetShowState(false);
+ Label* pLineLabel1 = static_cast<Label*>(GetControl(IDC__LINE_LABEL5));
+ pLineLabel1->SetShowState(false);
+ pKeysPanel = null;
+ }
+}
+
+void
+ConfCallerListForm::ShowTimerInfo(const String& timerLblName, long long startTime)
+{
+ Label* pTimerLbl = static_cast<Label*>(GetControl(timerLblName));
+
+ if (__pConfCallTimer == null)
+ {
+ __pConfCallTimer = new (std::nothrow) Timer();
+ __pConfCallTimer->Construct(*this);
+ }
+
+ if (pTimerLbl != null)
+ {
+ //current system time
+ long long currTime = 0;
+ //SystemTime::GetTicks(currTime);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ currTime = pPhoneApp->GetCallAppTicks();
+ //Set call duration
+ TimeSpan diffSpan(abs(startTime - currTime));
+
+ String activeCallTime(L"");
+
+ long long hr = diffSpan.GetHours();
+ if (hr <= 9) {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(hr);
+ activeCallTime.Append(L":");
+
+ long long min = diffSpan.GetMinutes();
+ if (min <= 9) {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(min);
+ activeCallTime.Append(L":");
+
+ long long sec = diffSpan.GetSeconds();
+ if (sec <= 9) {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(sec);
+
+ pTimerLbl->SetText(activeCallTime);
+ __pConfCallTimer->StartAsRepeatable(TimeSpan::NUM_OF_TICKS_IN_SECOND);
+
+ }
+}
+
+void
+ConfCallerListForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ //Call default implementation of "Object.Equals()"
+ //returns true, if they are pointing to same address.
+ if (__pConfCallTimer->Equals(timer))
+ {
+ Label* pTimerLbl = static_cast<Label*>(GetControl(IDC_CALL_TIME_LABEL));
+ if (pTimerLbl)
+ {
+ String activeCallTime = pTimerLbl->GetText();
+ // Create a StringTokenizer instance
+ StringTokenizer strTokens(activeCallTime, L":");
+
+ int count = strTokens.GetTokenCount(); // count == 3
+ String token;
+ int sec = 0;
+ int min = 0;
+ int hr = 0;
+ for (int index = 0; index < count; index++)
+ {
+ switch (index)
+ {
+ case 0:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, hr);
+ break;
+
+ case 1:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, min);
+ break;
+
+ case 2:
+ strTokens.GetNextToken(token);
+ Integer::Parse(token, sec);
+ break;
+ }
+ }
+ //update all values
+ sec = sec + 1;
+ if (sec == IDI_MAX_SECONDS)
+ {
+ sec = 0;
+ min = min + 1;
+ }
+ if (min == IDI_MAX_MINS)
+ {
+ min = 0;
+ hr = hr + 1;
+ }
+
+ //replace string
+ activeCallTime.Clear();
+ if (hr <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(hr);
+ activeCallTime.Append(":");
+ if (min <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(min);
+ activeCallTime.Append(":");
+ if (sec <= 9)
+ {
+ activeCallTime.Append("0");
+ }
+ activeCallTime.Append(sec);
+ //update timer label
+ pTimerLbl->SetText(activeCallTime);
+ pTimerLbl->Invalidate(true);
+ }
+ }
+}
+
+void
+ConfCallerListForm::OnFormBackRequested(Form& source)
+{
+ //If the call is split then wait for it to automatically go back once it split is success
+ if(__isCallSplit == true)
+ {
+ return;
+ }
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+
+ ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
+ int noOfCalls = pCallList->GetCount();
+
+ //Ownership - To be deleted in 'OnSceneActivatedN' of next form
+ ArrayList* pCallInfoList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pCallInfoList->Construct(noOfCalls);
+
+ for (int index = 0; index < noOfCalls; index++)
+ {
+ //fetch call info and add to list
+ AppCallInfo callInfo;
+ result r = pCallList->GetAt(index, callInfo);
+ if (r == E_SUCCESS)
+ {
+ //copy call information to new instance
+ AppCallInfo* pCaller = new (std::nothrow) AppCallInfo();
+ *pCaller = callInfo;
+ pCallInfoList->Add(pCaller);
+ }
+ }
+
+ if (noOfCalls == 1)
+ {
+ //single active call - goto active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_CONFCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ else
+ {
+ //goto multiple active call form
+ pSceneManager->GoForward(ForwardSceneTransition(IDSCN_SCENE_MULTIPLEACTIVECALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pCallInfoList);
+ }
+ pCallList->RemoveAll();
+ delete pCallList;
+
+}
+
+void
+ConfCallerListForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+ __pList->UpdateTableView();
+}
+
+void
+ConfCallerListForm::OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList)
+{
+ //No implementation
+}
+
+void
+ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton,
+ Button& endButton, Label& callerLabel, SplitConfCallerCmdIds splitCmdId,
+ EndConfCallerCmdIds EndCmdId, const String& displayName)
+{
+ Bitmap* pNormalSplitBitmap = null;
+ Bitmap* pPressSplitBitmap = null;
+ Bitmap* pNormalEndBitmap = null;
+ Bitmap* pPressEndBitmap = null;
+
+ pNormalSplitBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPLIT_NORMAL_BUTTON_ICON,
+ W_SPLIT_BITMAP, H_SPLIT_BITMAP);
+ pPressSplitBitmap = AppUtility::GetBitmapFromResourcesN(IDB_SPLIT_PRESS_BUTTON_ICON,
+ W_SPLIT_BITMAP, H_SPLIT_BITMAP);
+ pNormalEndBitmap = AppUtility::GetBitmapFromResourcesN(IDB_END_NORMAL_BUTTON_ICON,
+ W_END_BITMAP, H_END_BITMAP);
+ pPressEndBitmap = AppUtility::GetBitmapFromResourcesN(IDB_END_PRESS_BUTTON_ICON,
+ W_END_BITMAP, H_END_BITMAP);
+
+ bool isSplitAllowed = true;
+ if ((__pCallPresentor->IsSplitAllowed() == false) || (__pConfCallInfo->IsOnHold() == true) || (__isCallSplit == true))
+ {
+ isSplitAllowed = false;
+ }
+
+ splitButton.SetActionId(splitCmdId);
+ splitButton.AddActionEventListener(*this);
+ splitButton.SetColor(BUTTON_STATUS_NORMAL,COLOR_SPLIT_CALL_BG);
+ splitButton.SetColor(BUTTON_STATUS_PRESSED,COLOR_SPLIT_CALL_BG_PRESS);
+ splitButton.SetNormalBitmap(Point(0, 0), *pNormalSplitBitmap);
+ splitButton.SetPressedBitmap(Point(0, 0), *pPressSplitBitmap);
+
+
+ bool isEnableEndButton = (__isCallSplit == false);
+ endButton.SetEnabled(isEnableEndButton);
+ endButton.SetActionId(EndCmdId);
+ endButton.AddActionEventListener(*this);
+ endButton.SetNormalBitmap(Point(0, 0), *pNormalEndBitmap);
+ endButton.SetColor(BUTTON_STATUS_NORMAL,COLOR_END_CALL_BG);
+ endButton.SetColor(BUTTON_STATUS_PRESSED,COLOR_END_CALL_BG_PRESS);
+ endButton.SetPressedBitmap(Point(0, 0), *pPressEndBitmap);
+
+
+ if (isSplitAllowed == false)
+ {
+ splitButton.SetShowState(false);
+ callerLabel.SetBounds(splitButton.GetBounds().x, callerLabel.GetBounds().y,
+ callerLabel.GetBounds().width, callerLabel.GetBounds().height);
+ }
+ else
+ {
+ splitButton.SetShowState(true);
+ callerLabel.SetBounds((splitButton.GetBounds().x + splitButton.GetBounds().width), callerLabel.GetBounds().y,
+ callerLabel.GetBounds().width, callerLabel.GetBounds().height);
+ }
+
+
+ callerLabel.SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ callerLabel.SetText(displayName);
+ delete pNormalEndBitmap;
+ pNormalEndBitmap = null;
+ delete pPressEndBitmap;
+ pPressEndBitmap = null;
+ delete pNormalSplitBitmap;
+ pNormalSplitBitmap = null;
+ delete pPressSplitBitmap;
+ pPressSplitBitmap = null;
+}
+
+int
+ConfCallerListForm::GetItemCount(void)
+{
+ IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
+ return pCallList->GetCount();
+}
+
+TableViewItem*
+ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
+{
+ AppLogDebug("%d %x",itemWidth,__pConfCallInfo);
+ IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
+
+ TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+
+ pItem->Construct(Tizen::Graphics::Dimension(GetBounds().width, LIST_ITEM_HEIGHT), style);
+
+ Button *pSplitCallButton = new (std::nothrow) Button();
+ pSplitCallButton->Construct(Rectangle(X_SPLIT_BUTTON_MARGIN,Y_SPLIT_BUTTON_MARGIN,W_SPLIT_BITMAP,W_SPLIT_BITMAP));
+
+ Label *pCallLabel = new (std::nothrow)Label();
+ pCallLabel->Construct(Rectangle(X_CALLER_LABEL,Y_CALLER_LABEL,W_CALLER_LABEL,H_CALLER_LABEL),L"");
+
+ Button *pEndCallButton = new (std::nothrow)Button();
+ pEndCallButton->Construct(Rectangle(GetBounds().width-X_END_BUTTON_PADDING-W_SPLIT_BITMAP,Y_SPLIT_BUTTON_MARGIN,W_SPLIT_BITMAP,W_SPLIT_BITMAP));
+
+
+ AppCallInfo callInfo;
+ String pContactNo;
+ result r = pCallList->GetAt(itemIndex, callInfo);
+
+ if(callInfo.GetContactNumber().IsEmpty() == false)
+ {
+ pContactNo.Append(callInfo.GetContactNumber());
+ }
+ else
+ {
+ pContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+ //fetch contact details based on phone number
+ String* pDisplayName = callInfo.FetchLatestCallerNameN(pContactNo);
+
+ if(pDisplayName != null)
+ {
+ if ((pDisplayName->IsEmpty()) || r != E_SUCCESS)
+ {
+ pDisplayName->Append(pContactNo);
+ }
+ switch (itemIndex)
+ {
+ case 0:
+ {
+ CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel,
+ IDA_SPLIT_CALLER1,IDA_END_CALLER1,*pDisplayName);
+ }
+ break;
+ case 1:
+ {
+ CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel,
+ IDA_SPLIT_CALLER2,IDA_END_CALLER2,*pDisplayName);
+ }
+ break;
+ case 2:
+ {
+ CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel,
+ IDA_SPLIT_CALLER3,IDA_END_CALLER3,*pDisplayName);
+ }
+ break;
+ case 3:
+ {
+ CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel,
+ IDA_SPLIT_CALLER4,IDA_END_CALLER4,*pDisplayName);
+ }
+ break;
+ case 4:
+ {
+ CreateItemAndAddActionListener(*pSplitCallButton,*pEndCallButton,*pCallLabel,
+ IDA_SPLIT_CALLER5,IDA_END_CALLER5,*pDisplayName);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ pItem->AddControl(pSplitCallButton);
+ pItem->AddControl(pCallLabel);
+ pItem->AddControl(pEndCallButton);
+ if(pDisplayName != null)
+ {
+ delete pDisplayName;
+ pDisplayName = null;
+ }
+ return pItem;
+
+
+}
+
+bool
+ConfCallerListForm::DeleteItem(int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+ConfCallerListForm::UpdateItem(int itemIndex, TableViewItem* pItem)
+{
+ return ;
+}
+
+void
+ConfCallerListForm::OnSettingChanged(Tizen::Base::String& key)
+{
+ if(key == L"http://tizen.org/setting/contacts.order.firstname")
+ {
+ __pList->UpdateTableView();
+ }
+}
+
+int
+ConfCallerListForm::GetDefaultItemHeight(void)
+{
+ return LIST_ITEM_HEIGHT;
+}
+
+void
+ConfCallerListForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+ AppLogDebug("Enter");
+ __pList->UpdateTableView();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallDtmfKeypadPanel.cpp
+ * @brief Dtmf keypad implementation class
+ */
+#include <FApp.h>
+#include <FMedia.h>
+#include "CallAppUtility.h"
+#include "CallCommonUtils.h"
+#include "CallDtmfKeypadPanel.h"
+#include "CallTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+const int W_VOICE_CALL_ICON = 70;
+const int H_VOICE_CALL_ICON = 36;
+const int INITIAL_X_OFFSET = 13;
+const int LEFT_X_OFFSET = 77;
+const int RIGHT_X_OFFSET = 121;
+const int INITIAL_TEXT_X_OFFSET = 24;
+const int LEFT_TEXT_X_OFFSET = 64;
+const int LEFT_TEXT_X_MARGIN = 18;
+const int RIGHT_TEXT_X_OFFSET = 94;
+const int W_DTMF_BTN = 212;
+const int H_DTMF_BTN = 134;
+const Color COLOR_KEYPAD_BG(0, 0, 0, 100);
+const wchar_t* IDC_TEXTBOX = L"IDC_NUM_EDITFIELD";
+const wchar_t* IDC_BUTTON = L"IDC_BUTTON";
+const wchar_t* IDC_DTMF_KEY_BG_LABEL = L"IDC_DTMF_KEY_BG_LABEL";
+
+DtmfKeyPadPanel::DtmfKeyPadPanel(void)
+{
+ __pActionListener = null;
+}
+
+DtmfKeyPadPanel::~DtmfKeyPadPanel(void)
+{
+}
+
+bool
+DtmfKeyPadPanel::Initialize(IActionEventListener* pEventListener, Rectangle& boundsRect)
+{
+ result r = Construct(IDL_DTMF_PANEL);
+ if (IsFailed(r))
+ {
+ return false;
+ }
+
+ r = SetBounds(boundsRect);
+ if (IsFailed(r))
+ {
+ return false;
+ }
+
+ //disable auto link detection
+ EditField* pTextBox = static_cast<EditField*>(GetControl(IDC_TEXTBOX));
+ if (pTextBox != null)
+ {
+ pTextBox->SetAutoLinkMask(0);
+ pTextBox->SetFocus();
+ }
+ __pActionListener = pEventListener;
+ return true;
+}
+
+void
+DtmfKeyPadPanel::setKeysPanelBounds(void)
+{
+ Label* pKeyBgLbl = static_cast<Label*>(GetControl(IDC_DTMF_KEY_BG_LABEL, true));
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDL_DTMF_KEYS_PANEL, true));
+ if(pKeyBgLbl != null && pKeysPanel != null)
+ {
+ pKeysPanel->SetBounds(pKeyBgLbl->GetBounds());
+ pKeysPanel->InvalidateBounds(pKeyBgLbl->GetBounds());
+ }
+
+}
+
+result
+DtmfKeyPadPanel::OnInitializing(void)
+{
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetParent()->GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+
+ //Set background bitmap
+ Label* pKeyBgLbl = static_cast<Label*>(GetControl(IDC_DTMF_KEY_BG_LABEL, true));
+ /*Bitmap* pKeyBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_KEYPAD_BG, pKeyBgLbl->GetWidth(), pKeyBgLbl->GetHeight());
+ if (pKeyBgBitmap != null)
+ {
+ pKeyBgLbl->SetBackgroundBitmap(*pKeyBgBitmap);
+ delete pKeyBgBitmap;
+ pKeyBgBitmap = null;
+ }*/
+
+ //DTMF Keys panel
+ Panel* pKeysPanel = new (std::nothrow) Panel();
+ pKeysPanel->Construct(IDL_DTMF_KEYS_PANEL);
+ pKeysPanel->SetBounds(pKeyBgLbl->GetBounds());
+ AddControl(pKeysPanel);
+
+ //Add action listener and bg to buttons.
+ AddListenersToButtons();
+ result r = SetBackgroundtoButton();
+ return r;
+}
+
+void
+DtmfKeyPadPanel::AddListenersToButtons()
+{
+ for (int i = NUM_KEY1; i <= HASH_KEY; ++i)
+ {
+ String buttonName(IDC_BUTTON);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName, true));
+ if(pButton == null)
+ {
+ continue;
+ }
+ pButton->SetActionId(i);
+ SetControlAlwaysOnTop(*pButton,true);
+ //Add Listeners
+ if(__pActionListener != null)
+ {
+ pButton->AddActionEventListener(*__pActionListener);
+ }
+ }
+}
+
+result
+DtmfKeyPadPanel::SetBackgroundtoButton()
+{
+ AppLogDebug("ENTER");
+ result r = E_FAILURE;
+ for (int i = 1; i <= 12; i++)
+ {
+ String buttonName(IDC_BUTTON);
+ buttonName.Append(i);
+ Button* pButton = static_cast<Button*>(GetControl(buttonName,true));
+ if(pButton == null)
+ {
+ continue;
+ }
+ pButton->SetEffectSoundEnabled(false);
+ //normal bg bitmap
+ Rectangle canvasRect(0, 0, W_DTMF_BTN, H_DTMF_BTN);
+ Canvas canvasNormal;
+ canvasNormal.Construct(canvasRect);
+ canvasNormal.SetBackgroundColor(Color(255,255,255,0));
+ canvasNormal.Clear();
+ //pressed bg bitmap
+ Canvas canvasPressed;
+ canvasPressed.Construct(canvasRect);
+
+ String number(DialUtil::ConvertDialedNumberToString(pButton->GetActionId()));
+ switch (pButton->GetActionId())
+ {
+ case NUM_KEY1:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawImageToCanvas(IDB_KEYPAD_NUM1_ICON, Dimension(W_VOICE_CALL_ICON, H_VOICE_CALL_ICON), canvasNormal, POSITION_RIGHT);
+
+ //Set canvas for pressed state of the button
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawImageToCanvas(IDB_KEYPAD_NUM1_ICON, Dimension(W_VOICE_CALL_ICON, H_VOICE_CALL_ICON), canvasPressed, POSITION_RIGHT);
+ }
+ break;
+
+ case NUM_KEY2:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY2_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ //Set canvas for pressed state of the button
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY2_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY3:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY3_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY3_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY4:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY4_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY4_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY5:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY5_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY5_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY6:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY6_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY6_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY7:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY7_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY7_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY8:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY8_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY8_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY9:
+ {
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(IDI_KEY9_TXT, FONT_KEYPAD_TEXT, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(number, FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(IDI_KEY9_TXT, FONT_KEYPAD_TEXT, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case PAUSE_KEY:
+ {
+ DrawTextToCanvas(L"*", FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(L"P", FONT_KEYPAD_P, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(L"*", FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(L"P", FONT_KEYPAD_P, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case NUM_KEY0:
+ {
+ DrawTextToCanvas(L"0", FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+ DrawTextToCanvas(L"+", FONT_KEYPAD_PLUS, canvasNormal, POSITION_RIGHT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(L"0", FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ DrawTextToCanvas(L"+", FONT_KEYPAD_PLUS, canvasPressed, POSITION_RIGHT, BUTTON_STATUS_PRESSED);
+ }
+ break;
+
+ case HASH_KEY:
+ {
+ DrawTextToCanvas(L"#", FONT_KEYPAD_NUMBER, canvasNormal, POSITION_LEFT, BUTTON_STATUS_NORMAL);
+
+ r = SetPressedBgToCanvas(canvasPressed, IDB_KEYPAD_BUTTON_PRESS);
+ TryCatch(r == E_SUCCESS,,"DtmfKeyPadPanel::AddButtonsToKeypad() SetPressedBgToCanvas failed");
+ DrawTextToCanvas(L"#", FONT_KEYPAD_NUMBER, canvasPressed, POSITION_LEFT, BUTTON_STATUS_PRESSED);
+ }
+
+ break;
+ }
+ //Set the final Bitmap to Button
+ DialUtil::DrawCanvasToButton(&canvasNormal, &canvasPressed, pButton);
+ }
+
+ AppLogDebug("EXIT");
+ return E_SUCCESS;
+
+CATCH:
+ //RemoveAllControls();
+ return r;
+}
+
+result
+DtmfKeyPadPanel::SetPressedBgToCanvas(Canvas& canvas, const String& bgImg)
+{
+ //Construct a canvas
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(bgImg);
+ if (pBitmap == null)
+ {
+ return E_FAILURE;
+ }
+
+ if (pBitmap->IsNinePatchedBitmap())
+ {
+ canvas.DrawNinePatchedBitmap(canvas.GetBounds(), *pBitmap);
+ }
+ else
+ {
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pBitmap->Scale(Dimension(canvas.GetBounds().width, canvas.GetBounds().height));
+ canvas.DrawBitmap(Point(0,0), *pBitmap);
+ }
+ delete pBitmap;
+ return E_SUCCESS;
+}
+
+void
+DtmfKeyPadPanel::DrawImageToCanvas(const String& image, Dimension imageDimention, Canvas& canvas, int pos)
+{
+ //create and scale bitmap
+ AppResource* pAppResource = AppResource::GetInstance();
+ Bitmap* pBitmap = pAppResource->GetBitmapN(image);
+ pBitmap->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pBitmap->Scale(imageDimention);
+
+ //Find position to draw bitmap
+ Point bitmapPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ bitmapPos.SetPosition(INITIAL_X_OFFSET + (LEFT_X_OFFSET - pBitmap->GetWidth()) / 2, (canvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ bitmapPos.SetPosition(INITIAL_X_OFFSET + LEFT_X_OFFSET + ((RIGHT_X_OFFSET - pBitmap->GetWidth()) / 2), (canvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ bitmapPos.SetPosition((canvas.GetBounds().width - pBitmap->GetWidth()) / 2, (canvas.GetBounds().height - pBitmap->GetHeight()) / 2);
+ }
+ break;
+ }
+
+ //draw bitmap
+ canvas.DrawBitmap(Rectangle(bitmapPos, Dimension(pBitmap->GetWidth(), pBitmap->GetHeight())), *pBitmap);
+ delete pBitmap;
+ pBitmap = null;
+}
+
+void
+DtmfKeyPadPanel::DrawTextToCanvas(const String& buttonText, int textFontStyle, Canvas& canvas, int pos, int buttonStatus)
+{
+ if (buttonText == null)
+ {
+ return;
+ }
+
+ //get text font
+ Font* font = GetTextFontN(textFontStyle);
+
+ //get text color
+ Color* textColor = GetTextColorN(textFontStyle, buttonStatus);
+
+ //create text element
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(buttonText);
+ pTextElement->SetTextColor(*textColor);
+ pTextElement->SetFont(*font);
+
+ //get dimensions of the text
+ FloatDimension textDimension;
+ font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension);
+ textDimension.height = textDimension.height + font->GetDescender();
+ //create enriched text
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+
+ //set the position of the text in canvas
+ Point textPos(0, 0);
+ switch (pos)
+ {
+ case POSITION_LEFT:
+ {
+ textPos.SetPosition(INITIAL_TEXT_X_OFFSET + ((LEFT_TEXT_X_OFFSET - pEnrichedText->GetWidth()) / 2), (canvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_RIGHT:
+ {
+ textPos.SetPosition(INITIAL_TEXT_X_OFFSET + LEFT_TEXT_X_OFFSET + LEFT_TEXT_X_MARGIN + ((RIGHT_TEXT_X_OFFSET - pEnrichedText->GetWidth()) / 2), (canvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+
+ case POSITION_CENTER:
+ {
+ textPos.SetPosition((canvas.GetBounds().width - pEnrichedText->GetWidth()) / 2, (canvas.GetBounds().height - pEnrichedText->GetHeight()) / 2);
+ }
+ break;
+ }
+
+ //Draw EnrichedText to canvas
+ canvas.DrawText(textPos, *pEnrichedText);
+
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ delete textColor;
+ delete font;
+}
+
+Font*
+DtmfKeyPadPanel::GetTextFontN(int textFontStyle)
+{
+ Font* font = new (std::nothrow) Font();
+
+ switch (textFontStyle)
+ {
+ case FONT_KEYPAD_NUMBER:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 112);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 30);
+ }
+ break;
+
+ case FONT_KEYPAD_P:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 60);
+ }
+ break;
+
+ case FONT_KEYPAD_PLUS:
+ {
+ font->Construct(FONT_STYLE_PLAIN, 64);
+ }
+ break;
+ }
+ return font;
+}
+
+Color*
+DtmfKeyPadPanel::GetTextColorN(int textColor, int buttonStatus)
+{
+ Color* color = new (std::nothrow) Color();
+
+ if (buttonStatus == BUTTON_STATUS_PRESSED)
+ {
+ color->SetColorComponents(255, 255, 255);
+ return color;
+ }
+
+ switch (textColor)
+ {
+ case FONT_KEYPAD_NUMBER:
+ {
+ color->SetColorComponents(242, 242, 242);
+ }
+ break;
+
+ case FONT_KEYPAD_TEXT:
+ {
+ color->SetColorComponents(197, 197, 197);
+ }
+ break;
+
+ case FONT_KEYPAD_P:
+ case FONT_KEYPAD_PLUS:
+ {
+ color->SetColorComponents(218, 218, 218);
+ }
+ break;
+ }
+ return color;
+}
+
+result
+DtmfKeyPadPanel::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+ //RemoveAllControls();
+ return r;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallEndCallForm.cpp
+ * @brief End Call form implementation
+ */
+#include <FApp.h>
+#include <FUi.h>
+#include <FMedia.h>
+#include <FShell.h>
+#include "CallApp.h"
+#include "CallAppUtility.h"
+#include "CallEndCallForm.h"
+#include "CallButtonsPanel.h"
+#include "CallPresentationModel.h"
+#include "CallSceneRegister.h"
+#include "CallTypes.h"
+#include "CallAppControlRequestMgr.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Shell;
+
+
+//constants
+const int IDI_APP_END_TIMER = 3000;
+const int W_PHOTO_LABEL = 720;
+const int H_PHOTO_LABEL = 720;
+const int X_PHOTO_LBL = 166;
+const int Y_PHOTO_LBL = 232;
+const int W_PHOTO_LBL = 388;
+const int H_PHOTO_LBL = 388;
+const int END_CALL_TIMER_VAL = 2000;
+const int END_CALL_WAIT_TIMER_VAL = 500;
+static const wchar_t* IDL_END_CALL_FORM = L"IDL_END_CALL_FORM";
+static const wchar_t* IDC_NUMBER1_LABEL = L"IDC_NUMBER1_LABEL";
+static const wchar_t* IDC_CALLER1_LABEL = L"IDC_CALLER1_LABEL";
+static const wchar_t* IDC_KEY_BG_LABEL = L"IDC_KEY_BG_LABEL";
+static const wchar_t* IDC_CALLER1_BIGPHOTO_LABEL = L"IDC_CALLER1_BIGPHOTO_LABEL";
+static const wchar_t* IDB_END_CALL_DEFAULT_ICON = L"C01-1_call_default_caller ID_720x720.png";
+static const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
+static const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
+static const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
+static const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
+
+
+
+EndCallForm::EndCallForm(void)
+: BaseForm(FORMTYPE_ENDCALL)
+{
+ __pCallButtonsPanel = null;
+ __pContactNumber = null;
+ __pEndCallEventTimer = null;
+ __pSmallPhotoLabel = null;
+ __isMsgAppControlLaunched = false;
+ __isContactAppControlLaunched = false;
+ __pAddressBook = null;
+}
+
+EndCallForm::~EndCallForm(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+ if (__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Cancel();
+ delete __pEndCallEventTimer;
+ __pEndCallEventTimer = null;
+ }
+ if (__pSmallPhotoLabel != null)
+ {
+ __pSmallPhotoLabel = null;
+ }
+ if (__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ __pAddressBook = null;
+ }
+}
+
+void
+EndCallForm::Initialize(void)
+{
+ Construct(IDL_END_CALL_FORM);
+}
+
+result
+EndCallForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ //initialize keypad and buttons
+ InitializeCallButtonsPanel();
+
+ __pEndCallEventTimer = new (std::nothrow) Tizen::Base::Runtime::Timer();
+ r = __pEndCallEventTimer->Construct(*this);
+
+ __pCallPresentor = CallPresentationModel::GetInstance();
+ return r;
+}
+
+void
+EndCallForm::InitializeCallButtonsPanel(void)
+{
+ Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
+ Bitmap* pBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_BACKGROUND_BITMAP, pKeysBgLbl->GetWidth(), pKeysBgLbl->GetHeight());
+ if (pBgBitmap != null)
+ {
+ pKeysBgLbl->SetBackgroundBitmap(*pBgBitmap);
+ }
+ if (__pCallButtonsPanel == null)
+ {
+ __pCallButtonsPanel = new (std::nothrow) CallButtonsPanel();
+ __pCallButtonsPanel->ConstructPanel(this, FORMTYPE_ENDCALL);
+ __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
+ AddControl(__pCallButtonsPanel);
+ }
+
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ }
+}
+
+void
+EndCallForm::AddKeyPadActionListener(const String& keyName, CommandIds cmdId)
+{
+ Button* pButton = static_cast<Button*>(GetControl(keyName));
+ if (pButton != null)
+ {
+ pButton->SetActionId(cmdId);
+ pButton->AddActionEventListener(*this);
+ }
+}
+
+result
+EndCallForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pCallPresentor)
+ {
+ //Abort any AppControl Request running already to show incoming call screen
+ if (__pCallPresentor->IsAppControlRunning() == true)
+ {
+ __pCallPresentor->AbortAppControlRequest();
+ }
+ __pCallPresentor = null;
+ }
+ return r;
+}
+
+void
+EndCallForm::OnActionPerformed(const Control& source, int actionId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ switch (actionId)
+ {
+ case IDA_VOICE_CALL:
+ {
+ if(CallAppControlRequestMgr::GetInstance()->IsAppControlRunning() == true)
+ {
+ return;
+ }
+ if (__isMsgAppControlLaunched == true)
+ {
+ //AppControl already launched.
+ return;
+ }
+ //check if EndCallTimer is running, then cancel it
+ if(__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Cancel();
+ }
+ //make an outgoing call with given number
+ String* contactTxt = new (std::nothrow) String(*__pContactNumber);
+ //switch to dialing outgoing call form
+ ArrayList* pContact = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pContact->Construct();
+ pContact->Add(contactTxt);
+
+ //Check if dialing a call is possible
+ bool isSimInitialized = __pCallPresentor->CheckSimInitializationIsCompleted();
+ if (isSimInitialized)
+ {
+ //Disable all buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ //Check if dialing an emergency call
+ bool isEmergencyCall = __pCallPresentor->IsEmergencyNumber(*contactTxt, true);
+ if (isEmergencyCall)
+ {
+ pSceneManager->GoForward( ForwardSceneTransition( IDSCN_SCENE_OUT_EMERGENCYCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pContact);
+ }
+ else
+ {
+ pSceneManager->GoForward( ForwardSceneTransition(IDSCN_SCENE_OUTCALL,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_DESTROY), pContact);
+ }
+ }
+ else
+ {
+ //Show error message Popup
+ HandleTelephonyError(ERROR_CODE_SIM_INITIALIZATION_FAILED);
+ }
+ }
+ break;
+
+ case IDA_VIDEO_CALL:
+ //Make Video Call
+ break;
+
+ case IDA_MESSAGE:
+ {
+ if (__isMsgAppControlLaunched == true)
+ {
+ //AppControl already launched.
+ return;
+ }
+ //launch message AppControl
+ __isMsgAppControlLaunched = __pCallPresentor->LaunchComposeMessageAppControl(*__pContactNumber, this);
+ if (__isMsgAppControlLaunched == true && __pEndCallEventTimer != null)
+ {
+ //cancel EndCallTimer, if AppControl request was successful.
+ __pEndCallEventTimer->Cancel();
+ //Disable the call buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ }
+ }
+ break;
+
+ case IDA_ADD_TO_CONTACTS:
+ {
+ if(__isContactAppControlLaunched == true)
+ {
+ //AppControl already launched.
+ AppLogDebug("__isContactAppControlLaunched == true");
+ return;
+ }
+ HandleAddToContacts();
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+EndCallForm::HandleAddToContacts(void)
+{
+ AppLogDebug("Enter");
+
+ Contact* pContact = __pCallPresentor->GetContactN(*__pContactNumber);
+ //Launch Contact AppControl
+ String requestParameter;
+ if (pContact != null)
+ {
+ //View Contact
+ requestParameter.Append(pContact->GetRecordId());
+ __isContactAppControlLaunched = __pCallPresentor->LaunchViewContactAppControl(requestParameter, this);
+ delete pContact;
+ pContact = null;
+ }
+ else
+ {
+ //Add To Contact
+ requestParameter.Append(*__pContactNumber);
+ __isContactAppControlLaunched = __pCallPresentor->LaunchAddContactAppControl(requestParameter, this);
+ }
+
+ if (__isContactAppControlLaunched == true && __pEndCallEventTimer != null)
+ {
+ //cancel EndCallTimer, if AppControl request was success.
+ __pEndCallEventTimer->Cancel();
+ }
+}
+
+void
+EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ //set itself as listener
+ __pCallPresentor->SetTelEventListener(this);
+ //listen to Foreground events
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+ __isMsgAppControlLaunched = false;
+ __isContactAppControlLaunched = false;
+
+ if(PowerManager::IsScreenOn() == false)
+ {
+ result res = E_FAILURE;
+ AppLogDebug("TurnScreenOn");
+ res = PowerManager::TurnScreenOn();
+ AppLogDebug("TurnScreenOn %d",res);
+ }
+
+ if(LockManager::GetInstance()->IsLocked())
+ {
+ AppLogDebug("Phone Locked");
+ LockManager::GetInstance()->Unlock();
+ }
+
+ switch (__formType)
+ {
+ case FORMTYPE_ENDCALL:
+ {
+ //fetch ended call details
+ AppCallInfo* pEndCall = static_cast<AppCallInfo*>(pArgs->GetAt(0));
+
+ //contact number
+ __pContactNumber = new (std::nothrow) String();
+ if(pEndCall->IsConferenceCall() == false)
+ {
+ if(pEndCall->GetContactNumber().IsEmpty() == false)
+ {
+ __pContactNumber->Append(pEndCall->GetContactNumber());
+ }
+ else
+ {
+ __pContactNumber->Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+ }
+ else
+ {
+ String count;
+ count.Append(pEndCall->GetCallerListCount());
+ count.Append(" ");
+ count.Append(AppUtility::GetResourceString(IDS_PEOPLE_STR));
+ __pContactNumber->Append(count);
+ }
+
+ //Fetch & show contact person details
+ ShowPersonDetails(*__pContactNumber, IDC_CALLER1_LABEL, IDC_CALLER1_BIGPHOTO_LABEL,pEndCall);
+ //If call is hidden means contact number is empty,
+ //or if call is from known number(i.e present in contacts db), Then do NOT show "Add to Contact" button.
+ if (pEndCall->GetContactNumber().IsEmpty() == false)
+ {
+ //Check if contact is deleted in mean time.
+ Contact* pContact = __pCallPresentor->GetContactN(pEndCall->GetContactNumber());
+ //before setting check if the contact is deleted
+ if(pContact != null)
+ {
+ ShowViewContactButton();
+ delete pContact;
+ pContact = null;
+ }
+ else
+ {
+ ShowAddContactButton();
+ }
+ }
+ else
+ {
+ //Show AddToContact
+ ShowAddContactButton();
+ }
+
+ //Check if call is Emergency call or Hidden call,
+ //then disable all button in Call button panel.
+ if(pEndCall->IsConferenceCall() == false)
+ {
+ if (pEndCall->IsEmergency() == true || pEndCall->GetContactNumber().IsEmpty() == true)
+ {
+ __pCallButtonsPanel->SetEndCallPanelState(false);
+ }
+ else
+ {
+ __pCallButtonsPanel->SetEndCallPanelState(true);
+ }
+ }
+ else
+ {
+ __pCallButtonsPanel->SetEndCallPanelState(false);
+ }
+
+ //check if we reached the end call form of an outgoing call then don't show add to contacts
+ if(pEndCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_OUTGOING)
+ {
+ __pCallButtonsPanel->ShowOrHideAddtoContactsButton(false);
+ }
+ else if(pEndCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_INCOMING)
+ {
+ if(pEndCall->GetContactNumber().IsEmpty() == false)
+ {
+ __pCallButtonsPanel->ShowOrHideAddtoContactsButton(true);
+ }
+ }
+
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ //Before starting end call timer check if messaging appcontrol was launched during incoming call
+ if (__pEndCallEventTimer && __pCallPresentor->IsAppControlRunning() == false)
+ {
+ __pEndCallEventTimer->Start(IDI_APP_END_TIMER);
+ }
+
+ if (pArgs)
+ {
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(false);
+ AddOrientationEventListener(*this);
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ //Add address book listener to listen to contacts changed events
+ if(__pAddressBook != null)
+ {
+ __pAddressBook->SetAddressbookChangeEventListener(this);
+ }
+}
+
+void
+EndCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ if (__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Cancel();
+ }
+ if (__pContactNumber)
+ {
+ delete __pContactNumber;
+ __pContactNumber = null;
+ }
+ if (__pSmallPhotoLabel != null)
+ {
+ __pSmallPhotoLabel->SetShowState(false);
+ }
+ //remove contact change event listener
+ if(__pAddressBook != null)
+ {
+ __pAddressBook->SetAddressbookChangeEventListener(null);
+ }
+ //remove itself as listener
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pPhoneApp->RemoveAppStateChangeListener(*this);
+ RemoveOrientationEventListener(*this);
+}
+
+result
+EndCallForm::OnDraw(void)
+{
+ return E_SUCCESS;
+}
+
+void
+EndCallForm::ShowViewContactButton(void)
+{
+ __pCallButtonsPanel->ShowViewContactButton();
+}
+
+void
+EndCallForm::ShowAddContactButton(void)
+{
+ __pCallButtonsPanel->ShowAddContactButton();
+}
+
+void
+EndCallForm::ShowPhoneNumber(const String& phoneNumber, const String& lblName)
+{
+ String formattedNumber = phoneNumber;
+ Label* pContactLbl = static_cast<Label*>(GetControl(lblName));
+ pContactLbl->SetText(formattedNumber);
+}
+
+void
+EndCallForm::ShowPersonDetails(const String& phoneNumber, const String& nameLblName, const String& photoLblName, AppCallInfo* pCallInfo)
+{
+ //show phone number
+ ShowPhoneNumber(phoneNumber, IDC_NUMBER1_LABEL);
+
+ Label* pNameLbl = static_cast<Label*>(GetControl(nameLblName));
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLblName));
+
+ String* pDisplayName;
+ if(pCallInfo->IsConferenceCall() == false)
+ {
+ //fetch contact details based on phone number
+ pDisplayName = pCallInfo->FetchLatestCallerNameN(phoneNumber);
+ }
+ else
+ {
+ pDisplayName = new (std::nothrow) String(AppUtility::GetResourceString(IDS_CONFERENCE_CALL_STRING));
+ }
+ Bitmap* pPhotoBitmap = null;
+ if(pCallInfo->IsConferenceCall() == false)
+ {
+ pPhotoBitmap = pCallInfo->FetchLatestCallerPhotoN(phoneNumber);
+ }
+
+ //passing an empty string to SetText fails in label,
+ //if previously valid text has been set
+ if (pDisplayName != null && pDisplayName->IsEmpty() == true && pNameLbl->GetText().IsEmpty() == false)
+ {
+ pDisplayName->Append(L" ");
+ }
+
+ // show display name on name Label
+ if (pDisplayName != null)
+ {
+ pNameLbl->SetText(*pDisplayName);
+ }
+
+ // If record not found or no photo id present for user,
+ //fetch default bitmap.
+ if (pPhotoBitmap != null)
+ {
+ if(pPhotoBitmap->GetHeight() <= H_SMALL_PHOTO
+ && pPhotoBitmap->GetWidth() <= W_SMALL_PHOTO)
+ {
+ ShowThumbnailImage(pPhotoBitmap,photoLblName);
+ }
+ else
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,*pPhotoBitmap);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ }
+ }
+ else
+ {
+ //Set Default Photo
+ Bitmap* pDefaultPhoto = null;
+ if(pCallInfo->IsConferenceCall() == false)
+ {
+ pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_END_CALL_DEFAULT_ICON,W_PHOTO_LABEL,H_PHOTO_LABEL);
+ }
+ else
+ {
+ pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_CONFERENCE_BG_ICON,W_CONFERENCE_PHOTO,H_CONFERENCE_PHOTO);
+ }
+ if (pDefaultPhoto != null)
+ {
+ pPhotoLbl->SetBackgroundBitmap(*pDefaultPhoto);
+ pPhotoLbl->Invalidate(true);
+ delete pDefaultPhoto;
+ }
+ }
+ RequestRedraw(true);
+ //free resources
+ if (pDisplayName)
+ {
+ delete pDisplayName;
+ pDisplayName = null;
+ }
+ if (pPhotoBitmap)
+ {
+ delete pPhotoBitmap;
+ pPhotoBitmap = null;
+ }
+}
+
+void
+EndCallForm::ShowThumbnailImage(const Bitmap* pPhotoId,const String& photoLabel)
+{
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLabel));
+
+ if (pPhotoLbl != null && pPhotoId != null)
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Bitmap* pBackground = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_BACKGROUND,W_CALL_THUMBNAIL,H_CALL_THUMBNAIL);
+ Bitmap* pShadow = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_SHADOW,W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW);
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the back ground
+ pCanvas->DrawBitmap(canvasRect,*pBackground);
+ //draw shadow (to be enabled after correct shadow image is provided )
+ //pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_CALL_THUMBNAIL_SHADOW/2),
+ // (pPhotoLbl->GetBounds().height/2)-(H_CALL_THUMBNAIL_SHADOW/2),W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW),*pShadow);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_SMALL_PHOTO/2),
+ (pPhotoLbl->GetBounds().height/2)-(H_SMALL_PHOTO/2),W_SMALL_PHOTO,H_SMALL_PHOTO),*pPhotoId);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ delete pBackground;
+ delete pShadow;
+ }
+}
+
+void
+EndCallForm::ShowCallersPhotoThumbnail(const Bitmap& pPhotoId)
+{
+ if (__pSmallPhotoLabel != null)
+ {
+ RemoveControl(__pSmallPhotoLabel);
+ __pSmallPhotoLabel = null;
+ }
+ //Draw Small Photo and show on small photo label
+ __pSmallPhotoLabel = new (std::nothrow) Label();//static_cast<Label*>(GetControl(IDC_SMALL_PHOTO_LABEL));
+ __pSmallPhotoLabel->Construct(Rectangle(X_PHOTO_LBL, Y_PHOTO_LBL, W_PHOTO_LBL, H_PHOTO_LBL), L"");
+ __pSmallPhotoLabel->SetBackgroundColor(Color(0,0,0));
+ __pSmallPhotoLabel->SetBackgroundBitmap(pPhotoId);
+ // Add a Label to the Form
+ AddControl(__pSmallPhotoLabel);
+ __pSmallPhotoLabel->Invalidate(true);
+}
+
+void
+EndCallForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ //goto initial scene or close application, since this was last active call.
+ HandleLastCallCompletion();
+}
+
+void
+EndCallForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ AppLogDebug("Enter");
+ if (__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl request completed.
+ __isMsgAppControlLaunched = false;
+ __pCallPresentor->AppControlRequestCompleted();
+ }
+ if(__isContactAppControlLaunched == true)
+ {
+ //notify app control completed
+ __isContactAppControlLaunched = false;
+ __pCallPresentor->AppControlRequestCompleted();
+ }
+ //AppControl completed, goto initial scene if present
+ //else exit.
+ HandleLastCallCompletion();
+}
+
+void
+EndCallForm::HandleLastCallCompletion(void)
+{
+ //Check if message sending is in progress if yes
+ //wait for it to complete by restarting the timer
+ AppLogDebug("Enter");
+ if(__pCallPresentor->IsMessageSendingInProgress() == true)
+ {
+ __pEndCallEventTimer->Start(END_CALL_WAIT_TIMER_VAL);
+ }
+ else
+ {
+ CallApp* pPhoneApp = (static_cast<CallApp*>(UiApp::GetInstance()));
+ pPhoneApp->Terminate();
+ }
+}
+
+void
+EndCallForm::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ //If Contact app control was launched
+ //as we do not know if it success or failed.
+ if(__isContactAppControlLaunched == true)
+ {
+ if(__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Start(END_CALL_TIMER_VAL);
+ }
+ UpdatePersonDetail();
+ //notify app control completed
+ __isContactAppControlLaunched = false;
+ __pCallPresentor->AppControlRequestCompleted();
+ }
+ else if (__isMsgAppControlLaunched == true)
+ {
+ //Message AppControl request completed.
+ if(__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Start(2000);
+ }
+ __isMsgAppControlLaunched = false;
+ __pCallPresentor->AppControlRequestCompleted();
+ }
+ else if(__pCallPresentor->IsAppControlRunning() == true)
+ {
+ if(__pEndCallEventTimer != null)
+ {
+ __pEndCallEventTimer->Start(2000);
+ }
+ __pCallPresentor->AppControlRequestCompleted();
+ }
+ //Enable all buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ AppLogDebug("Exit");
+}
+
+void
+EndCallForm::OnBackground(void)
+{
+ AppLogDebug("Enter");
+}
+
+void
+EndCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
+{
+ AppLogDebug("Enter");
+ if (__pCallButtonsPanel != null)
+ {
+ //update position of call buttons panel
+ Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
+ __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
+ //bring button on top
+ __pCallButtonsPanel->SetButtonPosition();
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if (pRelativeLayout != null)
+ {
+ //pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
+ }
+ pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ }
+ }
+}
+
+void
+EndCallForm::OnContactsChanged(const IList& contactChangeInfoList)
+{
+ UpdatePersonDetail();
+}
+
+void
+EndCallForm::UpdatePersonDetail()
+{
+ AppLog("Enter");
+ if (__pContactNumber != null && __pContactNumber->IsEmpty() == false)
+ {
+ AppCallInfo* ActiveCallInfo = new (std::nothrow) AppCallInfo();
+ ActiveCallInfo->SetContactNumber(*__pContactNumber);
+ Contact* pContact = __pCallPresentor->GetContactN(*__pContactNumber);
+ if (pContact != null)
+ {
+ ActiveCallInfo->SetContactInfo(*pContact);
+ }
+ //before setting check if the contact is deleted
+ if(pContact != null)
+ {
+ ShowViewContactButton();
+ delete pContact;
+ pContact = null;
+ }
+ else
+ {
+ ShowAddContactButton();
+ }
+ ShowPersonDetails(*__pContactNumber, IDC_CALLER1_LABEL, IDC_CALLER1_BIGPHOTO_LABEL,ActiveCallInfo);
+ delete ActiveCallInfo;
+ }
+ AppLog("Exit");
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallErrorMsgPopup.cpp
+ * @brief Error message pop class
+ */
+#include <FGraphics.h>
+#include "CallAppUtility.h"
+#include "CallErrorMsgPopup.h"
+#include "CallTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Base::Runtime;
+
+const int IDI_VERTICAL_LINE_SPACING = 20;
+const int W_ERROR_MSG_POPUP = 720;
+const int IDI_VERTICAL_MARGIN = 39;
+static const wchar_t* IDL_ERROR_MSG_POPUP = L"IDL_ERROR_MSG_POPUP";
+static const wchar_t* IDC_MSG_TEXTBOX = L"IDC_MSG_TEXTBOX";
+static const wchar_t* IDS_DIAL_ERROR_MSG = L"IDS_DIAL_ERROR_MSG";
+static const wchar_t* IDS_JOIN_FAILED_ERROR_MSG = L"IDS_JOIN_FAILED_ERROR_MSG";
+static const wchar_t* IDS_REJECT_FAILED_ERROR_MSG = L"IDS_REJECT_FAILED_ERROR_MSG";
+static const wchar_t* IDS_CALL_SWAP_ERROR_MSG = L"IDS_CALL_SWAP_ERROR_MSG";
+static const wchar_t* IDS_END_PARTICIPANT_ERROR_MSG = L"IDS_END_PARTICIPANT_ERROR_MSG";
+static const wchar_t* IDS_SPLIT_PARTICIPANT_ERROR_MSG = L"IDS_SPLIT_PARTICIPANT_ERROR_MSG";
+static const wchar_t* IDS_SIM_INIT_ERROR_MSG = L"IDS_SIM_INIT_ERROR_MSG";
+static const wchar_t* IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG = L"IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG";
+static const wchar_t* IDS_INVALID_ARGS_ERROR_MSG = L"IDS_INVALID_ARGS_ERROR_MSG";
+static const wchar_t* IDS_TAPI_INIT_ERROR_MSG = L"IDS_TAPI_INIT_ERROR_MSG";
+static const wchar_t* IDS_GENERAL_TAPI_ERROR_MSG = L"IDS_GENERAL_TAPI_ERROR_MSG";
+static const wchar_t* IDS_LONG_BARRING_PWD_ERROR_MSG = L"IDS_LONG_BARRING_PWD_ERROR_MSG";
+static const wchar_t* IDS_INVALID_NUMBER_ERROR_MSG = L"IDS_INVALID_NUMBER_ERROR_MSG";
+static const wchar_t* IDS_GENERAL_ERROR_MSG = L"IDS_GENERAL_ERROR_MSG";
+
+ErrorMsgPopup::ErrorMsgPopup(IPopupClosedEventListener* pEventListener)
+: __pEventListener(pEventListener)
+{
+ __pTimer = null;
+}
+
+ErrorMsgPopup::~ErrorMsgPopup(void)
+{
+ if (__pTimer)
+ {
+ __pTimer->Cancel();
+ delete __pTimer;
+ __pTimer = null;
+ }
+}
+
+void
+ErrorMsgPopup::ConstructPopup(int errorCode)
+{
+ Construct(IDL_ERROR_MSG_POPUP);
+ //Fetch error message
+ String msg = FetchErrorMessage(errorCode);
+
+ //Set text to Message box
+ TextBox* pMsgTxtBox = static_cast<TextBox*>(GetControl(IDC_MSG_TEXTBOX));
+ pMsgTxtBox->SetLineSpacing(1,1);
+ pMsgTxtBox->SetText(msg);
+ pMsgTxtBox->SetEnabled(false);
+ pMsgTxtBox->SetTextAlignment(ALIGNMENT_CENTER);
+
+ Rectangle msgTxtBoxRect = pMsgTxtBox->GetBounds();
+ //get no. of lines to show message
+ int noOfLines = pMsgTxtBox->GetLineCount();
+ pMsgTxtBox->SetSize(msgTxtBoxRect.width,((noOfLines * msgTxtBoxRect.height) + IDI_VERTICAL_LINE_SPACING));
+
+ Dimension popUpDimen = pMsgTxtBox->GetSize();
+ popUpDimen.width = W_ERROR_MSG_POPUP;
+ popUpDimen.height += (2 * IDI_VERTICAL_MARGIN);
+ SetSize(popUpDimen);
+
+ SetControlAlwaysOnTop(*pMsgTxtBox,true);
+ RelativeLayout* relPopUpLayout = static_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if(relPopUpLayout != null)
+ {
+ // Set Relations between msgtextbox and Popup
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_HORIZONTAL);
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_VERTICAL);
+ }
+ relPopUpLayout = static_cast<RelativeLayout*>(GetPortraitLayoutN());
+ if(relPopUpLayout != null)
+ {
+ // Set Relations between msgtextbox and Popup
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_HORIZONTAL);
+ relPopUpLayout->SetCenterAligned(*pMsgTxtBox, CENTER_ALIGN_VERTICAL);
+ }
+ //construct timer
+ __pTimer = new (std::nothrow) Timer();
+ __pTimer->Construct(*this);
+}
+
+void
+ErrorMsgPopup::ShowErrorMsgPopupN(int errorCode)
+{
+ //Construct the message popup
+ ConstructPopup(errorCode);
+ //Show popup message
+ ShowPopup();
+}
+
+void
+ErrorMsgPopup::ShowPopup(void)
+{
+ __popupModalResult = 0;
+ //start timer to show popup
+ __pTimer->Start(2000);
+ SetShowState(true);
+ Show();
+}
+
+void
+ErrorMsgPopup::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
+{
+ //Call default implementation of "Object.Equals()"
+ //returns true, if they are pointing to same address.
+ if (__pTimer->Equals(timer))
+ {
+ SetShowState(false);
+ //notify the listener
+ __pEventListener->HandlePopupClosed();
+ }
+}
+
+String
+ErrorMsgPopup::FetchErrorMessage(int errorCode)
+{
+ String msg(L"");
+ switch (errorCode)
+ {
+ case ERROR_NONE:
+ break;
+
+ case ERROR_DIAL_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_DIAL_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_JOIN_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_JOIN_FAILED_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_REJECT_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_REJECT_FAILED_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_SWAP_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_CALL_SWAP_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_END_FROM_CONFERENCE_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_END_PARTICIPANT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_SPLIT_FROM_CONFERENCE_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SPLIT_PARTICIPANT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_CODE_SIM_INITIALIZATION_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SIM_INIT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_NOT_EMERGENCY_NUM:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_EMERGENCY_CALLS_ONLY_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_INVALID_INPUT:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_INVALID_ARGS_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_TAPI_INIT_FAILED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_TAPI_INIT_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_TAPI_ERROR:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_GENERAL_TAPI_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_BARRING_PWD_TOO_LONG:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_LONG_BARRING_PWD_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_INVALID_NUMBER:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_INVALID_NUMBER_ERROR_MSG));
+ }
+ break;
+
+ case ERROR_FLIGHT_MODE_SET:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_FLIGHT_MODE_ON));
+ }
+ break;
+
+ case ERROR_USSD_NUMBER:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_USSD_NUMBER));
+ }
+ break;
+
+ case ERROR_SERVICE_UNAVAILABLE:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SERVICE_UNAVAILABLE));
+ }
+ break;
+
+ case ERROR_CALL_BARRED:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_SERVICE_UNAVAILABLE));
+ }
+ break;
+
+ case ERROR_GENERAL:
+ default:
+ {
+ msg.Append(AppUtility::GetResourceString(IDS_GENERAL_ERROR_MSG));
+ }
+ break;
+ }
+
+ return msg;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file FormFactory.cpp
+ * @brief Form factory class
+ */
+#include "CallPhoneFormFactory.h"
+#include "CallSceneRegister.h"
+//Call forms
+#include "CallIncomingCallForm.h"
+#include "CallActiveCallForm.h"
+#include "CallConfCallerListForm.h"
+#include "CallEndCallForm.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+
+FormFactory::FormFactory(void)
+{
+}
+
+FormFactory::~FormFactory(void)
+{
+}
+
+Form*
+FormFactory::CreateFormN(const String& formId, const SceneId& sceneId)
+{
+ Form* pNewForm = null;
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+ pNewForm = CreateVoiceCallForm(formId, sceneId);
+ return pNewForm;
+}
+
+Form*
+FormFactory::CreateVoiceCallForm(const String& formId, const SceneId& sceneId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ BaseForm* pNewForm = null;
+
+ if (formId == IDL_FORM_OUTCALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_OUTGOINGCALL);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_OUT_EMERGENCYCALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_EMERGENCYOUTGOINGCALL);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_ACTIVECALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_ACTIVECALL);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_ACTIVE_EMERGENCYCALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_EMERGENCYACTIVECALL);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_INCOMINGCALL)
+ {
+ IncomingCallForm* pForm = new (std::nothrow) IncomingCallForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_ENDCALL)
+ {
+ EndCallForm* pForm = new (std::nothrow) EndCallForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CONFCALLLIST)
+ {
+ ConfCallerListForm* pForm = new (std::nothrow) ConfCallerListForm();
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_MULTIPLEACTIVECALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_MULTIPLECALLS);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+ else if (formId == IDL_FORM_CONFCALL)
+ {
+ ActiveCallForm* pForm = new (std::nothrow) ActiveCallForm(FORMTYPE_ACTIVECONFCALL);
+ pForm->Initialize();
+ pSceneManager->AddSceneEventListener(sceneId, *pForm);
+ pNewForm = pForm;
+ }
+
+ return pNewForm;
+}
+
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallIncomingCallForm.cpp
+ * @brief Incoming Call form implementation
+ */
+#include <FBaseColIList.h>
+#include "CallIncomingCallForm.h"
+#include "CallAppUtility.h"
+#include "CallSettingsManager.h"
+#include "CallPresentationModel.h"
+#include "CallSceneRegister.h"
+#include "CallTypes.h"
+#include "CallApp.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+//Constants
+const int W_DIAL_BITMAP = 100;
+const int H_DIAL_BITMAP = 100;
+const int W_CREATE_BITMAP = 56;
+const int H_CREATE_BITMAP = 56;
+const int X_CREATE_BITMAP = 8;
+const int Y_CREATE_BITMAP = 8;
+const int W_MESSAGE_BG_BITMAP = 720;
+const int H_MESSAGE_BG_BITMAP = 110;
+const int W_ARROW_BITMAP = 28;
+const int H_ARROW_BITMAP = 36;
+const int W_MESSAGE_BITMAP = 50;
+const int H_MESSAGE_BITMAP = 50;
+const int X_MESSAGE_BITMAP = 185;
+const int Y_MESSAGE_BITMAP = 50;
+const int MESSAGE_TEXT_X_MARGIN = 20;
+const int MESSAGE_TEXT_Y_MARGIN = 10;
+const int SEND_TEXT_X_MARGIN = 78;
+const int SEND_TEXT_Y_MARGIN = 20;
+const int SEND_BUTTON_ROUND_DIMENSION = 5;
+const int W_DIAL_LABEL = 188;
+const int H_DIAL_LABEL = 188;
+const int DIAL_ICON_X_OFFSET = 44;
+const int DIAL_ICON_Y_OFFSET = 44;
+const int REJECT_LABEL_X_OFFSET = 492;
+const int X_CALL_PANEL = 20;
+const int Y_CALL_PANEL = 110;
+const int H_CALL_PANEL = 188;
+const int Y_ARROW_LABEL = 79;
+const int W_ARROW_LABEL = 20;
+const int H_ARROW_LABEL = 32;
+const int VALID_TOUCH_X_OFFSET = 158;
+const int VALID_TOUCH_Y_OFFSET = 158;
+const int X_ARROW_LABEL_STARTPOS = 206; // 188 circle wodth , 18 GUI spec
+const int X_ARROW_REJECT_LABEL_STARTPOS = 454; // 700 width of panel - 20 offset - 188 circle width - 18 GUI spec - 20 width of image
+const int ARROW_LABEL_X_MARGIN = 48; //20 width of arrow and 28 GUI spec
+const int ACCEPT_LABEL_RELATIVE_POS = -384; //relative pos of accept labels right to reject labels left
+const int MAX_LIST_HEIGHT = 448;//678;
+const int H_REJECT_VIEW_FOOTER = 98;
+const int X_LIST_TEXT_ITEM = 16;
+const int W_LIST_TEXT_ITEM = 452;
+const int H_LIST_TEXT_ITEM = 111;
+const int X_SEND_TEXT_ITEM = 484;
+const int Y_SEND_TEXT_ITEM = 20;
+const int W_SEND_TEXT_ITEM = 220;
+const int W_SEND_BUTTON_MARGIN = 14;
+const int H_SEND_TEXT_ITEM = 72;
+const int X_PHOTO_LBL = 166;
+const int Y_PHOTO_LBL = 232;
+const int W_PHOTO_LBL = 388;
+const int H_PHOTO_LBL = 388;
+const int W_PHOTO_LABEL = 720;
+const int H_PHOTO_LABEL = 720;
+const int COUNT_ARROW_ELEMENTS = 3;
+
+const unsigned int COLOR_SEND_BUTTON_PRESSED = Color32<130, 142, 150>::Value;
+const unsigned int COLOR_SEND_BUTTON_NORMAL = Color32<64, 156, 211>::Value;
+const unsigned int COLOR_SWIPE_PANEL = Color32<0, 0, 0, 255>::Value;
+const unsigned int COLOR_LIST_TEXT_NORMAL = Color32<0, 0, 0>::Value;
+const unsigned int COLOR_LIST_TEXT_PRESSED = Color32<249, 249, 249>::Value;
+
+const int FONT_SIZE_MSG_TXT = 44;
+
+static const wchar_t* IDL_INCOMING_CALL_FORM = L"IDL_INCOMING_CALL_FORM";
+static const wchar_t* IDB_REJECT_MESSAGE_BG = L"C01-1_Reject_message_bg.png";
+static const wchar_t* IDB_REJECT_MESSAGE_UP_ARROW = L"C01-1_Reject_message_arrow_01.png";
+static const wchar_t* IDB_REJECT_MESSAGE_DOWN_ARROW = L"C01-1_Reject_message_arrow_02.png";
+static const wchar_t* IDB_REJECT_MESSAGE_ICON = L"C01-1_icon_Reject_with_Message.png";
+static const wchar_t* IDB_ACCEPT_CIRCLE_ICON = L"C01-1_accept_left.png";
+static const wchar_t* IDB_REJECT_CIRCLE_ICON = L"C01-1_reject_right.png";
+static const wchar_t* IDB_CALL_ACCEPT_ICON = L"C01-1_accept_left_dial_answer.png";
+static const wchar_t* IDB_CALL_REJECT_ICON = L"C01-1_reject_right_dial_decline.png";
+static const wchar_t* IDB_ACCEPT_ARROW_ICON = L"C01-1_arrow_g.png";
+static const wchar_t* IDB_REJECT_ARROW_ICON = L"C01-1_arrow_r.png";
+static const wchar_t* IDB_CALL_BG = L"C01-1_calling_BG_01.png";
+static const wchar_t* IDC_REJECT_MESSAGE_BUTTON = L"IDC_REJECT_MESSAGE_BUTTON";
+static const wchar_t* IDC_REJECT_PANEL = L"IDC_REJECT_PANEL";
+static const wchar_t* IDC_REJECT_MESSAGE_CANCEL_BUTTON = L"IDC_REJECT_MESSAGE_CANCEL_BUTTON";
+static const wchar_t* IDC_MSG_TABLEVIEW = L"IDC_MSG_TABLEVIEW";
+static const wchar_t* IDC_CALLER_LABEL = L"IDC_CALLER_LABEL";
+static const wchar_t* IDC_NUMBER_LABEL = L"IDC_NUMBER_LABEL";
+static const wchar_t* IDC_BIG_PHOTO_LABEL = L"IDC_BIG_PHOTO_LABEL";
+static const wchar_t* IDC_CALLHANDEL_PANEL = L"IDC_CALLHANDEL_PANEL";
+static const wchar_t* IDC_ACCEPT_LABEL = L"IDC_ACCEPT_LABEL";
+static const wchar_t* IDC_REJECT_LEBEL = L"IDC_REJECT_LEBEL";
+static const wchar_t* IDC_ACCEPT_ARROW = L"IDC_ACCEPT_ARROW_";
+static const wchar_t* IDC_REJECT_ARROW = L"IDC_REJECT_ARROW_";
+const wchar_t* IDS_REJECT_MESSAGE_BTN = L"IDS_REJECT_MESSAGE_BTN";
+const wchar_t* IDS_LIST_SEND_BUTTON = L"IDS_LIST_SEND_BUTTON";
+const wchar_t* IDS_NO_MESSAGE_STR = L"IDS_NO_MESSAGE_STR";
+
+const wchar_t* IDI_FORM_VISUAL_ELE_NAME = L"FormVisEle";
+const wchar_t* IDI_PANEL_VISUAL_ELE_NAME = L"PanelVisEle";
+const wchar_t* IDI_ACCEPT_VISUAL_ELE_NAME = L"AcceptVisEle";
+const wchar_t* IDI_REJECT_VISUAL_ELE_NAME = L"RejectVisEle";
+const wchar_t* IDI_ACCEPT_ARROW_VISUAL_ELE_NAME = L"AcceptArrowVisEle";
+const wchar_t* IDI_REJECT_ARROW_VISUAL_ELE_NAME = L"RejectArrowVisEle";
+const wchar_t* IDI_REJECT_FINAL_VISUAL_ELE_NAME = L"RejectFinalVisEle";
+const wchar_t* IDI_ACCEPT_FINAL_VISUAL_ELE_NAME = L"AcceptFinalVisEle";
+
+IncomingCallForm::IncomingCallForm(void)
+ : BaseForm(FORMTYPE_INCOMINGCALL)
+{
+ __pActiveContactNo = null;
+ __pRejectMessageList = null;
+ __incomingCallHandle = -1;
+ __isAnswerCallStarted = false;
+ __isRejectCallStarted = false;
+ __pAcceptArrowLabelsList = null;
+ __pRejectArrowLabelsList = null;
+ __pRejectCircle = null;
+ __pAcceptCircle = null;
+ __pAcceptDial = null;
+ __pRejectDial = null;
+ __pAcceptArrow = null;
+ __pRejectArrow = null;
+ __pAcceptLabel = null;
+ __pRejectLabel = null;
+ __pAcceptArrowLabel = null;
+ __pRejectArrowLabel = null;
+ __pCallHandlePanel = null;
+ __pAcceptVisElem = null;
+ __pRejectVisElem = null;
+ __pRejectFinalVisElem = null;
+ __pAcceptFinalVisElem = null;
+ __pAcceptArrowVisElem = null;
+ __pRejectArrowVisElem = null;
+ __pCallPresentor = null;
+ __pOptionPopup = null;
+ __pSmallPhotoLabel = null;
+}
+
+IncomingCallForm::~IncomingCallForm(void)
+{
+}
+
+void
+IncomingCallForm::Initialize(void)
+{
+ Construct(IDL_INCOMING_CALL_FORM);
+}
+
+result
+IncomingCallForm::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+ Canvas* pCanvas = null;
+
+ InitializeFooter();
+
+
+ VisualElement* pFormVisElem = new (std::nothrow) VisualElement();
+ r = pFormVisElem->Construct();
+ pFormVisElem->SetBounds(FloatRectangle(GetBounds().x, GetBounds().y, GetBounds().width, GetBounds().height));
+ pFormVisElem->SetShowState(true);
+ pFormVisElem->SetOpacity(1.0f);
+ pFormVisElem->SetName(IDI_FORM_VISUAL_ELE_NAME);
+ GetVisualElement()->AttachChild(*pFormVisElem);
+ pCanvas = pFormVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->Clear();
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(GetBounds().x, GetBounds().y, GetBounds().width, GetBounds().height));
+ delete pCanvas;
+ pCanvas = null;
+ }
+ HideRejectPanel();
+
+
+ InitializeTableView();
+
+ __pAcceptCircle = AppUtility::GetBitmapFromResourcesN(IDB_ACCEPT_CIRCLE_ICON, W_DIAL_LABEL, H_DIAL_LABEL);
+ __pRejectCircle = AppUtility::GetBitmapFromResourcesN(IDB_REJECT_CIRCLE_ICON, W_DIAL_LABEL, H_DIAL_LABEL);
+ __pAcceptDial = AppUtility::GetBitmapFromResourcesN(IDB_CALL_ACCEPT_ICON, W_DIAL_BITMAP, H_DIAL_BITMAP);
+ __pRejectDial = AppUtility::GetBitmapFromResourcesN(IDB_CALL_REJECT_ICON, W_DIAL_BITMAP, H_DIAL_BITMAP);
+ __pAcceptArrow = AppUtility::GetBitmapFromResourcesN(IDB_ACCEPT_ARROW_ICON, W_ARROW_LABEL, H_ARROW_LABEL);
+ __pRejectArrow = AppUtility::GetBitmapFromResourcesN(IDB_REJECT_ARROW_ICON, W_ARROW_LABEL, H_ARROW_LABEL);
+
+
+ if(__pRejectDial == null)
+ {
+ AppLogDebug("Null");
+ }
+ //Panel for showing accept and reject call buttons.
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_BIG_PHOTO_LABEL, true));
+ int yPos = pPhotoLbl->GetX()+pPhotoLbl->GetHeight()+ Y_CALL_PANEL;
+
+ __pCallHandlePanel = static_cast<Panel*>(GetControl(IDC_CALLHANDEL_PANEL, true));
+ __pCallHandlePanel->AddTouchEventListener(*this);
+ __pCallHandlePanel->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ VisualElement* pCallPanelVisElem = new (std::nothrow) VisualElement();
+ r = pCallPanelVisElem->Construct();
+ pCallPanelVisElem->SetBounds(FloatRectangle(__pCallHandlePanel->GetBoundsF()));
+ pCallPanelVisElem->SetShowState(true);
+ pCallPanelVisElem->SetOpacity(1.0f);
+ pCallPanelVisElem->SetName(IDI_PANEL_VISUAL_ELE_NAME);
+ __pCallHandlePanel->GetVisualElement()->AttachChild(*pCallPanelVisElem);
+ pCanvas = pCallPanelVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->Clear();
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(X_CALL_PANEL, yPos, GetClientAreaBounds().width, H_CALL_PANEL));
+ delete pCanvas;
+ pCanvas = null;
+ }
+ //Lock Label for animation
+ __pAcceptLabel = static_cast<Label*>(GetControl(IDC_ACCEPT_LABEL, true));
+ __pAcceptLabel->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ __pAcceptLabel->AddTouchEventListener(*this);
+ //left dial icon
+ __pAcceptVisElem = new (std::nothrow) VisualElement();
+ r = __pAcceptVisElem->Construct();
+ __pAcceptVisElem->SetBounds(FloatRectangle(0, 0, __pAcceptLabel->GetWidth(), __pAcceptLabel->GetHeight()));
+ __pAcceptVisElem->SetShowState(true);
+ __pAcceptVisElem->SetOpacity(1.0f);
+ __pAcceptVisElem->SetName(IDI_ACCEPT_VISUAL_ELE_NAME);
+ __pAcceptLabel->GetVisualElement()->AttachChild(*__pAcceptVisElem);
+ pCanvas = __pAcceptVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->Clear();
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL), *__pAcceptCircle);
+ pCanvas->DrawBitmap(Rectangle(DIAL_ICON_X_OFFSET, DIAL_ICON_Y_OFFSET, W_DIAL_BITMAP, H_DIAL_BITMAP), *__pAcceptDial);
+ delete pCanvas;
+ pCanvas = null;
+ }
+ //UnLock Label for animation
+ __pRejectLabel = static_cast<Label*>(GetControl(IDC_REJECT_LEBEL, true));
+ __pRejectLabel->AddTouchEventListener(*this);
+ __pRejectLabel->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ SetControlAlwaysAtBottom(*__pCallHandlePanel, true);
+
+ //Right reject icon
+ __pRejectVisElem = new (std::nothrow) VisualElement();
+ r = __pRejectVisElem->Construct();
+ __pRejectVisElem->SetBounds(FloatRectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ __pRejectVisElem->SetShowState(true);
+ __pRejectVisElem->SetOpacity(1.00f);
+ __pRejectVisElem->SetName(IDI_REJECT_VISUAL_ELE_NAME);
+ __pRejectLabel->GetVisualElement()->AttachChild(*__pRejectVisElem);
+ pCanvas = __pRejectVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->Clear();
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL), *__pRejectCircle);
+ pCanvas->DrawBitmap(Rectangle(DIAL_ICON_X_OFFSET, DIAL_ICON_Y_OFFSET, W_DIAL_BITMAP, H_DIAL_BITMAP), *__pRejectDial);
+ delete pCanvas;
+ pCanvas = null;
+ }
+
+ //! Constructs an array list to store the unlock labels
+ __pAcceptArrowLabelsList = new (std::nothrow) ArrayList();
+ r = __pAcceptArrowLabelsList->Construct();
+
+ //! Constructs the Unlock Labels with the bitmap as background, adds the touch event Listener and adds them to the panel.
+ int x = X_ARROW_LABEL_STARTPOS;
+ for (int index = 0; index < COUNT_ARROW_ELEMENTS; index++)
+ {
+ String LabelName(IDC_ACCEPT_ARROW);
+ LabelName.Append(index+1);
+ __pAcceptArrowLabel = static_cast<Label*>(GetControl(LabelName, true));
+ __pAcceptArrowLabel->AddTouchEventListener(*this);
+ __pAcceptArrowLabelsList->Add(*__pAcceptArrowLabel);
+ __pAcceptArrowVisElem = new (std::nothrow) VisualElement();
+ r = __pAcceptArrowVisElem->Construct();
+ __pAcceptArrowVisElem->SetBounds(FloatRectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL));
+ __pAcceptArrowVisElem->SetShowState(true);
+ __pAcceptArrowVisElem->SetOpacity(0.0f);
+ String VisualEleName(IDI_ACCEPT_ARROW_VISUAL_ELE_NAME);
+ VisualEleName.Append(index);
+ __pAcceptArrowVisElem->SetName(VisualEleName);
+ __pAcceptArrowLabel->GetVisualElement()->AttachChild(*__pAcceptArrowVisElem);
+ pCanvas = __pAcceptArrowVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->Clear();
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->DrawRectangle(Rectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL));
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL), *__pAcceptArrow);
+ delete pCanvas;
+ pCanvas = null;
+ }
+ x += ARROW_LABEL_X_MARGIN;
+ }
+ //! Constructs an array list to store the unlock labels
+ __pRejectArrowLabelsList = new (std::nothrow) ArrayList();
+ r = __pRejectArrowLabelsList->Construct();
+
+ x = X_ARROW_REJECT_LABEL_STARTPOS;
+ for (int index = 0; index < COUNT_ARROW_ELEMENTS; index++)
+ {
+ String LabelName(IDC_REJECT_ARROW);
+ LabelName.Append(index+1);
+ __pRejectArrowLabel = static_cast<Label*>(GetControl(LabelName, true));
+ __pRejectArrowLabel->AddTouchEventListener(*this);
+ __pRejectArrowLabelsList->Add(*__pRejectArrowLabel);
+ __pRejectArrowVisElem = new (std::nothrow) VisualElement();
+ r = __pRejectArrowVisElem->Construct();
+ __pRejectArrowVisElem->SetBounds(FloatRectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL));
+ __pRejectArrowVisElem->SetShowState(true);
+ __pRejectArrowVisElem->SetOpacity(0.0f);
+ String VisualEleName(IDI_REJECT_ARROW_VISUAL_ELE_NAME);
+ VisualEleName.Append(index);
+ __pRejectArrowVisElem->SetName(VisualEleName);
+ __pRejectArrowLabel->GetVisualElement()->AttachChild(*__pRejectArrowVisElem);
+ pCanvas = __pRejectArrowVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->Clear();
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_ARROW_LABEL, H_ARROW_LABEL), *__pRejectArrow);
+ delete pCanvas;
+ pCanvas = null;
+ }
+ x -= ARROW_LABEL_X_MARGIN;
+ }
+
+
+ return r;
+}
+
+void
+IncomingCallForm::InitializeFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ FooterItem footerItemCreate;
+
+ SetFormBackEventListener(this);
+ if(pFooter != null)
+ {
+ pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
+ pFooter->AddActionEventListener(*this);
+
+ footerItemCreate.Construct(IDA_CREATE_REJECT_CALL_MESSAGE);
+ footerItemCreate.SetText(AppUtility::GetResourceString(IDS_REJECT_MESSAGE_CREATE));
+ pFooter->AddItem(footerItemCreate);
+ pFooter->SetShowState(false);
+ }
+}
+
+void
+IncomingCallForm::ShowRejectMessageFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if(pFooter != null)
+ {
+ AppLogDebug("SetShowState");
+ pFooter->SetShowState(true);
+
+ }
+}
+
+void
+IncomingCallForm::HideRejectMessageFooter(void)
+{
+ Footer* pFooter = GetFooter();
+ if(pFooter != null)
+ {
+ pFooter->SetShowState(false);
+ }
+}
+
+result
+IncomingCallForm::OnTerminating(void)
+{
+ result r = E_SUCCESS;
+
+ if (__pRejectMessageList != null)
+ {
+ delete __pRejectMessageList;
+ __pRejectMessageList = null;
+ }
+ if (__pActiveContactNo != null)
+ {
+ delete __pActiveContactNo;
+ __pActiveContactNo = null;
+ }
+ __incomingCallHandle = -1;
+ __pCallPresentor = null;
+
+ /* Deleting fails in A4RC* SDK. Remove if not necessary
+ if (__pAcceptVisElem != null)
+ {
+ __pAcceptVisElem->Destroy();
+ __pAcceptVisElem = null;
+ }
+
+ if (__pRejectVisElem != null)
+ {
+ __pRejectVisElem->Destroy();
+ __pRejectVisElem = null;
+ }
+
+ if (__pRejectFinalVisElem != null)
+ {
+ __pRejectFinalVisElem->Destroy();
+ __pRejectFinalVisElem = null;
+ }
+
+ if (__pAcceptFinalVisElem != null)
+ {
+ __pAcceptFinalVisElem->Destroy();
+ __pAcceptFinalVisElem = null;
+ }
+
+ for (int i = 0; i < 7; i++)
+ {
+ __pRejectArrowLabel = static_cast<Label*>(__pRejectArrowLabelsList->GetAt(i));
+ __pRejectArrowVisElem = __pRejectArrowLabel->GetVisualElement();
+ if (__pRejectArrowVisElem != null)
+ {
+ __pRejectArrowVisElem->Destroy();
+ __pRejectArrowVisElem = null;
+ }
+
+ __pAcceptArrowLabel = static_cast<Label*>(__pAcceptArrowLabelsList->GetAt(i));
+ __pAcceptArrowVisElem = __pAcceptArrowLabel->GetVisualElement();
+ if (__pAcceptArrowVisElem != null)
+ {
+ __pAcceptArrowVisElem->Destroy();
+ __pAcceptArrowVisElem = null;
+ }
+ }
+
+ if (__pAcceptArrowVisElem != null)
+ {
+ __pAcceptArrowVisElem = null;
+ }
+
+ if (__pRejectArrowVisElem != null)
+ {
+ __pRejectArrowVisElem = null;
+ }
+*/
+ if (__pAcceptArrowLabelsList != null)
+ {
+ __pAcceptArrowLabelsList->RemoveAll(false);
+ delete __pAcceptArrowLabelsList;
+ __pAcceptArrowLabelsList = null;
+ }
+
+ if (__pRejectArrowLabelsList != null)
+ {
+ __pRejectArrowLabelsList->RemoveAll(false);
+ delete __pRejectArrowLabelsList;
+ __pRejectArrowLabelsList = null;
+ }
+
+ if (__pRejectCircle != null)
+ {
+ delete __pRejectCircle;
+ __pRejectCircle = null;
+ }
+
+ if (__pAcceptCircle != null)
+ {
+ delete __pAcceptCircle;
+ __pAcceptCircle = null;
+ }
+
+ if (__pAcceptDial != null)
+ {
+ delete __pAcceptDial;
+ __pAcceptDial = null;
+ }
+
+ if (__pRejectDial != null)
+ {
+ delete __pRejectDial;
+ __pRejectDial = null;
+ }
+
+ if (__pAcceptArrow != null)
+ {
+ delete __pAcceptArrow;
+ __pAcceptArrow = null;
+ }
+
+ if (__pRejectArrow != null)
+ {
+ delete __pRejectArrow;
+ __pRejectArrow = null;
+ }
+ __pCallHandlePanel->RemoveTouchEventListener(*this);
+ __pAcceptLabel->RemoveTouchEventListener(*this);
+ __pRejectLabel->RemoveTouchEventListener(*this);
+ __pAcceptArrowLabel->RemoveTouchEventListener(*this);
+ __pRejectArrowLabel->RemoveTouchEventListener(*this);
+ __pAcceptLabel = null;
+ __pRejectLabel = null;
+ __pAcceptArrowLabel = null;
+ __pRejectArrowLabel = null;
+ __pCallHandlePanel = null;
+ return r;
+}
+
+void
+IncomingCallForm::ShowRejectMessagePanel(void)
+ {
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ if (pKeysPanel)
+ {
+ pKeysPanel->SetShowState(true);
+ SetRejectMessagePanelBounds();
+
+ Button* pButtonReject = static_cast<Button*>(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON));
+ pButtonReject->SetActionId(IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL);
+ pButtonReject->AddActionEventListener(*this);
+ pButtonReject->SetEnabled(true);
+ //pButtonReject->SetFocus();
+ FloatRectangle originalrect = pButtonReject->GetBoundsF();
+ FloatRectangle allignedrect = CoordinateSystem::AlignToDevice(pButtonReject->GetBoundsF());
+ pButtonReject->SetBounds(allignedrect);
+ pButtonReject->Invalidate(true);
+
+ ShowRejectMessageFooter();
+
+
+ //pKeysPanel->SetFocus();
+ pKeysPanel->Draw();
+ }
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage)
+ {
+ pButtonRejectMessage->SetShowState(false);
+ pButtonRejectMessage->Invalidate(true);
+ pButtonRejectMessage->Draw();
+ }
+ }
+void
+IncomingCallForm::HideRejectMessagePanel(void)
+{
+ HideRejectPanel();
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage)
+ {
+ pButtonRejectMessage->SetShowState(true);
+ FloatRectangle originalrect = pButtonRejectMessage->GetBoundsF();
+ FloatRectangle allignedrect = CoordinateSystem::AlignToDevice(pButtonRejectMessage->GetBoundsF());
+ pButtonRejectMessage->SetBounds(allignedrect);
+ pButtonRejectMessage->Invalidate(true);
+ RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+ if (pRelativeLayout != null)
+ {
+ pRelativeLayout->SetRelation(*pButtonRejectMessage,*this,RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ pRelativeLayout->Update();
+ delete pRelativeLayout;
+ }
+ }
+}
+
+void
+IncomingCallForm::SetRejectMessagePanelBounds(void)
+{
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ if(pKeysPanel)
+ {
+ TableView* pMessageList = static_cast<TableView*>(pKeysPanel->GetControl(IDC_MSG_TABLEVIEW));
+ Rectangle tmpRect = pMessageList->GetBounds();
+ SetControlAlwaysOnTop(*pKeysPanel,true);
+ //Set Height to Reject Message Panel
+ int listHeight = H_LIST_NORMAL_MENU_ITEM; //If no messages
+ if(__pRejectMessageList != null && __pRejectMessageList->GetCount() > 0)
+ {
+ listHeight = H_LIST_NORMAL_MENU_ITEM * (__pRejectMessageList->GetCount()); //multiply by number of items
+ }
+ if (listHeight > MAX_LIST_HEIGHT)
+ {
+ listHeight = MAX_LIST_HEIGHT;
+ }
+
+ pMessageList->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, listHeight);
+ pMessageList->RefreshAllItems();
+ tmpRect = pKeysPanel->GetBounds();
+ pKeysPanel->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, H_MESSAGE_BG_BITMAP /*+ H_REJECT_VIEW_FOOTER*/ + listHeight);
+ }
+}
+
+void
+IncomingCallForm::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case IDA_SHOW_REJECT_CALL_MESSAGE_PANEL: // applicable in all form states
+ {
+ ShowRejectMessagePanel();
+ }
+ break;
+
+ case IDA_CREATE_REJECT_CALL_MESSAGE:
+ {
+ if(__pCallPresentor->IsAppControlRunning() == false)
+ {
+ __pCallPresentor->RejectCall(__incomingCallHandle, true,*__pActiveContactNo);
+ /*ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
+ if(pCallList != null && pCallList->GetCount() > 0)
+ {
+ __pCallPresentor->HandleCallConnected(*pCallList);
+ }
+ pCallList = null;*/
+ }
+ }
+ break;
+
+ case IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL:
+ {
+ HideRejectMessagePanel();
+ }
+ break;
+
+ case IDA_SEND_REJECT_MSG1:
+ case IDA_SEND_REJECT_MSG2:
+ case IDA_SEND_REJECT_MSG3:
+ case IDA_SEND_REJECT_MSG4:
+ case IDA_SEND_REJECT_MSG5:
+ case IDA_SEND_REJECT_MSG6:
+ {
+ __pCallPresentor->RejectCall(__incomingCallHandle, false,*__pActiveContactNo);
+ String textToBeSent;
+ //calculate msgIndex
+ int msgIndex = IDA_SEND_REJECT_MSG1;
+ msgIndex = actionId - msgIndex;
+ __pRejectMessageList->GetAt(msgIndex, textToBeSent);
+ __pCallPresentor->SendMessage(textToBeSent,*__pActiveContactNo);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+IncomingCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
+{
+ AppLogDebug("Enter");
+ AddOrientationEventListener(*this);
+ //Get Reject list from Settings Manager
+ IMapT<int,String>* pMsgMap = SettingsManager::GetInstance()->GetRejectMessageListN();
+ if(pMsgMap != null)
+ {
+ if (__pRejectMessageList != null)
+ {
+ delete __pRejectMessageList;
+ __pRejectMessageList = null;
+ }
+ __pRejectMessageList = pMsgMap->GetValuesN();
+ delete pMsgMap;
+ pMsgMap = null;
+ }
+ //No reject messages
+ else
+ {
+ if (__pRejectMessageList != null)
+ {
+ delete __pRejectMessageList;
+ __pRejectMessageList = null;
+ }
+ }
+ //listen to Foreground events
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+ if(__pCallPresentor == null)
+ {
+ __pCallPresentor = CallPresentationModel::GetInstance();
+ }
+ __pCallPresentor->SetTelEventListener(this);
+ //Abort any AppControl Request running already to show incoming call screen
+ if (__pCallPresentor->IsAppControlRunning() == true)
+ {
+ __pCallPresentor->AbortAppControlRequest();
+ }
+
+ HideRejectPanel();
+
+ if(__pAcceptLabel->GetVisualElement()->GetChild(IDI_ACCEPT_VISUAL_ELE_NAME,true) == null)
+ {
+ __pAcceptLabel->GetVisualElement()->AttachChild(*__pAcceptVisElem);
+ }
+ if(__pRejectLabel->GetVisualElement()->GetChild(IDI_REJECT_VISUAL_ELE_NAME,true) == null)
+ {
+ __pRejectLabel->GetVisualElement()->AttachChild(*__pRejectVisElem);
+ }
+
+ __pAcceptVisElem->SetOpacity(1.0f);
+ __pRejectVisElem->SetOpacity(1.00f);
+ for (int i = 0; i < COUNT_ARROW_ELEMENTS; i++)
+ {
+ __pRejectArrowLabel = static_cast<Label*>(__pRejectArrowLabelsList->GetAt(i));
+ String RejectVisualEleName(IDI_REJECT_ARROW_VISUAL_ELE_NAME);
+ RejectVisualEleName.Append(i);
+ __pRejectArrowVisElem = __pRejectArrowLabel->GetVisualElement()->GetChild(RejectVisualEleName,true);
+ __pAcceptArrowLabel = static_cast<Label*>(__pAcceptArrowLabelsList->GetAt(i));
+ String AcceptVisualEleName(IDI_ACCEPT_ARROW_VISUAL_ELE_NAME);
+ AcceptVisualEleName.Append(i);
+ __pAcceptArrowVisElem = __pAcceptArrowLabel->GetVisualElement()->GetChild(AcceptVisualEleName,true);
+ switch(i)
+ {
+ case 0:
+ __pAcceptArrowVisElem->SetOpacity(0.6f);
+ __pRejectArrowVisElem->SetOpacity(0.6f);
+ break;
+ case 1:
+ __pAcceptArrowVisElem->SetOpacity(0.8f);
+ __pRejectArrowVisElem->SetOpacity(0.8f);
+ break;
+ case 2:
+ __pAcceptArrowVisElem->SetOpacity(1.0f);
+ __pRejectArrowVisElem->SetOpacity(1.0f);
+ break;
+ }
+
+ }
+
+
+ if (pArgs != null)
+ {
+ //get Call Info
+ AppCallInfo* pIncomingCall = static_cast<AppCallInfo*>(pArgs->GetAt(0));
+ if (pIncomingCall != null)
+ {
+ //start alert with contact's custom ringtone
+ __pCallPresentor->StartAlert(*pIncomingCall);
+ //show contact number
+ String contactNo;
+ contactNo.Append(pIncomingCall->GetContactNumber());
+ if (__pActiveContactNo)
+ {
+ delete __pActiveContactNo;
+ __pActiveContactNo = null;
+ }
+ __incomingCallHandle = pIncomingCall->GetCallHandle()->ToLong();
+ __pActiveContactNo = new (std::nothrow) String();
+
+ if(contactNo.IsEmpty())
+ {
+ AppLogDebug("Number empty");
+ contactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ AppLogDebug("%ls",contactNo.GetPointer());
+ }
+ __pActiveContactNo->Append(contactNo);
+ //Show person details
+ ShowPersonDetails(*__pActiveContactNo, IDC_NUMBER_LABEL, IDC_CALLER_LABEL, pIncomingCall);
+ //Check if incoming call is hidden call, then do not show "Reject with Message" button
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage)
+ {
+ //for hidden call, contact number is not present
+ bool showRejectMsgButton = (pIncomingCall->GetContactNumber().IsEmpty() == false);
+ pButtonRejectMessage->SetShowState(showRejectMsgButton);
+ pButtonRejectMessage->Invalidate(true);
+ }
+ }
+ pArgs->RemoveAll();
+ delete pArgs;
+ pArgs = null;
+ }
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(true);
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage)
+ {
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, false);
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, true);
+ pButtonRejectMessage->SetActionId(IDA_SHOW_REJECT_CALL_MESSAGE_PANEL);
+ pButtonRejectMessage->AddActionEventListener(*this);
+ }
+
+ //This called here to handle the case when incoming call comes when
+ // add call is in foreground.
+ //Uncommenting for N_SE-50029
+ __pCallPresentor->OnAppForeground();
+
+}
+
+void
+IncomingCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
+{
+ RemoveOrientationEventListener(*this);
+ if (__pSmallPhotoLabel != null)
+ {
+ RemoveControl(*__pSmallPhotoLabel);
+ __pSmallPhotoLabel = null;
+ }
+ for (int i = 0; i < COUNT_ARROW_ELEMENTS; i++)
+ {
+ __pRejectArrowLabel = static_cast<Label*>(__pRejectArrowLabelsList->GetAt(i));
+ String RejectVisualEleName(IDI_REJECT_ARROW_VISUAL_ELE_NAME);
+ RejectVisualEleName.Append(i);
+ __pRejectArrowVisElem = __pRejectArrowLabel->GetVisualElement()->GetChild(RejectVisualEleName,true);
+ __pRejectArrowVisElem->SetOpacity(0.0f);
+ __pAcceptArrowLabel = static_cast<Label*>(__pAcceptArrowLabelsList->GetAt(i));
+ String AcceptVisualEleName(IDI_ACCEPT_ARROW_VISUAL_ELE_NAME);
+ AcceptVisualEleName.Append(i);
+ __pAcceptArrowVisElem = __pAcceptArrowLabel->GetVisualElement()->GetChild(AcceptVisualEleName,true);
+ __pAcceptArrowVisElem->SetOpacity(0.0f);
+ }
+ if(__pAcceptLabel != null)
+ {
+ if(__pAcceptLabel->GetVisualElement()->GetChild(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME,true) != null)
+ {
+ AppLogDebug("__pAcceptLabel Detatach child");
+ __pAcceptLabel->GetVisualElement()->DetachChild(*__pAcceptFinalVisElem);
+ }
+ }
+ if(__pRejectLabel != null)
+ {
+ if(__pRejectLabel->GetVisualElement()->GetChild(IDI_REJECT_FINAL_VISUAL_ELE_NAME,true) != null)
+ {
+ AppLogDebug("__pRejectLabel Detatach child");
+ __pRejectLabel->GetVisualElement()->DetachChild(*__pRejectFinalVisElem);
+ }
+
+ }
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->RemoveAppStateChangeListener(*this);
+}
+
+result
+IncomingCallForm::OnDraw(void)
+{
+ Bitmap* pBackgroundWp = null;
+ // get a Canvas instance
+ Canvas* pCanvas = GetCanvasN();
+
+ pBackgroundWp = AppResource::GetInstance()->GetBitmapN(IDB_CALL_BG);
+
+ if (pCanvas)
+ {
+
+ if (pBackgroundWp)
+ {
+ pCanvas->DrawBitmap(pCanvas->GetBounds(), *pBackgroundWp);
+ }
+ }
+
+ delete pBackgroundWp;
+ pBackgroundWp = null;
+
+ delete pCanvas;
+ pCanvas = null;
+
+ return E_SUCCESS;
+}
+
+void
+IncomingCallForm::HideRejectPanel(void)
+{
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ if (pKeysPanel)
+ {
+ pKeysPanel->SetShowState(false);
+ Button* pButtonReject = static_cast<Button*>(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON));
+ pButtonReject->SetActionId(IDA_CANCEL_REJECT_CALL_MESSAGE_PANEL);
+ pButtonReject->AddActionEventListener(*this);
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, false);
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, true);
+
+ HideRejectMessageFooter();
+ pKeysPanel->Invalidate(true);
+ }
+}
+
+void
+IncomingCallForm::InitializeTableView(void)
+{
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ TableView* pMessageList = static_cast<TableView*>(pKeysPanel->GetControl(IDC_MSG_TABLEVIEW));
+ pMessageList->SetItemProvider(this);
+ pMessageList->AddTableViewItemEventListener(*this);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+///// Table View Functionality supporting functions /////
+//////////////////////////////////////////////////////////////////////////////
+int
+IncomingCallForm::GetItemCount(void)
+{
+ if(__pRejectMessageList != null && __pRejectMessageList->GetCount() > 0)
+ {
+ return (__pRejectMessageList->GetCount());
+ }
+ return 1;
+}
+
+TableViewItem*
+IncomingCallForm::CreateItem(int itemIndex, int itemWidth)
+{
+ //create a new item
+ TableViewItem* pItem = new (std::nothrow) TableViewItem();
+ pItem->Construct(Dimension(itemWidth, H_LIST_NORMAL_MENU_ITEM), TABLE_VIEW_ANNEX_STYLE_NORMAL);
+
+ //Message text item rectangle
+ //Rectangle itemRect(X_LIST_TEXT_ITEM, 0, W_LIST_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM);
+ Rectangle itemRect(X_LIST_TEXT_ITEM, 0, itemWidth - W_SEND_BUTTON_MARGIN - W_SEND_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM);
+
+ //Message
+ String itemName(L"");
+ bool isShowSendButton = true;
+ if(__pRejectMessageList != null && __pRejectMessageList->GetCount() > 0)
+ {
+ __pRejectMessageList->GetAt(itemIndex, itemName);
+ }
+ else
+ {
+ itemName.Append(AppUtility::GetResourceString(IDS_NO_MESSAGE_STR));
+ isShowSendButton = false;
+ }
+
+ Label* pMsgLbl = new (std::nothrow) Label();
+ pMsgLbl->Construct(itemRect, itemName);
+ pMsgLbl->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
+ pMsgLbl->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+ pMsgLbl->SetTextConfig(FONT_SIZE_MSG_TXT, LABEL_TEXT_STYLE_NORMAL);
+ pMsgLbl->SetTextColor(COLOR_LIST_TEXT_NORMAL);
+ pItem->AddControl(pMsgLbl);
+
+ //Send Button
+ if(isShowSendButton == true)
+ {
+ String sendText = AppUtility::GetResourceString(IDS_LIST_SEND_BUTTON);
+ Button* pSendButton = new (std::nothrow) Button();
+ pSendButton->Construct(Rectangle(GetClientAreaBounds().width - W_SEND_BUTTON_MARGIN -W_SEND_TEXT_ITEM, Y_SEND_TEXT_ITEM, W_SEND_TEXT_ITEM, H_SEND_TEXT_ITEM), sendText);
+ //set action id and listener
+ int actionId = IDA_SEND_REJECT_MSG1;
+ switch(itemIndex)
+ {
+ case 0:
+ actionId = IDA_SEND_REJECT_MSG1;
+ break;
+ case 1:
+ actionId = IDA_SEND_REJECT_MSG2;
+ break;
+ case 2:
+ actionId = IDA_SEND_REJECT_MSG3;
+ break;
+ case 3:
+ actionId = IDA_SEND_REJECT_MSG4;
+ break;
+ case 4:
+ actionId = IDA_SEND_REJECT_MSG5;
+ break;
+ case 5:
+ actionId = IDA_SEND_REJECT_MSG6;
+ break;
+ }
+ pSendButton->SetActionId(actionId);
+ pSendButton->AddActionEventListener(*this);
+ pItem->AddControl(*pSendButton);
+ pItem->SetIndividualSelectionEnabled(pSendButton, true);
+ }
+ else
+ {
+ pItem->SetEnabled(false);
+ }
+
+ return pItem;
+}
+
+void
+IncomingCallForm::UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
+{
+ Rectangle itemRect(X_LIST_TEXT_ITEM, 0, pItem->GetWidth()- W_SEND_BUTTON_MARGIN - W_SEND_TEXT_ITEM, H_LIST_NORMAL_MENU_ITEM);
+ Label* pItemLbl = static_cast<Label*>(pItem->GetControl(0));
+ if(pItemLbl != null)
+ {
+ pItemLbl->SetBounds(itemRect);
+ }
+ Button* pSendButton = static_cast<Button*>(pItem->GetControl(1));
+ if(pSendButton != null)
+ {
+ pSendButton->SetBounds(Rectangle(GetClientAreaBounds().width - W_SEND_BUTTON_MARGIN -W_SEND_TEXT_ITEM, Y_SEND_TEXT_ITEM, W_SEND_TEXT_ITEM, H_SEND_TEXT_ITEM));
+ }
+ pItem->Invalidate(true);
+}
+
+bool
+IncomingCallForm::DeleteItem(int itemIndex, TableViewItem* pItem)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+int
+IncomingCallForm::GetDefaultItemHeight(void)
+{
+ return H_LIST_NORMAL_MENU_ITEM;
+}
+
+void
+IncomingCallForm::ShowPersonDetails(const String& phoneNumber, const String& contactLblName, const String& nameLblName, AppCallInfo* pCallInfo)
+{
+ //call individual methods to show contact number, caller name & photo
+ SetTextToLabel(phoneNumber, contactLblName);
+
+ //fetch contact details based on phone number
+ String* pDisplayName = pCallInfo->FetchLatestCallerNameN(phoneNumber);
+ Bitmap* pPhotoBitmap = pCallInfo->FetchLatestCallerPhotoN(phoneNumber);
+ ShowCallerPhoto(pPhotoBitmap);
+
+ //free resources
+ if (pDisplayName)
+ {
+ SetTextToLabel(*pDisplayName, nameLblName);
+ delete pDisplayName;
+ pDisplayName = null;
+ }
+
+ if (pPhotoBitmap)
+ {
+ delete pPhotoBitmap;
+ pPhotoBitmap = null;
+ }
+}
+
+void
+IncomingCallForm::SetTextToLabel(const String& textToBeSet, const String& lblName)
+{
+ Label* pContactLbl = static_cast<Label*>(GetControl(lblName));
+ //passing an empty string to SetText fails in label,
+ //if previously valid text has been set
+ if (textToBeSet.IsEmpty() == true && pContactLbl->GetText().IsEmpty() == false)
+ {
+ String stringToBeSet(L"");
+ pContactLbl->SetText(stringToBeSet);
+ }
+
+ else
+ {
+ pContactLbl->SetText(textToBeSet);
+ }
+}
+
+void
+IncomingCallForm::ShowCallerPhoto(const Bitmap* pPhotoId)
+{
+ bool showSmallPhoto = false;
+ //show photo - for Big Photo Id, Animated Call Image
+ if (pPhotoId == null)
+ {
+ pPhotoId = AppUtility::GetBitmapFromResourcesN(IDB_ACTIVE_CALL_DEFAULT_ICON,W_CONFERENCE_PHOTO,W_CONFERENCE_PHOTO);
+ }
+ else
+ {
+ //Check the size of photo
+ // Now checking the condition with && but actually it should be ||
+ //But for now keeping it as && because _pContact->GetThubNail() returns image width as
+ // height 270 and width = 480 . So all images set thru gallery is show as small image
+ if(pPhotoId->GetHeight() <= H_SMALL_PHOTO
+ && pPhotoId->GetWidth() <= W_SMALL_PHOTO)
+ {
+ showSmallPhoto = true;
+ }
+ }
+
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_BIG_PHOTO_LABEL));
+ if(showSmallPhoto == true)
+ {
+ ShowThumbnailImage(pPhotoId);
+ }
+ else
+ {
+ if (pPhotoLbl != null && pPhotoId != null)
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(canvasRect,*pPhotoId);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ }
+ }
+}
+
+void
+IncomingCallForm::ShowThumbnailImage(const Bitmap* pPhotoId)
+{
+ Label* pPhotoLbl = static_cast<Label*>(GetControl(IDC_BIG_PHOTO_LABEL));
+
+ if (pPhotoLbl != null && pPhotoId != null)
+ {
+ Canvas* pCanvas = new (std::nothrow) Canvas;
+ Bitmap* pBackground = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_BACKGROUND,W_CALL_THUMBNAIL,H_CALL_THUMBNAIL);
+ Bitmap* pShadow = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_SHADOW,W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW);
+ Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
+ pCanvas->Construct(canvasRect);
+ //draw the back ground
+ pCanvas->DrawBitmap(canvasRect,*pBackground);
+ //draw shadow (to be enabled after correct shadow image is provided )
+ //pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_CALL_THUMBNAIL_SHADOW/2),
+ // (pPhotoLbl->GetBounds().height/2)-(H_CALL_THUMBNAIL_SHADOW/2),W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW),*pShadow);
+ //draw the contact bitmap
+ pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_SMALL_PHOTO/2),
+ (pPhotoLbl->GetBounds().height/2)-(H_SMALL_PHOTO/2),W_SMALL_PHOTO,H_SMALL_PHOTO),*pPhotoId);
+ Bitmap* pNewPhotoId = new Bitmap();
+ pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
+ delete pCanvas;
+
+ pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
+ pPhotoLbl->Invalidate(true);
+ delete pNewPhotoId;
+ delete pBackground;
+ delete pShadow;
+ }
+
+}
+
+void
+IncomingCallForm::ShowCallersPhotoThumbnail(const Bitmap& pPhotoId)
+{
+ //Draw Small Photo and show on small photo label
+ __pSmallPhotoLabel = new (std::nothrow) Label();//static_cast<Label*>(GetControl(IDC_SMALL_PHOTO_LABEL));
+ __pSmallPhotoLabel->Construct(Rectangle(X_PHOTO_LBL, Y_PHOTO_LBL, W_PHOTO_LBL, H_PHOTO_LBL), L"");
+ __pSmallPhotoLabel->SetBackgroundColor(Color(0,0,0));
+ __pSmallPhotoLabel->SetBackgroundBitmap(pPhotoId);
+ // Add a Label to the Form
+ AddControl(*__pSmallPhotoLabel);
+ __pSmallPhotoLabel->Invalidate(true);
+}
+
+void
+IncomingCallForm::ShowTimerInfo(const String& timerLblName, const String& textToBeDisplayed)
+{
+ Label* pTimerLbl = static_cast<Label*>(GetControl(timerLblName));
+ if (pTimerLbl != null)
+ {
+ pTimerLbl->SetText(textToBeDisplayed);
+ }
+}
+
+void
+IncomingCallForm::SetBitmapToRejectMessageButton(const String& btnName, const String& bgBitmap
+ , const String& arrowBitmap, const String& messageIconBitmap, bool isButtonInPanel, bool setButtonPressBitmap)
+{
+
+ Button* pButton = null;
+ if (isButtonInPanel == false)
+ {
+ pButton = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ }
+ else
+ {
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ pButton = static_cast<Button*>(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON));
+ }
+ Bitmap* pHoldBmp = null;
+ Canvas* pCanvas = null;
+ pCanvas = new (std::nothrow) Canvas();
+ pCanvas->Construct(Rectangle(0,0,pButton->GetBounds().width,pButton->GetBounds().height));
+ //set bitmap to button
+ pHoldBmp = AppUtility::GetBitmapFromResourcesN(bgBitmap);
+ if (pHoldBmp)
+ {
+ //scale bitmap to predefined size
+ pHoldBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pHoldBmp->Scale(Dimension(pButton->GetBounds().width, H_MESSAGE_BG_BITMAP));
+ pCanvas->DrawBitmap(Rectangle(Point(0, 0), Dimension(pHoldBmp->GetWidth(), pHoldBmp->GetHeight())), *pHoldBmp);
+ }
+ delete pHoldBmp;
+ pHoldBmp = null;
+ pHoldBmp = AppUtility::GetBitmapFromResourcesN(arrowBitmap);
+ if (pHoldBmp)
+ {
+ //scale bitmap to predefined size
+ pHoldBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pHoldBmp->Scale(Dimension(W_ARROW_BITMAP, H_ARROW_BITMAP));
+ pCanvas->DrawBitmap(Rectangle(Point((pButton->GetBounds().width / 2 - 17/*Width of arrow / 2*/), 0), Dimension(pHoldBmp->GetWidth(), pHoldBmp->GetHeight())), *pHoldBmp);
+ }
+ delete pHoldBmp;
+ pHoldBmp = null;
+
+
+
+ //set button name
+ String holdBtnName = AppUtility::GetResourceString(btnName);
+ FloatDimension textDimension;
+ if (!holdBtnName.IsEmpty())
+ {
+ Font font;
+ font.Construct(FONT_STYLE_PLAIN, pButton->GetTextSize());
+ font.GetTextExtent(holdBtnName, holdBtnName.GetLength(), textDimension);
+ textDimension.height = textDimension.height + font.GetDescender();
+ TextElement* pTextElement = new (std::nothrow) TextElement();
+ pTextElement->Construct(holdBtnName);
+ Color textColor(249, 249, 249);
+ if (setButtonPressBitmap)
+ {
+ textColor.SetAlpha(255);
+ }
+ else
+ {
+ textColor.SetAlpha(127);
+ }
+
+ pTextElement->SetTextColor(textColor);
+ pTextElement->SetFont(font);
+
+ EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
+ pEnrichedText->Construct(textDimension);
+ pEnrichedText->Add(*pTextElement);
+ //Point textPos((X_MESSAGE_BITMAP + pHoldBmp->GetWidth() + MESSAGE_TEXT_X_MARGIN), Y_MESSAGE_BITMAP + MESSAGE_TEXT_Y_MARGIN);
+ Point textPos((pButton->GetWidth()/2)-(textDimension.width/2) + MESSAGE_TEXT_X_MARGIN,Y_MESSAGE_BITMAP + MESSAGE_TEXT_Y_MARGIN);
+ pCanvas->DrawText(textPos, *pEnrichedText);
+ // Cleans up
+ pEnrichedText->RemoveAll(true);
+ delete pEnrichedText;
+ }
+
+
+ pHoldBmp = AppUtility::GetBitmapFromResourcesN(messageIconBitmap);
+ if (pHoldBmp)
+ {
+ //scale bitmap to predefined size
+ pHoldBmp->SetScalingQuality(BITMAP_SCALING_QUALITY_MID);
+ pHoldBmp->Scale(Dimension(W_MESSAGE_BITMAP, H_MESSAGE_BITMAP));
+ //pCanvas->DrawBitmap(Rectangle(Point(X_MESSAGE_BITMAP, Y_MESSAGE_BITMAP), Dimension(pHoldBmp->GetWidth(), pHoldBmp->GetHeight())), *pHoldBmp);
+ pCanvas->DrawBitmap(Rectangle(Point((pButton->GetWidth()/2)-(textDimension.width/2) -pHoldBmp->GetWidth(), Y_MESSAGE_BITMAP), Dimension(pHoldBmp->GetWidth(), pHoldBmp->GetHeight())), *pHoldBmp);
+ }
+
+ //set background bitmpa to button
+ Bitmap* pActualBgBmp = new (std::nothrow) Bitmap();
+ pActualBgBmp->Construct(*pCanvas, pCanvas->GetBounds());
+ if (setButtonPressBitmap)
+ {
+ pButton->SetPressedBackgroundBitmap(*pActualBgBmp);
+ }
+ else
+ {
+ pButton->SetNormalBackgroundBitmap(*pActualBgBmp);
+ }
+ delete pActualBgBmp;
+ delete pHoldBmp;
+ delete pCanvas;
+}
+
+/*!In OnTouchPressed, It creates the three visual elements and starts the animation of opacity and rotation variation
+ */
+void
+IncomingCallForm::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+ //__pCallPresentor->StopAlert();
+ if (currentPosition.x < VALID_TOUCH_X_OFFSET && currentPosition.y < VALID_TOUCH_Y_OFFSET)
+ {
+ Rectangle rect = source.GetBounds();
+ if (source.Equals(*__pAcceptLabel))
+ {
+ __isAnswerCallStarted = true;
+ __isRejectCallStarted = false;
+ }
+ else if (source.Equals(*__pRejectLabel))
+ {
+ __isAnswerCallStarted = false;
+ __isRejectCallStarted = true;
+ }
+ else
+ {
+ // touch event between the 2 labels. So Do nothing
+ return;
+ }
+
+ }
+}
+
+// On Touch released, the animation and the visual elements disappear
+void
+IncomingCallForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+ AppLogDebug("%d",currentPosition.x);
+ if (__isAnswerCallStarted == true)
+ {
+ if (currentPosition.x > __pRejectLabel->GetBounds().x)
+ {
+ //Right reject icon
+ if(__pRejectFinalVisElem == null)
+ {
+ __pRejectFinalVisElem = new (std::nothrow) VisualElement();
+ __pRejectFinalVisElem->Construct();
+ __pRejectFinalVisElem->SetName(IDI_REJECT_FINAL_VISUAL_ELE_NAME);
+ }
+ __pRejectFinalVisElem->SetBounds(FloatRectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ __pRejectFinalVisElem->SetShowState(true);
+ __pRejectFinalVisElem->SetOpacity(1.00f);
+ if(__pRejectLabel->GetVisualElement()->GetChild(IDI_REJECT_FINAL_VISUAL_ELE_NAME,true) == null)
+ {
+ AppLogDebug("AttachChild __pRejectFinalVisElem");
+ __pRejectLabel->GetVisualElement()->AttachChild(*__pRejectFinalVisElem);
+ }
+ Canvas* pCanvas = __pRejectFinalVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_DIAL_LABEL, W_DIAL_LABEL), *__pAcceptCircle);
+ pCanvas->DrawBitmap(Rectangle(DIAL_ICON_X_OFFSET, DIAL_ICON_Y_OFFSET, W_DIAL_BITMAP, H_DIAL_BITMAP), *__pAcceptDial);
+ delete pCanvas;
+ }
+
+ __pAcceptVisElem->SetOpacity(0.0f);
+ //fetch already active call list
+ ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
+ if (pCallList != null && pCallList->GetCount() > 0)
+ {
+ //then atleast 1 active call exist.
+ AppCallInfo phnCallInfo;
+ pCallList->GetAt(0,phnCallInfo);
+ //Check if only 1 call exist and it is on Hold
+ if(pCallList->GetCount() == 1 && phnCallInfo.IsOnHold())
+ {
+ //directly accept call
+ __pCallPresentor->AcceptIncomingCall(ANSERWING_OPTION_ACCEPT_CALL,__incomingCallHandle);
+ }
+ else
+ {
+ //Either 1 call exist and not "on Hold".
+ //Or 2 calls exist.
+ if(__pOptionPopup != null)
+ {
+ delete __pOptionPopup;
+ __pOptionPopup = null;
+ }
+ __pOptionPopup = new (std::nothrow) CallOptionPopup(*this,*(__pCallPresentor));
+ __pOptionPopup->Initialize();
+ __pOptionPopup->SetShowState(true);
+ __pOptionPopup->Draw();
+ __pOptionPopup->Show();
+ }
+ pCallList->RemoveAll();
+ }
+ else
+ {
+ //no active call - Accept the incoming call
+ __pCallPresentor->AcceptIncomingCall(ANSERWING_OPTION_ACCEPT_CALL,__incomingCallHandle);
+ }
+ delete pCallList;
+ pCallList = null;
+ }
+ else
+ {
+ __pAcceptVisElem->SetOpacity(1.0f);
+ __pRejectVisElem->SetOpacity(1.00f);
+
+ }
+ }
+ else if (__isRejectCallStarted == true)
+ {
+ if (currentPosition.x < ((__pAcceptLabel->GetBounds().x + __pAcceptLabel->GetWidth())- __pRejectLabel->GetBounds().x))
+ {
+ //left dial icon
+ if(__pAcceptFinalVisElem == null)
+ {
+ __pAcceptFinalVisElem = new (std::nothrow) VisualElement();
+ __pAcceptFinalVisElem->Construct();
+ __pAcceptFinalVisElem->SetName(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME);
+ }
+ __pAcceptFinalVisElem->SetBounds(FloatRectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ __pAcceptFinalVisElem->SetOpacity(1.0f);
+
+
+ if(__pAcceptLabel->GetVisualElement()->GetChild(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME,true) == null)
+ {
+ AppLogDebug("AttachChild __pAcceptFinalVisElem");
+ __pAcceptLabel->GetVisualElement()->AttachChild(*__pAcceptFinalVisElem);
+ }
+ Canvas* pCanvas = __pAcceptFinalVisElem->GetCanvasN();
+ if(pCanvas != null)
+ {
+ AppLogDebug("__pAcceptFinalVisElem drawing");
+ pCanvas->SetBackgroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->SetForegroundColor(COLOR_SWIPE_PANEL);
+ pCanvas->FillRectangle(COLOR_SWIPE_PANEL, Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
+ pCanvas->DrawBitmap(Rectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL), *__pRejectCircle);
+ pCanvas->DrawBitmap(Rectangle(DIAL_ICON_X_OFFSET, DIAL_ICON_Y_OFFSET, W_DIAL_BITMAP, H_DIAL_BITMAP), *__pRejectDial);
+ delete pCanvas;
+ }
+ __pRejectVisElem->SetOpacity(0.0f);
+ //Reject the call
+ __pCallPresentor->RejectCall(__incomingCallHandle, false,*__pActiveContactNo);
+ }
+ else
+ {
+ __pAcceptVisElem->SetOpacity(1.0f);
+ __pRejectVisElem->SetOpacity(1.00f);
+
+ }
+ }
+ __isAnswerCallStarted = false;
+ __isRejectCallStarted = false;
+}
+
+void
+IncomingCallForm::OnTouchMoved(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+ if (__isAnswerCallStarted == true)
+ {
+ if (currentPosition.x > 170 && currentPosition.x < 578)
+ {
+ if (currentPosition.x > REJECT_LABEL_X_OFFSET)
+ {
+ __pRejectVisElem->SetOpacity(0.60f);
+ __pAcceptVisElem->SetOpacity(0.60f);
+ }
+ else
+ {
+ __pRejectVisElem->SetOpacity(1.0f);
+ __pAcceptVisElem->SetOpacity(1.0f);
+ }
+
+ }
+ }
+ if (__isRejectCallStarted == true)
+ {
+ if (currentPosition.x < 0 && currentPosition.x > -522)
+ {
+ if (currentPosition.x < ACCEPT_LABEL_RELATIVE_POS)
+ {
+ __pRejectVisElem->SetOpacity(0.60f);
+ __pAcceptVisElem->SetOpacity(0.60f);
+ }
+ else
+ {
+ __pRejectVisElem->SetOpacity(1.0f);
+ __pAcceptVisElem->SetOpacity(1.0f);
+ }
+ }
+ }
+}
+
+void
+IncomingCallForm::OnItemSelected(int itemIndex)
+{
+ ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArgs->Construct();
+
+ //display name, mobile number
+ Integer* argIndex = new (std::nothrow) Integer(itemIndex);
+ pArgs->Add(argIndex);
+ SendUserEvent(REQUEST_ITEM_SELECTED,pArgs);
+}
+
+void
+IncomingCallForm::HandleMultipleCallSelection(int itemIndex)
+{
+ if(__pAcceptLabel->GetVisualElement()->GetChild(IDI_ACCEPT_VISUAL_ELE_NAME,true) == null)
+ {
+ __pAcceptLabel->GetVisualElement()->AttachChild(*__pAcceptVisElem);
+ }
+ if(__pRejectLabel->GetVisualElement()->GetChild(IDI_REJECT_VISUAL_ELE_NAME,true) == null)
+ {
+ __pRejectLabel->GetVisualElement()->AttachChild(*__pRejectVisElem);
+ }
+
+ __pAcceptVisElem->SetOpacity(1.0f);
+ __pRejectVisElem->SetOpacity(1.00f);
+
+ if (__pRejectFinalVisElem != null)
+ {
+ __pRejectFinalVisElem->Destroy();
+ __pRejectFinalVisElem = null;
+ }
+ if (__pAcceptFinalVisElem != null)
+ {
+ __pAcceptFinalVisElem->Destroy();
+ __pAcceptFinalVisElem = null;
+ }
+
+ if (__pOptionPopup)
+ {
+ delete __pOptionPopup;
+ __pOptionPopup = null;
+ }
+ //accept call
+ if(itemIndex != IDA_BUTTON_CANCEL_OPTIONS_POPUP)
+ {
+ __pCallPresentor->AcceptIncomingCall(CallAnsweringOptions(itemIndex),__incomingCallHandle);
+ }
+}
+
+void
+IncomingCallForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
+{
+ switch(requestId)
+ {
+ case REQUEST_ITEM_SELECTED:
+ {
+ if(pArgs != null)
+ {
+ Integer *index = static_cast<Integer*>(pArgs->GetAt(0));
+ if(index != null)
+ {
+ HandleMultipleCallSelection(index->ToInt());
+ }
+ }
+ }
+ break;
+ }
+}
+
+void
+IncomingCallForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
+{
+ AppLogDebug("Enter");
+ HideRejectPanel();
+ //SetFocus();
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage)
+ {
+ pButtonRejectMessage->SetShowState(true);
+ pButtonRejectMessage->Invalidate(true);
+ pButtonRejectMessage->Draw();
+ }
+ RequestRedraw(true);
+
+}
+
+void
+IncomingCallForm::OnOrientationChanged(const Control& source, OrientationStatus orientationStatus)
+{
+
+ Layout* pLayout = GetLayoutN();
+ if (pLayout != null)
+ {
+ pLayout->Update();
+ }
+
+ Panel* pKeysPanel = static_cast<Panel*>(GetControl(IDC_REJECT_PANEL));
+ if(pKeysPanel->GetShowState() == true)
+ {
+ //HideRejectMessagePanel();
+ //ShowRejectMessagePanel();
+ SetRejectMessagePanelBounds();
+ }
+
+ Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+ if (pButtonRejectMessage != null)
+ {
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, false);
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, true);
+ pButtonRejectMessage->Invalidate(true);
+ }
+
+ Button* pButtonReject = static_cast<Button*>(pKeysPanel->GetControl(IDC_REJECT_MESSAGE_CANCEL_BUTTON));
+ if (pButtonReject != null)
+ {
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, false);
+ SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+ IDB_REJECT_MESSAGE_DOWN_ARROW, IDB_REJECT_MESSAGE_ICON, true, true);
+ FloatRectangle allignedrect = CoordinateSystem::AlignToDevice(pButtonReject->GetBoundsF());
+ pButtonReject->SetBounds(allignedrect);
+ pButtonReject->Invalidate(true);
+
+ }
+}
+
+void
+IncomingCallForm::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ //This is done so that when in IncomingCallForm and calloptionpopup is shown , now if
+ // focus goes away from popup by pressing cancel key from the host keyboard the focus shouldnt get lost
+ // but should focus the Reject message button immediately.
+// Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+//Commented for bug N_SE-52277
+ //pButtonRejectMessage->SetFocus();
+ //pButtonRejectMessage->Invalidate(true);
+ __pCallPresentor->OnAppForeground();
+}
+
+void
+IncomingCallForm::OnScreenOff(void)
+{
+ __pCallPresentor->StopAlert();
+}
+
+void
+IncomingCallForm::CallDisconnected(void)
+{
+
+ //check if no call option popup is shown, then remain on incoming call screen.
+ //As user has neither accepted nor rejected incoming call.
+ if ((__pOptionPopup == null) || (__pOptionPopup->GetShowState() == false))
+ {
+ //Resume the alert when there is an incoming call and the already active call is disconnected
+ //Here we start playing the ringtone again
+ AppCallInfo* pIncomingCall = __pCallPresentor->GetIncomingCallHandle();
+ if(pIncomingCall != null)
+ {
+ __pCallPresentor->ResumeAlert(*pIncomingCall);
+ }
+ return;
+ }
+
+ //fetch already active call list and show updated option popup
+ ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pCallPresentor->GetCallListN());
+ if (pCallList != null && pCallList->GetCount() > 0)
+ {
+ //then atleast 1 active call exist.
+ AppCallInfo phnCallInfo;
+ pCallList->GetAt(0,phnCallInfo);
+ //Check if only 1 call exist and it is on Hold
+ if(pCallList->GetCount() == 1 && phnCallInfo.IsOnHold())
+ {
+ //directly accept call
+ __pCallPresentor->AcceptIncomingCall(ANSERWING_OPTION_ACCEPT_CALL,__incomingCallHandle);
+ }
+ else
+ {
+ //Either 1 call exist and not "on Hold".
+ //Or 2 calls exist.
+ if(__pOptionPopup != null)
+ {
+ delete __pOptionPopup;
+ __pOptionPopup = null;
+ }
+ __pOptionPopup = new (std::nothrow) CallOptionPopup(*this,*(__pCallPresentor));
+ __pOptionPopup->Initialize();
+ __pOptionPopup->SetShowState(true);
+ __pOptionPopup->Draw();
+ __pOptionPopup->Show();
+ AppCallInfo* pIncomingCall = __pCallPresentor->GetIncomingCallHandle();
+ if(pIncomingCall != null)
+ {
+ //Resume the alert when there is an incoming call and the already active call is disconnected
+ //Here we start playing the ringtone again
+ __pCallPresentor->ResumeAlert(*pIncomingCall);
+ }
+ }
+ pCallList->RemoveAll();
+ }
+ else
+ {
+ //no active call - Accept the incoming call
+ __pCallPresentor->AcceptIncomingCall(ANSERWING_OPTION_ACCEPT_CALL,__incomingCallHandle);
+ }
+ delete pCallList;
+ pCallList = null;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallInfo.cpp
+ * @brief Call Information class
+ */
+#include "CallAppUtility.h"
+#include "CallInfo.h"
+#include <FMedia.h>
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::Telephony;
+
+AppCallInfo::AppCallInfo(void)
+{
+ //by Default, neither a conference call nor emergency call
+ __isConfCall = false;
+ __isEmergency = false;
+ __callType = VOICE_CALL;
+ __isOnHold = false;
+ __callConnectTime = 0;
+ __durationTime = 0;
+ __callNotificationTime = 0;
+ __pCallHandle = null;
+ __pEndCallCause = null;
+ __pParticipantCallHandles = null;
+ __pContact = null;
+ __pAddressBook = null;
+}
+
+AppCallInfo::~AppCallInfo(void)
+{
+ if (__pCallHandle)
+ {
+ delete __pCallHandle;
+ }
+
+ if (__pEndCallCause)
+ {
+ delete __pEndCallCause;
+ }
+
+ if (__pParticipantCallHandles)
+ {
+ delete __pParticipantCallHandles;
+ __pParticipantCallHandles = null;
+ }
+ if (__pContact != null)
+ {
+ delete __pContact;
+ }
+ if(__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ }
+}
+
+Long*
+AppCallInfo::GetCallHandle(void)
+{
+ return __pCallHandle;
+}
+
+void
+AppCallInfo::SetCallHandle(unsigned int handle)
+{
+ if (__pCallHandle != null)
+ {
+ delete __pCallHandle;
+ }
+ __pCallHandle = new (std::nothrow) Long(handle);
+}
+
+bool
+AppCallInfo::IsConferenceCall(void)
+{
+ return __isConfCall;
+}
+
+void
+AppCallInfo::SetConference(bool isConferenceCall)
+{
+ __isConfCall = isConferenceCall;
+}
+
+bool
+AppCallInfo::IsEmergency(void)
+{
+ return __isEmergency;
+}
+
+void
+AppCallInfo::SetEmergency(bool isEmergency)
+{
+ __isEmergency = isEmergency;
+}
+
+String&
+AppCallInfo::GetContactNumber(void)
+{
+ return __contactNumber;
+}
+
+void
+AppCallInfo::ResetContactNumber(String* contactNumber)
+{
+ if(contactNumber == null)
+ {
+ if (__isConfCall == false)
+ {
+ __contactNumber = null;
+ }
+ }
+
+}
+
+void
+AppCallInfo::ResetContactInfo(const Contact* contact)
+{
+ if(contact == null)
+ {
+ if (__pContact != null)
+ {
+ delete __pContact;
+ __pContact = null;
+ }
+ }
+}
+void
+AppCallInfo::SetContactNumber(String& contactNumber)
+{
+ if (__isConfCall == false)
+ {
+ __contactNumber = contactNumber;
+ }
+}
+
+void
+AppCallInfo::SetContactInfo(const Contact& contact)
+{
+ if (__pContact != null)
+ {
+ delete __pContact;
+ __pContact = null;
+ }
+ __pContact = new (std::nothrow) Contact(contact);
+}
+
+bool
+AppCallInfo::IsOnHold(void)
+{
+ return __isOnHold;
+}
+
+void
+AppCallInfo::SetOnHold(bool onHold)
+{
+ __isOnHold = onHold;
+}
+
+long long
+AppCallInfo::GetCallConnectTime(void)
+{
+ return __callConnectTime;
+}
+
+void
+AppCallInfo::SetCallConnectTime(long long connectTime)
+{
+ __callConnectTime = connectTime;
+}
+
+void
+AppCallInfo::SetDurationTime(long long durationTime)
+{
+ __durationTime = durationTime;
+}
+
+long long
+AppCallInfo::GetCallNotificationTime(void)
+{
+ return __callNotificationTime;
+}
+
+long long
+AppCallInfo::GetDurationTime(void)
+{
+ return __durationTime;
+}
+
+void
+AppCallInfo::SetCallNotificationTime(long long callNotificationTime)
+{
+ __callNotificationTime = callNotificationTime;
+}
+
+String&
+AppCallInfo::GetEndCallCause(void)
+{
+ return *(__pEndCallCause);
+}
+
+void
+AppCallInfo::SetEndCallCause(String& pEndCause)
+{
+ if (__pEndCallCause != null)
+ {
+ delete __pEndCallCause;
+ }
+ __pEndCallCause = new (std::nothrow) String(pEndCause);
+}
+
+IListT<AppCallInfo>*
+AppCallInfo::GetCallerList(void)
+{
+ return __pParticipantCallHandles;
+}
+
+int
+AppCallInfo::GetCallerListCount(void)
+{
+ if (__pParticipantCallHandles != null)
+ {
+ return __pParticipantCallHandles->GetCount();
+ }
+ return -1;
+}
+
+result
+AppCallInfo::AddCallToCallerList(AppCallInfo& callInfo)
+{
+ if (__pParticipantCallHandles == NULL)
+ {
+ __pParticipantCallHandles = new (std::nothrow) ArrayListT<AppCallInfo>();
+ }
+ result r = E_FAILURE;
+ AppCallInfo* pNewCallInfo = new (std::nothrow) AppCallInfo();
+ *pNewCallInfo = callInfo;
+ r = __pParticipantCallHandles->Add(*pNewCallInfo);
+ pNewCallInfo = NULL;
+ return r;
+}
+
+result
+AppCallInfo::RemoveCallFromCallerList(int index)
+{
+ result r = E_FAILURE;
+ if (__pParticipantCallHandles == NULL)
+ {
+ return r;
+ }
+ r = __pParticipantCallHandles->RemoveAt(index);
+ return r;
+}
+
+void
+AppCallInfo::SetCalllogType(CallLogType callLogType)
+{
+ __calllogType = callLogType;
+}
+
+CallLogType
+AppCallInfo::GetCalllogType(void)
+{
+ return __calllogType;
+}
+
+bool
+AppCallInfo::operator ==(const AppCallInfo& rhs) const
+{
+ return (this->__pCallHandle->Equals(*(rhs.__pCallHandle)));
+}
+
+bool
+AppCallInfo::operator !=(const AppCallInfo& rhs) const
+{
+ return (!(this->__pCallHandle->Equals(*(rhs.__pCallHandle))));
+}
+
+AppCallInfo&
+AppCallInfo::operator =(const AppCallInfo& rhs)
+{
+ if (this != null)
+ {
+ this->__isConfCall = rhs.__isConfCall;
+ this->__callType = rhs.__callType;
+ this->__isEmergency = rhs.__isEmergency;
+ this->__contactNumber = rhs.__contactNumber;
+ this->__isOnHold = rhs.__isOnHold;
+ //call connected time
+ this->__callConnectTime = rhs.__callConnectTime;
+ this->__durationTime = rhs.__durationTime;
+ //call notification time
+ this->__callNotificationTime = rhs.__callNotificationTime;
+ this->__calllogType = rhs.__calllogType;
+ //copy call handle, if exist
+ if (this->__pCallHandle != null)
+ {
+ delete this->__pCallHandle;
+ this->__pCallHandle = null;
+ }
+ if (rhs.__pCallHandle != null)
+ {
+ this->__pCallHandle = new (std::nothrow) Long(*(rhs.__pCallHandle));
+ }
+
+ //copy end call cause, if any exist
+ if (this->__pEndCallCause != null)
+ {
+ delete this->__pEndCallCause;
+ this->__pEndCallCause = null;
+ }
+ if (rhs.__pEndCallCause)
+ {
+ this->__pEndCallCause = new (std::nothrow) String(*(rhs.__pEndCallCause));
+ }
+
+ //Add participant call list
+ if (this->__pParticipantCallHandles != null)
+ {
+ delete this->__pParticipantCallHandles;
+ this->__pParticipantCallHandles = null;
+ }
+ if (rhs.__pParticipantCallHandles != null)
+ {
+ this->__pParticipantCallHandles = new (std::nothrow) ArrayListT<AppCallInfo>();
+ this->__pParticipantCallHandles->Construct(*(rhs.__pParticipantCallHandles));
+ }
+ if (this->__pContact != null)
+ {
+ delete this->__pContact;
+ this->__pContact = null;
+ }
+ if (rhs.__pContact != null)
+ {
+ this->__pContact = new (std::nothrow) Contact(*(rhs.__pContact));
+ }
+ }
+
+ return *this;
+}
+
+String*
+AppCallInfo::FetchCallerNameN(void)
+{
+ String displayName(L"");
+ //get caller name from already fetched contact info
+ if (__pContact != null)
+ {
+ //fetch name to be displayed
+ String firstName(L"");
+ String lastName(L"");
+ String middlename(L"");
+ __pContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
+ __pContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
+ __pContact->GetValue(CONTACT_PROPERTY_ID_MIDDLE_NAME, middlename);
+ displayName.Append(firstName + middlename + lastName);
+
+ if (displayName.IsEmpty() == false)
+ {
+ __pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ }
+ }
+
+ return new (std::nothrow) String(displayName);
+}
+
+Contact*
+AppCallInfo::FetchContactN(const Tizen::Base::String& phoneNumber)
+{
+ Tizen::Social::Contact* pFoundContact = null;
+ if(__pAddressBook == null)
+ {
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ }
+ IList* pContactList = __pAddressBook->SearchContactsByPhoneNumberN(phoneNumber);
+ if (pContactList == null || IsFailed(GetLastResult()))
+ {
+ return null;
+ }
+
+ //Fetch the contact's info to be displayed
+ IEnumerator* pContactEnum = pContactList->GetEnumeratorN();
+ while (E_SUCCESS == pContactEnum->MoveNext())
+ {
+ Contact* pContact = static_cast<Contact*>(pContactEnum->GetCurrent());
+
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetPhoneNumber().Equals(phoneNumber))
+ {
+ //save newly fetched contact info.
+ pFoundContact = new (std::nothrow) Contact(*pContact);
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ if(pFoundContact != null)
+ {
+ break;
+ }
+ }
+ delete pContactEnum;
+ pContactList->RemoveAll(true);
+ delete pContactList;
+
+ if(pFoundContact == null)
+ {
+ return null;
+ }
+
+ return pFoundContact;
+
+}
+
+
+String*
+AppCallInfo::FetchLatestCallerNameN(const Tizen::Base::String& phoneNumber)
+{
+ String displayName(L"");
+ Tizen::Social::Contact* pContact = null;
+ //Fetch the contact for a number from address book
+ pContact = FetchContactN(phoneNumber);
+ if(pContact != null)
+ {
+ String firstName(L"");
+ String lastName(L"");
+ String middlename(L"");
+ pContact->GetValue(CONTACT_PROPERTY_ID_FIRST_NAME, firstName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_LAST_NAME, lastName);
+ pContact->GetValue(CONTACT_PROPERTY_ID_MIDDLE_NAME, middlename);
+ displayName.Append(firstName + middlename + lastName);
+
+ if (displayName.IsEmpty() == false)
+ {
+ pContact->GetValue(CONTACT_PROPERTY_ID_DISPLAY_NAME, displayName);
+ }
+ delete pContact;
+ }
+
+ return new (std::nothrow) String(displayName);
+
+
+}
+Bitmap*
+AppCallInfo::FetchLatestCallerPhotoN(const Tizen::Base::String& phoneNumber)
+{
+ result r = E_FAILURE;
+ Tizen::Social::Contact* pContact = null;
+ String thumbnailPath;
+ Bitmap* pThumbnail = null;
+ pContact = FetchContactN(phoneNumber);
+ if(pContact != null)
+ {
+ pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL,thumbnailPath);
+ if(thumbnailPath.IsEmpty() == true)
+ {
+ IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(pContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ AppLogDebug("Changes to get thumbnail group photo");
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ thumbnailPath = pCategory->GetThumbnailPath();
+ }
+ }
+ delete pContact;
+ ImageBuffer thumbnailImageBuffer;
+ r = thumbnailImageBuffer.Construct(thumbnailPath);
+ if (r == E_SUCCESS)
+ {
+ pThumbnail = thumbnailImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
+ }
+
+ if(pThumbnail != null)
+ {
+ return pThumbnail;
+ }
+ }
+
+ return null;
+
+}
+
+Bitmap*
+AppCallInfo::FetchCallerPhotoN(void)
+{
+
+ if (__pContact != null)
+ {
+ String thumbnailPath;
+ Bitmap* pThumbnail = null;
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+
+ result r = __pContact->GetValue(CONTACT_PROPERTY_ID_THUMBNAIL, thumbnailPath);
+ //Now check if there is a group ring tone
+ if(thumbnailPath.IsEmpty() == true)
+ {
+ IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(__pContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ AppLogDebug("Changes to get thumbnail group photo");
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ thumbnailPath = pCategory->GetThumbnailPath();
+ }
+ }
+ //thumbnailPath = __pContact->GetThumbnailPath();
+ ImageBuffer thumbnailImageBuffer;
+ r = thumbnailImageBuffer.Construct(thumbnailPath);
+ if (r == E_SUCCESS)
+ {
+ pThumbnail = thumbnailImageBuffer.GetBitmapN(BITMAP_PIXEL_FORMAT_ARGB8888, BUFFER_SCALING_NONE);
+ }
+ return pThumbnail;
+ }
+ return null;
+}
+
+const Contact*
+AppCallInfo::GetContactInfo(void)
+{
+ return __pContact;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallOptionPopup.cpp
+ * @brief Call Options Popup class
+ */
+#include <FApp.h>
+#include <FSocial.h>
+#include <FSystem.h>
+#include <FUi.h>
+#include <FGraphics.h>
+#include <FMedia.h>
+
+#include "CallOptionPopup.h"
+#include "CallAppUtility.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+const int W_POPUP = 620;
+const int H_POPUP = 712;
+const int W_CANCEL_BUTTON = 400;
+const int H_CANCEL_BUTTON = 72;
+const int CANCEL_BUTTON_PADDING = 20;
+const int H_LIST_ITEM = 112;
+const int W_LIST_ITEM = 112;
+const int HORIZONTAL_PADDING = 16;
+const int VERTICAL_PADDING = 110;
+const int IDA_BUTTON_CANCEL_OPTIONS_POPUP = 502;
+static const wchar_t* IDL_CALL_OPTION_POPUP = L"IDL_CALL_OPTION_POPUP";
+
+CallOptionPopup::CallOptionPopup(IPopupItemSelectListener& listener, CallPresentationModel& callPresenter)
+ : __pOptionsList(null)
+ , __popupListener(listener)
+ , __callPresenter(callPresenter)
+{
+}
+
+CallOptionPopup::~CallOptionPopup(void)
+{
+ if (__pOptionsList != null)
+ {
+ delete __pOptionsList;
+ __pOptionsList = null;
+ }
+}
+
+result
+CallOptionPopup::Initialize(void)
+{
+ result r = E_SUCCESS;
+ r = Construct(IDL_CALL_OPTION_POPUP);
+ TryReturn(r == E_SUCCESS, r, "CallOptionPopup construction failed");
+
+ r = ConstructListData();
+ TryReturn(r == E_SUCCESS, r, "List data not available");
+
+ int listHeight = H_LIST_ITEM * __pOptionsList->GetCount();
+ int popupHeight = H_CANCEL_BUTTON + listHeight + CANCEL_BUTTON_PADDING + VERTICAL_PADDING;
+ r = SetSize(Dimension(W_POPUP + HORIZONTAL_PADDING, popupHeight));
+ TryReturn(r == E_SUCCESS, r, "CallOptionPopup::SetSize() failed");
+ SetMinimumSize(Dimension(W_POPUP + HORIZONTAL_PADDING, popupHeight));
+ TryReturn(r == E_SUCCESS, r, "CallOptionPopup::SetMinSize() failed");
+
+ String strText;
+ Application::GetInstance()->GetAppResource()->GetString(L"IDS_CANCEL", strText);
+ Button* pCancelButton = new (std::nothrow) Button();
+ r = pCancelButton->Construct(Rectangle(VERTICAL_PADDING, listHeight + CANCEL_BUTTON_PADDING , W_CANCEL_BUTTON, H_CANCEL_BUTTON), strText);
+ pCancelButton->SetActionId(IDA_BUTTON_CANCEL_OPTIONS_POPUP);
+ pCancelButton->AddActionEventListener(*this);
+ SetPropagatedKeyEventListener(this);
+ r = AddControl(pCancelButton);
+ TryReturn(r == E_SUCCESS, r, "CallOptionPopup::AddControl() failed");
+
+ ListView* pListView = new (std::nothrow) ListView();
+ pListView->Construct(Rectangle(0, 0, W_POPUP + HORIZONTAL_PADDING, listHeight), true, SCROLL_STYLE_FADE_OUT);
+ pListView->AddListViewItemEventListener(*this);
+ pListView->SetItemProvider(*this);
+ r = AddControl(pListView);
+
+
+
+ return r;
+}
+
+result
+CallOptionPopup::ConstructListData(void)
+{
+ result r = E_FAILURE;
+
+ //fetch active call list
+ ArrayListT<AppCallInfo>* pCallList = static_cast<ArrayListT<AppCallInfo>*>(__callPresenter.GetCallListN());
+ if (pCallList != null && pCallList->GetCount() > 0)
+ {
+ String optionStr(L"");
+ String* pFirstOption = new (std::nothrow) String();
+ String* pSecondOption = new (std::nothrow) String();
+ String* pThirdOption = null;
+ if (pCallList->GetCount() == IDI_MAX_ACTIVE_CALLS)
+ {
+ //2 calls(Active+Held) present - 3 options are shown
+ for (int index = 0;index < pCallList->GetCount(); index++)
+ {
+ AppCallInfo callInfo;
+ pCallList->GetAt(index,callInfo);
+
+ optionStr.Clear();
+ if (callInfo.IsConferenceCall() == true)
+ {
+ String option = AppUtility::GetResourceString(L"IDS_CALL_OPTION4");;
+ if (callInfo.IsOnHold() == true)
+ {
+ option = AppUtility::GetResourceString(L"IDS_CALL_OPTION3");
+ }
+ optionStr.Format(option.GetLength(), option.GetPointer(), callInfo.GetCallerListCount());
+ }
+ else
+ {
+ //show display name, if available, Else show contact number
+ String* pDisplayName = null;
+ if(callInfo.GetContactNumber().IsEmpty() == false)
+ {
+ pDisplayName = callInfo.FetchLatestCallerNameN(callInfo.GetContactNumber());
+ }
+ else
+ {
+ pDisplayName = new (std::nothrow) String(L"");
+ }
+ if (pDisplayName->IsEmpty() == true)
+ {
+ //If contact number is also not present show unknown
+ if(callInfo.GetContactNumber().IsEmpty() == false)
+ {
+ pDisplayName->Append(callInfo.GetContactNumber());
+ }
+ else
+ {
+ pDisplayName->Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+ }
+ optionStr = AppUtility::GetResourceString(L"IDS_CALL_OPTION5");
+ optionStr.Append(*pDisplayName);
+ delete pDisplayName;
+ }
+
+ //Check whether to show as 1st or 2nd option
+ if (callInfo.IsOnHold() == false)
+ {
+ pFirstOption->Append(optionStr);
+ }
+ else
+ {
+ pSecondOption->Append(optionStr);
+ }
+ }
+ //3rd Option
+ pThirdOption = new (std::nothrow) String();
+ pThirdOption->Append(AppUtility::GetResourceString(L"IDS_CALL_OPTION6"));
+ }
+ else
+ {
+ //only one call - 2 options are shown.
+ AppCallInfo firstCallInfo;
+ pCallList->GetAt(0,firstCallInfo);
+ if (firstCallInfo.IsConferenceCall() == false)
+ {
+ //show display name if available, else show contact number
+ String* pDisplayName = null;
+ if(firstCallInfo.GetContactNumber().IsEmpty() == false)
+ {
+ pDisplayName = firstCallInfo.FetchLatestCallerNameN(firstCallInfo.GetContactNumber());
+ }
+ else
+ {
+ pDisplayName = new (std::nothrow) String(L"");
+ }
+ if (pDisplayName->IsEmpty() == true)
+ {
+ if(firstCallInfo.GetContactNumber().IsEmpty() == false)
+ {
+ pDisplayName->Append(firstCallInfo.GetContactNumber());
+ }
+ else
+ {
+ pDisplayName->Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
+ }
+ }
+ optionStr = AppUtility::GetResourceString(L"IDS_CALL_OPTION1");
+ pFirstOption->Format((optionStr.GetLength() + pDisplayName->GetLength()),optionStr.GetPointer(),pDisplayName->GetPointer());
+ //2nd option
+ optionStr = AppUtility::GetResourceString(L"IDS_CALL_OPTION2");
+ pSecondOption->Append(optionStr + *pDisplayName);
+ delete pDisplayName;
+ }
+ else
+ {
+ String optionStr2(L"");
+ if (firstCallInfo.IsOnHold() == true)
+ {
+ optionStr = AppUtility::GetResourceString(L"IDS_CALL_OPTION8");
+ optionStr2 = AppUtility::GetResourceString(L"IDS_CALL_OPTION3");
+ }
+ else
+ {
+ optionStr = AppUtility::GetResourceString(L"IDS_CALL_OPTION7");
+ optionStr2 = AppUtility::GetResourceString(L"IDS_CALL_OPTION4");
+ }
+ pFirstOption->Format(optionStr.GetLength(), optionStr.GetPointer(), firstCallInfo.GetCallerListCount());
+ pSecondOption->Format(optionStr2.GetLength(), optionStr2.GetPointer(), firstCallInfo.GetCallerListCount());
+ }
+ }
+ //show options
+ __pOptionsList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ __pOptionsList->Construct();
+ __pOptionsList->Add(pFirstOption);
+ __pOptionsList->Add(pSecondOption);
+ if (pThirdOption != null)
+ {
+ __pOptionsList->Add(pThirdOption);
+ }
+ r = E_SUCCESS;
+ pCallList->RemoveAll();
+ }
+ delete pCallList;
+ return r;
+}
+
+void
+CallOptionPopup::OnListViewItemStateChanged(ListView& listView, int index,
+ int elementId, ListItemStatus status)
+{
+ Popup::SetShowState(false);
+ if(elementId == -1)
+ {
+ elementId = ANSERWING_OPTION_HOLD_SINGLE_CALL;
+ if (__pOptionsList->GetCount() == 2)
+ {
+ if(index == 1)
+ {
+ elementId = ANSERWING_OPTION_END_SINGLE_CALL;
+ }
+ }
+ else
+ {
+ elementId = ANSERWING_OPTION_REPLACE_ACTIVE_CALL;
+ if(index == 1)
+ {
+ elementId = ANSERWING_OPTION_REPLACE_HELD_CALL;
+ }
+ else if(index == 2)
+ {
+ elementId = ANSERWING_OPTION_END_ALL_CALLS;
+ }
+ }
+ }
+ __popupListener.OnItemSelected(elementId);
+ return;
+}
+
+int
+CallOptionPopup::GetItemCount(void)
+{
+ if (__pOptionsList != null)
+ {
+ return __pOptionsList->GetCount();
+ }
+ return 0;
+}
+
+ListItemBase*
+CallOptionPopup::CreateItem(int index, int itemWidth)
+{
+ int elementId = ANSERWING_OPTION_HOLD_SINGLE_CALL;
+ String* strText = static_cast<String*>(__pOptionsList->GetAt(index));
+ ListAnnexStyle style = LIST_ANNEX_STYLE_NORMAL;
+ CustomItem* pItem = new CustomItem();
+ pItem->Construct(Dimension(itemWidth, W_LIST_ITEM), style);
+ if (__pOptionsList->GetCount() == 2)
+ {
+ if(index == 1)
+ {
+ elementId = ANSERWING_OPTION_END_SINGLE_CALL;
+ }
+ }
+ else
+ {
+ elementId = ANSERWING_OPTION_REPLACE_ACTIVE_CALL;
+ if(index == 1)
+ {
+ elementId = ANSERWING_OPTION_REPLACE_HELD_CALL;
+ }
+ else if(index == 2)
+ {
+ elementId = ANSERWING_OPTION_END_ALL_CALLS;
+ }
+ }
+ pItem->AddElement(Rectangle(HORIZONTAL_PADDING, 0, W_POPUP - HORIZONTAL_PADDING, H_LIST_ITEM), elementId, *strText);
+ return pItem;
+}
+
+bool
+CallOptionPopup::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
+{
+ delete pItem;
+ pItem = null;
+ return true;
+}
+
+void
+CallOptionPopup::OnActionPerformed(const Control& source, int actionId)
+{
+ switch (actionId)
+ {
+ case IDA_BUTTON_CANCEL_OPTIONS_POPUP:
+ {
+ Popup::SetShowState(false);
+ __popupListener.OnItemSelected(IDA_BUTTON_CANCEL_OPTIONS_POPUP);
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+bool
+CallOptionPopup::OnKeyReleased(Control& source, const KeyEventInfo& keyEventInfo)
+{
+ AppLogDebug("Enter");
+ if(keyEventInfo.GetKeyCode() == KEY_BACK || keyEventInfo.GetKeyCode() == KEY_ESC)
+ {
+ Popup::SetShowState(false);
+ __popupListener.OnItemSelected(IDA_BUTTON_CANCEL_OPTIONS_POPUP);
+ return true;
+
+ }
+ return false;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallPanelFactory.cpp
+ * @brief The Panel factory for Dial application
+ */
+
+#include "CallPanelFactory.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+
+PanelFactory::PanelFactory(void)
+{
+}
+
+PanelFactory::~PanelFactory(void)
+{
+}
+
+Panel*
+PanelFactory::CreatePanelN(const String& panelId, const SceneId& sceneId)
+{
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+ Panel* pNewPanel = null;
+ return pNewPanel;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallPresentationModel.cpp
+ * @brief Call Presentation model class
+ */
+#include <FApp.h>
+#include <FUi.h>
+#include <FMedia.h>
+#include <FShell.h>
+#include "CallApp.h"
+#include "CallAppControlRequestMgr.h"
+#include "CallActiveCallForm.h"
+#include "CallAppUtility.h"
+#include "CallInfo.h"
+#include "CallPresentationModel.h"
+#include "CallSettingsPresentationModel.h"
+#include "CallConfCallerListForm.h"
+#include "CallTelephonyManager.h"
+#include "CallSceneRegister.h"
+#include "CallTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::Messaging;
+using namespace Tizen::Shell;
+
+CallPresentationModel* CallPresentationModel::__pInstance = null;
+
+CallPresentationModel::CallPresentationModel(void)
+{
+ __pTelephonyMgr = null;
+ __pTelEventListener = null;
+ __pSettingsPresentor = null;
+ __isMessageAppControlRunning = false;
+ __isDialAppControlRunning = false;
+ __pAppControlMgr = null;
+ __pNetworkManager = null;
+ __psimStateManager = null;
+ __psimInfo = null;
+ __pSmsManager = null;
+ __isMessageSendInProgress = false;
+ __pNotificationManager = null;
+}
+
+CallPresentationModel::~CallPresentationModel(void)
+{
+ AppControl::StopAppControlResponseListener(this);
+ __pTelephonyMgr = null;
+ __pSettingsPresentor = null;
+ __pAppControlMgr =null;
+ if(__pNetworkManager != null)
+ {
+ delete __pNetworkManager;
+ __pNetworkManager = null;
+ }
+ if(__psimStateManager != null)
+ {
+ delete __psimStateManager;
+ __psimStateManager = null;
+ }
+ if(__psimInfo != null)
+ {
+ delete __psimInfo;
+ __psimInfo = null;
+ }
+ if(__pSmsManager != null)
+ {
+ delete __pSmsManager;
+ __pSmsManager = null;
+ }
+ if(__pNotificationManager != null)
+ {
+ __pNotificationManager->Notify(0);
+ __pNotificationManager->RemoveNotification();
+ delete __pNotificationManager;
+ __pNotificationManager = null;
+ }
+}
+
+void
+CallPresentationModel::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) CallPresentationModel();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+
+ std::atexit(DestroyInstance);
+}
+
+CallPresentationModel*
+CallPresentationModel::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+CallPresentationModel::DestroyInstance(void)
+{
+ if (__pInstance != null)
+ {
+ delete __pInstance;
+ __pInstance = null;
+ }
+}
+
+result
+CallPresentationModel::Construct(void)
+{
+ //Fetch Telephony Manager
+ __pTelephonyMgr = TelephonyManager::GetInstance(this);
+ __pSettingsPresentor = SettingsPresentationModel::GetInstance();
+ __pAppControlMgr = CallAppControlRequestMgr::GetInstance();
+ __pNetworkManager = new (std::nothrow)NetworkManager();
+ __pNetworkManager->Construct(null);
+ __pNotificationManager = new (std::nothrow) Tizen::Shell::NotificationManager;
+ __pNotificationManager->Construct();
+ GetSimInfo();
+ return E_SUCCESS;
+}
+
+void
+CallPresentationModel::SetTelEventListener(ITelephonyEventListener* pTelEventListener)
+{
+ //set form as telephony event listener
+ __pTelEventListener = pTelEventListener;
+}
+
+bool
+CallPresentationModel::IfNumberEndsWithHash(Tizen::Base::String& phoneNumber)
+{
+ String phoneNumberEndingWithHash(L"#$");
+ RegularExpression checkHash;
+ checkHash.Construct(phoneNumberEndingWithHash);
+ bool endsWithHash = checkHash.Match(phoneNumber,false);
+ if(endsWithHash == true)
+ {
+ return true;
+ }
+ return false;
+}
+
+void
+CallPresentationModel::DialCall(String& contactNumber, bool isEmergency)
+{
+ int errorCode = ERROR_NONE;
+ bool isCallServiceAvailable = false;
+ bool numberEndsWithHash = false;
+ NetworkStatus networkStatus;
+ result r;
+ //Check if Telephony Manager is initialized
+ TryCatch(__pTelephonyMgr != null, (errorCode = ERROR_TAPI_INIT_FAILED), "TAPI initialization failed");
+
+ //check if phone is in flight mode
+ if(__pSettingsPresentor != null && __pSettingsPresentor->GetFlightModeStatus() == true)
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_FLIGHT_MODE_SET);
+ return;
+ }
+ //Check if dialing a call is possible - Check if sim is available
+ if (IsSimAvailable() == false)
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_CODE_SIM_INITIALIZATION_FAILED);
+ return ;
+ }
+
+ //fetch call service status
+ if(__pNetworkManager != null)
+ {
+ r = __pNetworkManager->GetNetworkStatus(networkStatus);
+ if (r == E_SUCCESS)
+ {
+ isCallServiceAvailable = networkStatus.IsCallServiceAvailable();
+ }
+ }
+
+
+ if (isCallServiceAvailable == false)
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_SERVICE_UNAVAILABLE);
+ return ;
+ }
+ // check if GPRS number
+ numberEndsWithHash = IfNumberEndsWithHash(contactNumber);
+ if(numberEndsWithHash == true)
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_USSD_NUMBER);
+ return ;
+ }
+
+ //setup outgoing call
+ errorCode = __pTelephonyMgr->SetupMoCall(contactNumber, isEmergency);
+ TryCatch(errorCode == ERROR_NONE,,"Error occurred while setup MO call");
+ if(__pSettingsPresentor != null)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_CONNECTING);
+ }
+ return;
+
+CATCH:
+ __pTelEventListener->HandleTelephonyError(errorCode);
+}
+
+void
+CallPresentationModel::EndActiveCall(Long callHandle)
+{
+ if(__pTelephonyMgr != null)
+ {
+ __pTelephonyMgr->EndActiveCall(callHandle);
+ }
+}
+
+void
+CallPresentationModel::EndDialingCall(String& contactNumber)
+{
+ if(__pTelephonyMgr != null)
+ {
+ __pTelephonyMgr->EndDialingCall(contactNumber);
+ }
+}
+
+bool
+CallPresentationModel::EndConferenceCall(void)
+{
+ result r = __pTelephonyMgr->EndConferenceCall();
+ if (IsFailed(r))
+ {
+ //TODO: send proper error code
+ __pTelEventListener->HandleTelephonyError(ERROR_GENERAL);
+ return false;
+ }
+ return true;
+}
+
+void
+CallPresentationModel::EndAllCall(void)
+{
+ if(__pTelephonyMgr != null)
+ {
+ __pTelephonyMgr->EndAllCalls();
+ }
+}
+bool
+CallPresentationModel::HoldCall(Tizen::Base::Long callHandle)
+{
+ result r = __pTelephonyMgr->HoldCall(callHandle, true);
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::UnHoldCall(Tizen::Base::Long callHandle)
+{
+ result r = __pTelephonyMgr->HoldCall(callHandle, false);
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::HoldConferenceCall(void)
+{
+ result r = __pTelephonyMgr->HoldConferenceCall(true);
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::ActivateConferenceCall(void)
+{
+ result r = __pTelephonyMgr->HoldConferenceCall(false);
+ return (!IsFailed(r));
+}
+
+void
+CallPresentationModel::JoinCall(void)
+{
+ result r = __pTelephonyMgr->JoinCall();
+ if (IsFailed(r))
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_JOIN_FAILED);
+ }
+}
+
+void
+CallPresentationModel::SwapCalls(void)
+{
+ result r = __pTelephonyMgr->SwapCalls();
+ if (IsFailed(r))
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_SWAP_FAILED);
+ }
+}
+
+bool
+CallPresentationModel::SetMuteStatus(bool setMute)
+{
+ result r = __pTelephonyMgr->SetMuteStatus(setMute);
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::IsCallMuted(void)
+{
+ return __pTelephonyMgr->IsCallMuted();
+}
+
+bool
+CallPresentationModel::SetSpeakerStatus(bool setSpeaker)
+{
+ result r = __pTelephonyMgr->SetSpeakerStatus(setSpeaker);
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::IsSpeakerOn(void)
+{
+ return __pTelephonyMgr->IsSpeakerOn();
+}
+void
+CallPresentationModel::SendDTMFSignal(String& textToBeSent)
+{
+ __pTelephonyMgr->SendCallDTMF(textToBeSent);
+}
+
+AppCallInfo*
+CallPresentationModel::GetConferenceCallInfoN(void)
+{
+ return __pTelephonyMgr->GetConferenceCallInfoN();
+}
+
+bool
+CallPresentationModel::SplitFromConference(SplitConfCallerCmdIds splitCallerCmdId, IListT<AppCallInfo>* pConfCallList)
+{
+ int callIndex = -1;
+ AppCallInfo callToBeSpli;
+ switch (splitCallerCmdId)
+ {
+ case IDA_SPLIT_CALLER1:
+ callIndex = 0;
+ break;
+
+ case IDA_SPLIT_CALLER2:
+ callIndex = 1;
+ break;
+
+ case IDA_SPLIT_CALLER3:
+ callIndex = 2;
+ break;
+
+ case IDA_SPLIT_CALLER4:
+ callIndex = 3;
+ break;
+
+ case IDA_SPLIT_CALLER5:
+ callIndex = 4;
+ break;
+
+ default:
+ break;
+ }
+
+ result r = pConfCallList->GetAt(callIndex, callToBeSpli);
+ TryCatch(r == E_SUCCESS,,"conf. call list corrupted");
+ //split single call from conference
+ r = __pTelephonyMgr->SplitFromConference(callToBeSpli.GetCallHandle()->ToLong());
+ TryCatch(r == E_SUCCESS,,"Split from conf. call failed");
+ return true;
+
+CATCH:
+ __pTelEventListener->HandleTelephonyError(ERROR_SPLIT_FROM_CONFERENCE_FAILED);
+ return false;
+}
+
+void
+CallPresentationModel::EndCallFromConference(EndConfCallerCmdIds endCallerCmdId, IListT<AppCallInfo>* pConfCallList)
+{
+ int callIndex = -1;
+ AppCallInfo callToBeEnded;
+ switch (endCallerCmdId)
+ {
+ case IDA_END_CALLER1:
+ callIndex = 0;
+ break;
+
+ case IDA_END_CALLER2:
+ callIndex = 1;
+ break;
+
+ case IDA_END_CALLER3:
+ callIndex = 2;
+ break;
+
+ case IDA_END_CALLER4:
+ callIndex = 3;
+ break;
+
+ case IDA_END_CALLER5:
+ callIndex = 4;
+ break;
+
+ default:
+ break;
+ }
+
+ result r = pConfCallList->GetAt(callIndex, callToBeEnded);
+ TryCatch(r == E_SUCCESS,,"conference call list corrupted");
+ //end single call
+ r = __pTelephonyMgr->EndFromConference(callToBeEnded.GetCallHandle()->ToLong());
+ TryCatch(r == E_SUCCESS,,"End single call from conference call failed");
+
+ return;
+
+CATCH:
+ __pTelEventListener->HandleTelephonyError(ERROR_END_CALL_FAILED);
+ return;
+}
+
+bool
+CallPresentationModel::IsSplitAllowed(void)
+{
+ return __pTelephonyMgr->IsSplitAllowed();
+}
+
+void
+CallPresentationModel::AcceptIncomingCall(CallAnsweringOptions answerOptions,int callHandle)
+{
+ result r = E_FAILURE;
+ if (answerOptions == ANSERWING_OPTION_ACCEPT_CALL)
+ {
+ r = __pTelephonyMgr->AnswerCall(callHandle, true);
+ }
+ else
+ {
+ r = __pTelephonyMgr->AcceptCall(answerOptions,callHandle);
+ }
+ if (IsFailed(r))
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_GENERAL);
+ }
+}
+
+IListT<AppCallInfo>*
+CallPresentationModel::GetCallListN(void)
+{
+ return __pTelephonyMgr->GetCallListN();
+}
+
+
+bool
+CallPresentationModel::RejectCall(int callHandle, bool sendMsg, const String& contactNumber)
+{
+ AppLogDebug("Enter %d",callHandle);
+ if (sendMsg == true && __pAppControlMgr != null)
+ {
+ //launch compose message AppControl
+ __isMessageAppControlRunning = __pAppControlMgr->LaunchComposeMessageAppControl(*(const_cast<String*>(&contactNumber)), this);
+ }
+ result r = __pTelephonyMgr->AnswerCall(callHandle, false);
+ if (IsFailed(r))
+ {
+ __pTelEventListener->HandleTelephonyError(ERROR_GENERAL);
+ return false;
+ }
+
+
+ AppLogDebug("Exit");
+ return true;
+}
+
+void CallPresentationModel::OnAppForeground(void)
+{
+ AppLogDebug("Enter %d %d",__isDialAppControlRunning ,__isMessageAppControlRunning);
+ if (__isDialAppControlRunning == true)
+ {
+ //This comes here, when Dialer AppControl is finished working.
+ __isDialAppControlRunning = false;
+ __pAppControlMgr->AppControlRequestCompleted();
+ }
+ if (__isMessageAppControlRunning == true)
+ {
+ //This comes here, when Message AppControl is finished working.
+ __isMessageAppControlRunning = false;
+ __pAppControlMgr->AppControlRequestCompleted();
+ //Check if this was the last call, then terminate application.
+ //And if any calls are active, then those cases are already handled from Other places.
+ if( GetCurrentCallCount() == 0 && IsIncomingorDialingCallPresent() == false)
+ {
+ CallApp* pCallApp = static_cast<CallApp*>(UiApp::GetInstance());
+ pCallApp->Terminate();
+ }
+ }
+}
+
+void
+CallPresentationModel::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
+{
+ AppLogDebug("Enter");
+ if (__isMessageAppControlRunning == true)
+ {
+ //This comes here, when Message AppControl is finished working.
+ __isMessageAppControlRunning = false;
+ __pAppControlMgr->AppControlRequestCompleted();
+ //Check if this was the last call, then terminate application.
+ //And if any calls are active, then those cases are already handled from Other places.
+ if( GetCurrentCallCount() == 0)
+ {
+ CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+ pPhoneApp->Terminate();
+ }
+ }
+ if(appId.Equals(PROVIDER_ID_PHONE,false) == true && operationId.Equals(OPERATION_ID_DIAL,false) == true)
+ {
+ __isDialAppControlRunning = false;
+
+ __pAppControlMgr->AppControlRequestCompleted();
+ if(appControlResult == APP_CTRL_RESULT_SUCCEEDED)
+ {
+ String* pKey = new (std::nothrow) String(PARAM_PHONE_NUMBER);
+ if (pExtraData->ContainsKey(*pKey) == true)
+ {
+ const String* pPhoneNumber = static_cast<const String*>(pExtraData->GetValue(*pKey));
+ if(pPhoneNumber != null && pPhoneNumber->IsEmpty() == false)
+ {
+ AddCall(*pPhoneNumber);
+ }
+
+ }
+
+ }
+
+ }
+}
+
+void
+CallPresentationModel::AddCall(const String& phoneNumber)
+{
+ ArrayList* pLaunchArgs = null;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ int currentActiveCallCount = GetCurrentCallCount();
+ if(currentActiveCallCount <= 1 && IsIncomingorDialingCallPresent() == false)
+ {
+ //make an outgoing call with given number
+ String* contactTxt = new (std::nothrow) String(phoneNumber);
+ pLaunchArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pLaunchArgs->Construct();
+ pLaunchArgs->Add(contactTxt);
+ bool isEmergencyCall = IsEmergencyNumber(*contactTxt, true);
+
+ SceneId nextScene = IDSCN_SCENE_OUTCALL;
+ if (isEmergencyCall)
+ {
+ nextScene = IDSCN_SCENE_OUT_EMERGENCYCALL;
+ }
+ pSceneManager->GoForward( ForwardSceneTransition( nextScene,
+ SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP), pLaunchArgs);
+
+ }
+}
+
+int
+CallPresentationModel::GetCurrentCallCount(void)
+{
+ return __pTelephonyMgr->GetCurrentCallCount();
+}
+
+bool
+CallPresentationModel::CheckSimInitializationIsCompleted()
+{
+ result r = E_FAILURE;
+ if(__pTelephonyMgr != null)
+ {
+ r = __pTelephonyMgr->CheckIfMOCallIsPossible();
+ }
+ return (!IsFailed(r));
+}
+
+bool
+CallPresentationModel::IsEmergencyNumber(const Tizen::Base::String& phoneNumber, bool isSimInitialized)
+{
+ return __pTelephonyMgr->CheckIfMOCallIsEmergency(phoneNumber, isSimInitialized);
+}
+
+void
+CallPresentationModel::ResumeAlert(AppCallInfo& incomingCallInfo)
+{
+ //Adding incoming call sate setting here
+ if(__pSettingsPresentor != null)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_CONNECTING);
+ }
+ __pTelephonyMgr->ResumeAlert(incomingCallInfo);
+}
+
+void
+CallPresentationModel::StartAlert(AppCallInfo& incomingCallInfo)
+{
+ //Adding incoming call sate setting here
+ if(__pSettingsPresentor != null)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_CONNECTING);
+ }
+ __pTelephonyMgr->StartAlert(incomingCallInfo);
+}
+
+AppCallInfo*
+CallPresentationModel::GetIncomingCallHandle()
+{
+ return __pTelephonyMgr->GetIncomingCallHandle();
+}
+
+void
+CallPresentationModel::StopAlert(void)
+{
+ __pTelephonyMgr->StopAlert();
+}
+
+Contact*
+CallPresentationModel::GetContactN(const String& phoneNumber)
+{
+ return __pTelephonyMgr->GetContactN(phoneNumber);
+}
+
+AppCallInfo*
+CallPresentationModel::FetchIncomingCallDetailsN(const String& callHandle, const String& contactNumber)
+{
+
+ return __pTelephonyMgr->FetchIncomingCallHandleN(callHandle, contactNumber);
+}
+
+bool
+CallPresentationModel::CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo)
+{
+ return __pTelephonyMgr->CheckIncomingCallToBeRejected(pIncomingCallInfo);
+}
+
+/////////////////////////////////////////////////////////////////
+///// Event Listener methods from ITelephonyEventListener /////
+/////////////////////////////////////////////////////////////////
+void
+CallPresentationModel::HandleCallConnected(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleCallConnected(pCallList);
+ }
+ if(__pSettingsPresentor != null)
+ {
+ if(IsIncomingorDialingCallPresent() == false)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_ACTIVE);
+ }
+ }
+}
+
+void
+CallPresentationModel::HandleCallActive(bool isActive)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleCallActive(isActive);
+ }
+}
+
+void
+CallPresentationModel::HandleCallHeld(bool isHeld)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleCallHeld(isHeld);
+ }
+}
+
+void
+CallPresentationModel::HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList)
+{
+ AppLogDebug("Enter");
+ if (isLastCall == true)
+ {
+ SetSpeakerStatus(false);
+ SetMuteStatus(false);
+ if(__pSettingsPresentor != null)
+ {
+ //Check if there is a incoming call or dialing call present before setting the status
+ if(IsIncomingorDialingCallPresent() == false)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_OFF);
+ }
+ }
+ }
+ else
+ {
+ if(__pSettingsPresentor != null)
+ {
+ if(IsIncomingorDialingCallPresent() == false)
+ {
+ __pSettingsPresentor->SetCallState(CALL_STATE_CALL_VOICE_ACTIVE);
+ }
+ }
+ }
+ //1) Defer from sending call disconnected event to form, in case Msg AppControl is running,
+ //to avoid PhoneApp from going to EndCall form, where it shows for 3 sec. and automatically closes.
+ //2) Do not send call disconnected event to any form, in case an incoming call or dialing call is present.
+ if (__pTelEventListener != null /*&& __isMessageAppControlRunning == false*/ )
+ {
+ __pTelEventListener->HandleCallDisconnected(isLastCall, pCallList);
+ }
+}
+
+void
+CallPresentationModel::HandleConferenceCall(AppCallInfo& pCallInfo)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleConferenceCall(pCallInfo);
+ }
+}
+
+void
+CallPresentationModel::HandleIncomingCall(AppCallInfo& pCallInfo)
+{
+ AppLogDebug("Error - This will never come here. Since, now we are getting incoming call event through AppControl!!");
+}
+
+void
+CallPresentationModel::HandleConfCallHoldOccured(bool success)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleConfCallHoldOccured(success);
+ }
+}
+
+void
+CallPresentationModel::HandleConfCallActiveOccured(bool success)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleConfCallActiveOccured(success);
+ }
+}
+
+void
+CallPresentationModel::HandleCallSwapOccured(Tizen::Base::Collection::IListT<AppCallInfo>& pCallList)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleCallSwapOccured(pCallList);
+ }
+}
+
+void
+CallPresentationModel::HandleConferenceChange(void)
+{
+ //1) Do not send conf. call changed event to any form, in case an incoming call or dialing call is present.
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleConferenceChange();
+ }
+}
+
+void
+CallPresentationModel::HandleTelephonyError(int errorCode)
+{
+ if (__pTelEventListener != null)
+ {
+ __pTelEventListener->HandleTelephonyError(errorCode);
+ }
+}
+
+void
+CallPresentationModel::LaunchDialAppControl()
+{
+
+ if(__isDialAppControlRunning == true)
+ {
+ AppLogDebug("__isDialAppControlRunning == true");
+ //Do not allow another app control if already running
+ return;
+ }
+
+ //Launch dialer AppControl
+ if (__pAppControlMgr != null)
+ {
+ __isDialAppControlRunning = __pAppControlMgr->LaunchDialerAppControl(this);
+ }
+
+}
+
+bool
+CallPresentationModel::IsEnableJoinCallButton(void)
+{
+ //Check if conf. call has maximum participants
+ AppCallInfo* pConfCallInfo = GetConferenceCallInfoN();
+ if(pConfCallInfo != null && pConfCallInfo->GetCallerListCount() >= IDI_MAX_CONF_CALL_PARTICIPANTS)
+ {
+ return false;
+ }
+
+ //check if either of the caller is same or present in conf call.
+ IListT<AppCallInfo>* pActiveCallList = GetCallListN();
+ if ( pActiveCallList != null && pActiveCallList->GetCount() == IDI_MAX_ACTIVE_CALLS)
+ {
+ AppCallInfo firstCall;
+ AppCallInfo secondCall;
+ pActiveCallList->GetAt(0, firstCall);
+ pActiveCallList->GetAt(1, secondCall);
+
+ if (firstCall.IsConferenceCall() == true)
+ {
+ IListT<AppCallInfo>* pConfMemberList = firstCall.GetCallerList();
+ for (int index = 0; index < pConfMemberList->GetCount(); index++)
+ {
+ AppCallInfo singleConfMember;
+ pConfMemberList->GetAt(index, singleConfMember);
+ if (secondCall.GetContactNumber().IsEmpty() == false && secondCall.GetContactNumber().Equals(singleConfMember.GetContactNumber()) == true)
+ {
+ return false;
+ }
+ }
+ }
+ else if (secondCall.IsConferenceCall() == true)
+ {
+ IListT<AppCallInfo>* pConfMemberList = secondCall.GetCallerList();
+ for (int index = 0; index < pConfMemberList->GetCount(); index++)
+ {
+ AppCallInfo singleConfMember;
+ pConfMemberList->GetAt(index, singleConfMember);
+ if (firstCall.GetContactNumber().IsEmpty() == false && firstCall.GetContactNumber().Equals(singleConfMember.GetContactNumber()) == true)
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ //Now, we definitely know that both are single active calls.
+ if (firstCall.GetContactNumber().IsEmpty() == false && firstCall.GetContactNumber().Equals(secondCall.GetContactNumber()) == true)
+ {
+ return false;
+ }
+ }
+ }
+ delete pConfCallInfo;
+ pConfCallInfo = null;
+ return true;
+}
+
+bool
+CallPresentationModel::IsIncomingCallPresent(void)
+{
+ return __pTelephonyMgr->IsIncomingCallPresent();
+}
+
+bool
+CallPresentationModel::IsIncomingorDialingCallPresent(void)
+{
+ //returns false, if incoming call or dialed call is present.
+ return __pTelephonyMgr->IsIncomingorDialingCallPresent();
+}
+
+bool
+CallPresentationModel::LaunchComposeMessageAppControl(String& contactNumber, IAppControlResponseListener* pListener)
+{
+ if (__pAppControlMgr != null)
+ {
+ return __pAppControlMgr->LaunchComposeMessageAppControl(contactNumber, pListener);
+ }
+ return false;
+}
+
+bool
+CallPresentationModel::LaunchViewContactAppControl(String& contactId, IAppControlResponseListener* pListener)
+{
+ if (__pAppControlMgr != null)
+ {
+ return __pAppControlMgr->LaunchViewContactAppControl(contactId, pListener);
+ }
+ return false;
+}
+
+bool
+CallPresentationModel::LaunchAddContactAppControl(Tizen::Base::String& contactNumber, Tizen::App::IAppControlResponseListener* pListener)
+{
+ if (__pAppControlMgr != null)
+ {
+ return __pAppControlMgr->LaunchAddContactAppControl(contactNumber, pListener);
+ }
+ return false;
+}
+
+bool
+CallPresentationModel::IsAppControlRunning(void)
+{
+ if (__pAppControlMgr != null)
+ {
+ return __pAppControlMgr->IsAppControlRunning();
+ }
+ return false;
+}
+
+void
+CallPresentationModel::AbortAppControlRequest(void)
+{
+ if (__pAppControlMgr != null)
+ {
+ __pAppControlMgr->AbortAppControlRequest();
+ }
+}
+
+void
+CallPresentationModel::AppControlRequestCompleted(void)
+{
+ if (__pAppControlMgr != null)
+ {
+ __pAppControlMgr->AppControlRequestCompleted();
+ }
+}
+
+result
+CallPresentationModel::GetSimInfo(void)
+{
+ __psimStateManager = new (std::nothrow)SimStateManager();
+ result r = __psimStateManager->Construct();
+ if (IsFailed(r))
+ {
+ delete __psimStateManager;
+ __psimStateManager = null;
+ return E_FAILURE;
+ }
+ __psimStateManager->SetSimEventListener(this);
+
+ __psimInfo = new (std::nothrow)SimInfo();
+ r = __psimStateManager->GetSimInfo(*__psimInfo);
+ if (IsFailed(r))
+ {
+ delete __psimStateManager;
+ __psimStateManager = null;
+ delete __psimInfo;
+ __psimInfo = null;
+ return E_FAILURE;
+ }
+ return E_SUCCESS;
+}
+
+void
+CallPresentationModel::OnTelephonyNetworkStatusChanged(const NetworkStatus& networkStatus)
+{
+
+}
+
+void
+CallPresentationModel::OnTelephonySimStateChanged(Tizen::Telephony::SimState state)
+{
+ if(__psimStateManager != null)
+ {
+ delete __psimStateManager;
+ __psimStateManager =null;
+ }
+ if(__psimInfo != null)
+ {
+ delete __psimInfo;
+ __psimInfo = null;
+ }
+
+ __psimStateManager = new SimStateManager();
+ result r = __psimStateManager->Construct();
+ if (IsFailed(r))
+ {
+ delete __psimStateManager;
+ __psimStateManager = null;
+ return ;
+ }
+
+ __psimInfo = new SimInfo();
+ r = __psimStateManager->GetSimInfo(*__psimInfo);
+ if (IsFailed(r))
+ {
+ delete __psimStateManager;
+ __psimStateManager = null;
+ delete __psimInfo;
+ __psimInfo = null;
+ return ;
+ }
+
+}
+
+bool
+CallPresentationModel::IsSimAvailable(void)
+{
+ if(__psimInfo != null)
+ {
+ return __psimInfo->IsAvailable();
+ }
+ else
+ {
+ return false;
+ }
+
+
+}
+
+void
+CallPresentationModel::SendMessage(String& strMsg,String& recpientNum)
+{
+ AppLogDebug("Enter");
+ result r;
+ if(__pSmsManager == null)
+ {
+ __pSmsManager = new (std::nothrow) SmsManager();
+ result r = __pSmsManager->Construct(*this);
+ if (IsFailed(r) == true)
+ {
+ delete __pSmsManager;
+ __pSmsManager = null;
+ return;
+ }
+
+ }
+ RecipientList recipient;
+ recipient.Add(RECIPIENT_TYPE_TO,recpientNum);
+ SmsMessage smsMessage;
+ r = smsMessage.SetText(strMsg);
+ if (IsFailed(r) == false)
+ {
+ r = __pSmsManager->Send(smsMessage,recipient,true);
+ if (IsFailed(r) == false)
+ {
+ __isMessageSendInProgress = true;
+ }
+ else
+ {
+ AppLogDebug("%s",GetErrorMessage(r));
+ ShowSMSErrorNotification();
+ }
+
+ }
+
+}
+
+void
+CallPresentationModel::ShowSMSErrorNotification(void)
+{
+ AppLogDebug("Enter");
+ NotificationRequest request;
+ String alertString = L"\n";
+ alertString.Append(AppUtility::GetResourceString(IDS_MESSAGE_SENDING_FAILED));
+ request.SetAlertText(L" ");
+ request.SetTitleText(alertString);
+ request.SetNotificationStyle(NOTIFICATION_STYLE_NORMAL);
+
+ String resourcePath = App::GetInstance()->GetAppSharedPath() + L"res/";
+
+ String iconPath = resourcePath + L"messages.png";
+ request.SetIconFilePath(iconPath);
+
+ int badgeNumber = __pNotificationManager->GetBadgeNumber();
+ ++badgeNumber;
+ if (badgeNumber <= 0)
+ {
+ badgeNumber = 1;
+ }
+ request.SetBadgeNumber(badgeNumber);
+
+ AppLogDebug("Calling Notify");
+ __pNotificationManager->Notify(request);
+ __pNotificationManager->RemoveNotification();
+}
+
+bool
+CallPresentationModel::IsMessageSendingInProgress(void)
+{
+ AppLogDebug("Enter %d",__isMessageSendInProgress);
+ return __isMessageSendInProgress;
+}
+
+void
+CallPresentationModel::OnSmsMessageSent(result r)
+{
+ AppLogDebug("Enter");
+ __isMessageSendInProgress = false;
+
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallRejectInfo.cpp
+ * @brief Call Reject info class
+ */
+#include "CallRejectInfo.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+CallRejectInfo::CallRejectInfo(void)
+{
+}
+
+CallRejectInfo::~CallRejectInfo(void)
+{
+}
+
+bool
+CallRejectInfo::operator ==(const CallRejectInfo& rhs) const
+{
+ /*return (this->rowId == rhs.rowId);*/
+ if ((this->phoneNumber == rhs.phoneNumber)
+ && (this->rejectCondition == rhs.rejectCondition))
+ {
+ return true;
+ }
+ return false;
+}
+
+bool
+CallRejectInfo::operator !=(const CallRejectInfo& rhs) const
+{
+ /*return (!(this->rowId == rhs.rowId));*/
+ if ((this->phoneNumber == rhs.phoneNumber)
+ && (this->rejectCondition == rhs.rejectCondition))
+ {
+ return false;
+ }
+ return true;
+}
+
+CallRejectInfo&
+CallRejectInfo::operator =(const CallRejectInfo& rhs)
+{
+ if (this != null)
+ {
+ this->rowId = rhs.rowId;
+ this->phoneNumber.Append(rhs.phoneNumber);
+ this->rejectCondition = rhs.rejectCondition;
+ this->isActivated = rhs.isActivated;
+ }
+ return *this;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSceneRegister.cpp
+ * @brief Scene register file
+ */
+#include <FUi.h>
+#include "CallSceneRegister.h"
+#include "CallPhoneFormFactory.h"
+#include "CallPanelFactory.h"
+#include "CallTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Ui::Scenes;
+
+
+SceneRegister::SceneRegister(void)
+{
+}
+
+SceneRegister::~SceneRegister(void)
+{
+}
+
+result
+SceneRegister::RegisterAllScenes(void)
+{
+ result r = E_SUCCESS;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager != null);
+
+ //Register factory methods for form & panel creation
+ static FormFactory formFactory;
+ static PanelFactory panelFactory;
+ r |= pSceneManager->RegisterFormFactory(formFactory);
+ r |= pSceneManager->RegisterPanelFactory(panelFactory);
+
+ //Voice Call Scenes
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_OUTCALL, IDL_FORM_OUTCALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_OUT_EMERGENCYCALL, IDL_FORM_OUT_EMERGENCYCALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_ACTIVECALL, IDL_FORM_ACTIVECALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_ACTIVE_EMERGENCYCALL, IDL_FORM_ACTIVE_EMERGENCYCALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_MULTIPLEACTIVECALL, IDL_FORM_MULTIPLEACTIVECALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_INCOMINGCALL, IDL_FORM_INCOMINGCALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CONFCALL, IDL_FORM_CONFCALL, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_CONFCALLLIST, IDL_FORM_CONFCALLLIST, L"");
+ AppLogDebug("%d",r);
+ r |= pSceneManager->RegisterScene(IDSCN_SCENE_ENDCALL, IDL_FORM_ENDCALL, L"");
+
+ return r;
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallCallSettingDataService.cpp
+ * @brief Call Database class
+ */
+
+#include <FApp.h>
+#include <FSocial.h>
+#include <FIo.h>
+#include "CallSettingDataService.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+using namespace Tizen::App;
+using namespace Tizen::Social;
+
+static const wchar_t* REJECT_DATABASE_PATH = L"/opt/apps/zktdpemtmw/shared/";
+
+CallSettingDataService* CallSettingDataService::__pCallSettingDataService = null;
+Database* CallSettingDataService::__pDatabase = null;
+
+CallSettingDataService::CallSettingDataService(void)
+: __strDbName(String(REJECT_DATABASE_PATH) + L"trusted/CallRejectInfoListDataBase")
+{
+ __pStmt = null;
+ __pEnum = null;
+
+ return;
+}
+
+CallSettingDataService::~CallSettingDataService(void)
+{
+ if (__pDatabase != null)
+ {
+ delete __pDatabase;
+ __pDatabase = null;
+ }
+ __pCallSettingDataService = null;
+ return;
+}
+
+CallSettingDataService*
+CallSettingDataService::CreateInstance(void)
+{
+ if (__pCallSettingDataService == null)
+ {
+ __pCallSettingDataService = new (std::nothrow) CallSettingDataService();
+ }
+ return __pCallSettingDataService;
+}
+result
+CallSettingDataService::OpenDatabase(void)
+{
+ result r = E_SUCCESS;
+
+ // create the database if it doesn't exist
+ if (__pDatabase != null)
+ {
+ return E_OBJ_ALREADY_EXIST;
+ }
+ __pDatabase = new (std::nothrow) Database();
+ r = __pDatabase->Construct(__strDbName, "r");
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() database construct failed");
+
+ r = CreateCallRejectTableDatabase();
+ // TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() call reject Create Table failed");
+ r = CreateSpeedDialTableDatabase();
+ // TryCatch(r == E_SUCCESS, , "CallSettingDataService::OpenDatabase() speed dial Create Table failed");
+
+ return r;
+
+ CATCH:
+ delete __pDatabase;
+ __pDatabase = null;
+ return r;
+}
+
+result
+CallSettingDataService::CreateCallRejectTableDatabase(void)
+{
+ String sqlQuery;
+ result r = E_SUCCESS;
+
+ sqlQuery.Append(L"CREATE TABLE IF NOT EXISTS CallRejectInfoTable(id INTEGER PRIMARY KEY AUTOINCREMENT,phonenumber TEXT,rejectcondition INT,activated INT)");
+
+ r = __pDatabase->ExecuteSql(sqlQuery, true);
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::CreateCallRejectInfoTableDatabase() Create Table failed");
+
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::CreateSpeedDialTableDatabase(void)
+{
+ String sqlQuery;
+ result r = E_SUCCESS;
+
+ sqlQuery.Append(L"CREATE TABLE IF NOT EXISTS SpeedDialTable(id INTEGER PRIMARY KEY AUTOINCREMENT,contactInfo TEXT,keyMappedTo INT)");
+
+ r = __pDatabase->ExecuteSql(sqlQuery, true);
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::CreateCallRejectInfoTableDatabase() Create Table failed");
+
+ return r;
+
+ CATCH:
+ return r;
+}
+
+result
+CallSettingDataService::CloseDatabase(void)
+{
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = null;
+ }
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = null;
+ }
+ if (__pDatabase != null)
+ {
+ delete __pDatabase;
+ __pDatabase = null;
+ }
+
+ return E_SUCCESS;
+}
+
+
+bool
+CallSettingDataService::IsCallToBeRejected(String& phoneNumber)
+{
+ AppLogDebug("Enter");
+ bool isCallToBeRejected = false;
+ String statement;
+ __pStmt = null;
+ __pEnum = null;
+ result r = E_SUCCESS;
+ __pDatabase->BeginTransaction();
+
+ //statement.Append(L"SELECT * FROM CallRejectInfoTable WHERE phonenumber LIKE ?");
+ statement.Append(L"SELECT * FROM CallRejectInfoTable WHERE activated=?");
+
+ __pStmt = __pDatabase->CreateStatementN(statement);
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::SearchFromDataBase CreateStatementN failed");
+
+ //__pStmt->BindString(0, phoneNumber);
+ if (__pStmt != null)
+ {
+ __pStmt->BindInt(0,(int)true);
+ __pEnum = __pDatabase->ExecuteStatementN(*__pStmt);
+ }
+ r = GetLastResult();
+ TryCatch(r == E_SUCCESS, , "CallSettingDataService::SearchFromDataBaseN search failed");
+
+ //check if the query returned any result and then iterate through the results
+ if (__pEnum != null)
+ {
+ while (__pEnum->MoveNext() == E_SUCCESS)
+ {
+ CallRejectInfo* pCallRejectInfoItem = new (std::nothrow) CallRejectInfo;
+ int activateflag;
+ int rejectCondition;
+ __pEnum->GetIntAt(0, pCallRejectInfoItem->rowId);
+ __pEnum->GetStringAt(1, pCallRejectInfoItem->phoneNumber);
+ __pEnum->GetIntAt(2, rejectCondition);
+ __pEnum->GetIntAt(3, activateflag);
+ pCallRejectInfoItem->rejectCondition = (CallRejectMatchCondition)rejectCondition;
+ pCallRejectInfoItem->isActivated = (bool)activateflag;
+ if (CheckRejectCondition(phoneNumber, *pCallRejectInfoItem) == true)
+ {
+ delete pCallRejectInfoItem;
+ isCallToBeRejected = true;
+ break;
+ }
+ delete pCallRejectInfoItem;
+ }
+ }
+ __pDatabase->CommitTransaction();
+
+ if (__pStmt != null)
+ {
+ delete __pStmt;
+ __pStmt = NULL;
+ }
+ if (__pEnum != null)
+ {
+ delete __pEnum;
+ __pEnum = NULL;
+ }
+ AppLogDebug("%d",isCallToBeRejected);
+ return isCallToBeRejected;
+
+ CATCH:
+ return isCallToBeRejected;
+}
+
+bool
+CallSettingDataService::CheckRejectCondition(String& phoneNumber, CallRejectInfo& callRejectInfo)
+{
+ bool isCallToBeRejected = false;
+ switch (callRejectInfo.rejectCondition)
+ {
+ case CALL_REJECT_MATCH_EXACTLY:
+ {
+ if (callRejectInfo.phoneNumber.CompareTo(phoneNumber) == 0)
+ {
+ isCallToBeRejected = true;
+ }
+ }
+ break;
+ case CALL_REJECT_MATCH_START:
+ {
+ isCallToBeRejected = phoneNumber.StartsWith(callRejectInfo.phoneNumber, 0);
+ }
+ break;
+ case CALL_REJECT_MATCH_END:
+ {
+ isCallToBeRejected = phoneNumber.EndsWith(callRejectInfo.phoneNumber);
+ }
+ break;
+ case CALL_REJECT_MATCH_INCLUDE:
+ {
+ isCallToBeRejected = phoneNumber.Contains(callRejectInfo.phoneNumber);
+ }
+ break;
+ default:
+ break;
+ }
+
+ return isCallToBeRejected;
+}
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsConstants.cpp
+ * @brief Call setting tone form
+ */
+#include "CallSettingsConstants.h"
+
+using namespace Tizen::Graphics;
+
+
+// Dimensions used in List views //
+// menu item height
+const int H_LIST_HIDDENGROUP_ITEM = 1;
+const int H_LIST_NORMAL_MENU_ITEM = 112;
+const int H_LIST_DROPDOWN_MENU_ITEM = 128;
+const int H_LIST_MENU_SINGLELINE_HLPTXT_ITEM = 102;
+//text item height
+const int H_LIST_NORMAL_TXT_ITEM = 54;
+const int H_LIST_SUB_TXT_ITEM = 38;
+//Two line text for Drop down menu item
+const int H_LIST_DROPDOWN_TXT_ITEM = 52;
+//single line text
+const int X_LIST_MENU_TEXT_ITEM = 26;
+const int Y_LIST_MENU_TEXT_ITEM = 8;
+//Help text
+const int X_LIST_MENU_HLPTXT_ITEM = 26;
+const int Y_LIST_MENU_HLPTXT_ITEM = 8;
+//custom Item for Bg line
+const int Y_CUSTOM_BG_ELEMENT = 0;
+//Position for delete list item
+const int X_DEL_LIST_ELEMENT = 16;
+const int Y_DEL_LIST_ELEMENT = 0;
+
+// Dimensions for icons //
+//Expand icon for DropDown Menu Items
+const int W_EXPAND_ICON = 64;
+const int H_EXPAND_ICON = 64;
+const int W_SLIDER_ICON = 150;
+const int H_SLIDER_ICON = 64;
+//Dimensions for custom bg line
+const int W_CUSTOM_BG_ELEMENT = 1;
+//Item Width for delete list
+const int W_DELETE_LIST_ITEM = 628;
+const int W_LEFT_HEADER_EXPAND_ITEMS = 8;
+
+const int FONT_SIZE_SUB_TXT = 32;
+//Help text
+const int FONT_SIZE_HELP_TXT = 32;
+//Header, Footer icon
+const int W_HDR_FTR_ICON = 60;
+const int H_HDR_FTR_ICON = 60;
+//Processing Animation constants
+const int IDI_ANIM_DURATION = 500;
+const int IDI_ANIM_PROGRESS_COUNT = 30;
+
+
+//Settings UI contants
+// Colors used in List views //
+const unsigned int COLOR_GROUP_ITEM_BG = Color32<249, 249, 249>::Value;
+const unsigned int COLOR_LIST_MENU_ITEM = Color32<236, 240, 242>::Value;
+const unsigned int COLOR_SECONDDEPTH_ITEM_BG = Color32<215, 225, 232>::Value;
+const unsigned int COLOR_HELP_ITEM_BG = Color32<255, 255, 255, 0>::Value;
+const unsigned int COLOR_NORMAL_MAIN_TXT = Color32<102, 102, 102>::Value;
+const unsigned int COLOR_NORMAL_SUB_TXT = Color32<124, 124, 124>::Value;
+const unsigned int COLOR_PRESS_SUB_TXT = Color32<42, 137, 194>::Value;
+const unsigned int COLOR_PRESS_MAIN_TXT = Color32<249, 249, 249>::Value;
+const unsigned int COLOR_HELP_TXT = Color32<124, 124, 124>::Value;
+const unsigned int COLOR_LEFT_HEADER_EXPAND_ITEMS = Color32<108, 168, 199>::Value;
+//Main List Option text
+const unsigned int COLOR_MAIN_TXT = Color32<0, 0, 0>::Value;
+const unsigned int COLOR_NORMAL_ITEM_BG = Color32<249, 249, 249>::Value;
+const unsigned int COLOR_PRESS_ITEM_BG = Color32<42, 137, 194>::Value;
+const unsigned int COLOR_SELECTALL_ITEM_BG = Color32<215, 225, 232>::Value;
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsManager.cpp
+ * @brief Setting Manager class
+ */
+#include <libintl.h>
+#include <FApp.h>
+#include <FSocial.h>
+#include <FBaseColIList.h>
+#include "vconf.h"
+#include "vconf-internal-ciss-keys.h"
+#include "CallSettingsManager.h"
+#include "CallTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+
+SettingsManager* SettingsManager::__pInstance = null;
+
+SettingsManager::SettingsManager(void)
+ : __pTapiHandle(null)
+ , __pSettingsEventListener(null)
+ , __pCallSettingDataService(null)
+{
+
+}
+
+SettingsManager::~SettingsManager(void)
+{
+ //De-initialize the TAPI Library
+ if(__pTapiHandle != null)
+ {
+ tel_deinit(__pTapiHandle);
+ }
+ if (__pCallSettingDataService)
+ {
+ __pCallSettingDataService->CloseDatabase();
+ delete __pCallSettingDataService;
+ }
+ if (__pSettingsEventListener != null)
+ {
+ delete __pSettingsEventListener;
+ }
+ RemoveSystemEventListener();
+}
+
+void SettingsManager::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) SettingsManager();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+ std::atexit(&(SettingsManager::DestroyInstance));
+}
+
+void SettingsManager::DestroyInstance(void)
+{
+ delete __pInstance;
+}
+
+result
+SettingsManager::Construct(void)
+{
+ __pCallSettingDataService = CallSettingDataService::CreateInstance();
+ result r = __pCallSettingDataService->OpenDatabase();
+ if(IsFailed(r))
+ {
+ return E_FAILURE;
+ }
+ //initialize telephony
+ __pTapiHandle = tel_init(null);
+ SetCallState(CALL_STATE_CALL_OFF);
+ AddSystemEventListener();
+ return E_SUCCESS;
+}
+
+SettingsManager*
+SettingsManager::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+SettingsManager::AddSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ if (__pSettingsEventListener == null)
+ {
+ __pSettingsEventListener = new (std::nothrow) ArrayListT<ISettingsEventListener*>();
+ }
+
+ //Add to listeners, if not already in list.
+ if ( (pSettingsEventListener != null)
+ && !(__pSettingsEventListener->Contains(pSettingsEventListener)) )
+ {
+ __pSettingsEventListener->Add(pSettingsEventListener);
+ }
+}
+
+void
+SettingsManager::RemoveSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ if ((__pSettingsEventListener != null) && (pSettingsEventListener != null)
+ && __pSettingsEventListener->Contains(pSettingsEventListener))
+ {
+ __pSettingsEventListener->Remove(pSettingsEventListener);
+ }
+}
+
+bool
+SettingsManager::IsCallToBeRejected(String& phoneNumber)
+{
+ if(__pCallSettingDataService != null)
+ {
+ return __pCallSettingDataService->IsCallToBeRejected(phoneNumber);
+}
+ else
+ {
+ return false;
+ }
+}
+
+bool
+SettingsManager::GetUnknownRejectStatus(void)
+{
+ int unknownRejectStatus = -1;
+
+ vconf_get_bool(VCONFKEY_CISSAPPL_AUTO_REJECT_UNKNOWN_BOOL, &unknownRejectStatus);
+
+ bool retVal = unknownRejectStatus;
+ return retVal;
+}
+
+void
+SettingsManager::NotifyForwardingEventListeners(ForwardResponseType responseType, bool isCallSuccessful, CallForwardCondition callFwdCondition, const Tizen::Base::String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLFORWARD_RESPONSE)
+ {
+ pListener->HandleSetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+ else
+ {
+ pListener->HandleGetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+ }
+ }
+}
+
+void
+SettingsManager::NotifyBarringEventListeners(BarringResponseType responseType, bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLBARRING_RESPONSE)
+ {
+ pListener->HandleSetCallBarringResponse(isCallSuccessful, callBarringType, isBarringActivated);
+ }
+ else
+ {
+ pListener->HandleGetCallBarringResponse(isCallSuccessful, callBarringType, isBarringActivated);
+ }
+ }
+ }
+}
+
+void
+SettingsManager::NotifyWaitingEventListeners(WaitingResponseType responseType, bool isCallSuccessful, bool isCallWaitingActivated)
+{
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ //TryCatch(r == E_SUCCESS, , "[%s] Propagated.", GetErrorMessage(r));
+ if (responseType == SET_CALLWAITING_RESPONSE)
+ {
+ pListener->HandleSetCallWaitingResponse(isCallSuccessful, isCallWaitingActivated);
+ }
+ else
+ {
+ pListener->HandleGetCallWaitingResponse(isCallSuccessful, isCallWaitingActivated);
+ }
+ }
+ delete pListenerEnum;
+ }
+}
+
+IMapT<int,String>*
+SettingsManager::GetRejectMessageListN(void)
+{
+ int messagesCount;
+ char* pMessage = null;
+ HashMapT<int,String> *pMessageMap = null;
+
+ int retval = vconf_get_int(VCONFKEY_CISSAPPL_REJECT_CALL_MSG_INT, &messagesCount);
+ if (retval == 0 && messagesCount > 0)
+ {
+ pMessageMap = new (std::nothrow) HashMapT<int,String>();
+ pMessageMap->Construct(messagesCount);
+ for (int index = 0; index < messagesCount; index++)
+ {
+ int keyForMsg = index;
+ String *pMessageStr = new (std::nothrow) String();
+ switch (index)
+ {
+ case 0:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG1_STR);
+ }
+ break;
+
+ case 1:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG2_STR);
+ }
+ break;
+
+ case 2:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG3_STR);
+ }
+ break;
+
+ case 3:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG4_STR);
+ }
+ break;
+
+ case 4:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG5_STR);
+ }
+ break;
+
+ case 5:
+ {
+ pMessage = vconf_get_str(VCONFKEY_CISSAPPL_USER_CREATE_MSG6_STR);
+ }
+ break;
+
+ default:
+ {
+ delete pMessageMap;
+ pMessageMap = null;
+ delete pMessageStr;
+ pMessageStr = null;
+ return null;
+ }
+ break;
+ }
+ //todo:Chk if this is allowed outside the call settings library
+ if((pMessage != null) && (String(pMessage).IsEmpty() == false))
+ {
+ bindtextdomain("ug-setting-call-efl", "/usr/ug/res/locale");
+ pMessageStr->Append(dgettext("ug-setting-call-efl", pMessage));
+ pMessageMap->Add(keyForMsg, *pMessageStr);
+ }
+ }
+ }
+ return pMessageMap;
+}
+
+result
+SettingsManager::SetCallState(CallState callState)
+{
+ AppLogDebug("Enter %d",callState);
+ result r = E_FAILURE;
+ int retVal = vconf_set_int(VCONFKEY_CALL_STATE, callState);
+ if (retVal == 0)
+ {
+ AppLogDebug("Success");
+ r = E_SUCCESS;
+ }
+ return r;
+}
+void
+SettingsManager::AddSystemEventListener(void)
+{
+ Tizen::System::SettingInfo::AddSettingEventListener(*this);
+}
+
+void
+SettingsManager::RemoveSystemEventListener(void)
+{
+ Tizen::System::SettingInfo::RemoveSettingEventListener(*this);
+}
+
+void
+SettingsManager::OnSettingChanged(Tizen::Base::String& key)
+{
+ AppLogDebug("Enter");
+ //Flight mode changed
+ if(key.Equals(String(SETTINGS_FLIGHT_MODE_STR)))
+ {
+ bool flightMode = false;
+ SettingInfo::GetValue(key, flightMode);
+ if(flightMode == true)
+ {
+ // Notify if some active call is going on
+ IEnumeratorT<ISettingsEventListener*>* pListenerEnum = null;
+ result r = E_FAILURE;
+ if (__pSettingsEventListener != null)
+ {
+ pListenerEnum = __pSettingsEventListener->GetEnumeratorN();
+ //TryReturn(pListenerEnum != null, GetLastResult(), "[%s] Propagated.", GetErrorMessage(GetLastResult()));
+
+ while ((r = pListenerEnum->MoveNext()) != E_OUT_OF_RANGE)
+ {
+ ISettingsEventListener* pListener;
+ r = pListenerEnum->GetCurrent(pListener);
+ pListener->HandleFlightMode(true);
+
+ }
+ }
+
+ }
+ }
+}
+
+bool
+SettingsManager::GetFlightModeStatus(void)
+{
+ result r = E_SUCCESS;
+
+ String key(SETTINGS_FLIGHT_MODE_STR);
+ bool flightMode = false;
+
+ r = SettingInfo::GetValue(key, flightMode);
+ TryCatch(r == E_SUCCESS, , "GetFlightModeStatus: To get a value is failed");
+
+ return flightMode;
+
+ CATCH:
+ return flightMode;
+}
+
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsPresentationModel.cpp
+ * @brief Setting Presentation model
+ */
+#include "CallSettingsConstants.h"
+#include "CallSettingsManager.h"
+#include "CallSettingsPresentationModel.h"
+#include "CallPresentationModel.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Social;
+
+SettingsPresentationModel* SettingsPresentationModel::__pInstance = null;
+
+SettingsPresentationModel::SettingsPresentationModel()
+{
+ __pSettingsMgr = null;
+ __pSettingsEventListener = null;
+}
+
+SettingsPresentationModel::~SettingsPresentationModel()
+{
+}
+
+void
+SettingsPresentationModel::CreateInstance(void)
+{
+ __pInstance = new (std::nothrow) SettingsPresentationModel();
+ result r = __pInstance->Construct();
+ if(IsFailed(r))
+ {
+ delete __pInstance;
+ __pInstance = null;
+ return;
+ }
+ atexit(&(SettingsPresentationModel::DestroyInstance));
+}
+
+SettingsPresentationModel*
+SettingsPresentationModel::GetInstance(void)
+{
+ if (__pInstance == null)
+ {
+ CreateInstance();
+ }
+ return __pInstance;
+}
+
+void
+SettingsPresentationModel::DestroyInstance(void)
+{
+ if (__pInstance->__pSettingsMgr != null)
+ {
+ __pInstance->__pSettingsMgr->RemoveSettingEventListener(__pInstance);
+ __pInstance->__pSettingsMgr = null;
+ }
+ delete __pInstance;
+}
+
+result
+SettingsPresentationModel::Construct(void)
+{
+ //Construct Settings Manager
+ __pSettingsMgr = SettingsManager::GetInstance();
+ if(__pSettingsMgr != null)
+ {
+ __pSettingsMgr->AddSettingEventListener(this);
+ }
+ return E_SUCCESS;
+}
+
+result
+SettingsPresentationModel::AddSettingEventListener(ISettingsEventListener* pSettingsEventListener)
+{
+ result r = E_FAILURE;
+ if (__pSettingsEventListener == null && pSettingsEventListener != null)
+ {
+ __pSettingsEventListener = pSettingsEventListener;
+ r = E_SUCCESS;
+ }
+ return r;
+}
+
+void
+SettingsPresentationModel::RemoveSettingEventListener(void)
+{
+ __pSettingsEventListener = null;
+}
+
+IMapT<int,String>*
+SettingsPresentationModel::GetRejectMessageListN(void)
+{
+ return __pSettingsMgr->GetRejectMessageListN();
+}
+
+
+bool
+SettingsPresentationModel::IsCallToBeRejected(Tizen::Base::String& phoneNumber)
+{
+ return __pSettingsMgr->IsCallToBeRejected(phoneNumber);
+}
+
+
+//////////////////////////////////////////////////
+// Settings Event Listener Methods //
+//////////////////////////////////////////////////
+
+void
+SettingsPresentationModel::HandleGetCallWaitingResponse(bool isCallSuccessful, bool callWaitingActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallWaitingResponse(isCallSuccessful, callWaitingActivated);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallWaitingResponse(bool isCallSuccessful, bool isCallWaitingEnabled)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallWaitingResponse(isCallSuccessful, isCallWaitingEnabled);
+ }
+}
+
+void
+SettingsPresentationModel::HandleGetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool callForwardActivated, int noReplyWaitTime)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, callForwardActivated, noReplyWaitTime);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallForwardResponse(bool isCallSuccessful, CallForwardCondition callFwdCondition, const String& callFwdNumber, bool isCallForwardActivated, int noReplyWaitTime)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallForwardResponse(isCallSuccessful, callFwdCondition, callFwdNumber, isCallForwardActivated, noReplyWaitTime);
+ }
+}
+
+void
+SettingsPresentationModel::HandleGetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleGetCallBarringResponse(isCallSuccessful, callBarringType, isBarringActivated);
+ }
+}
+
+void
+SettingsPresentationModel::HandleSetCallBarringResponse(bool isCallSuccessful, CallBarringType callBarringType, bool isBarringActivated)
+{
+ if (__pSettingsEventListener != null)
+ {
+ __pSettingsEventListener->HandleSetCallBarringResponse(isCallSuccessful, callBarringType, isBarringActivated);
+ }
+}
+
+void
+SettingsPresentationModel::HandleFlightMode(bool isFlightModeActivated)
+{
+ CallPresentationModel::GetInstance()->EndAllCall();
+}
+
+result
+SettingsPresentationModel::SetCallState(CallState callState)
+{
+ return __pSettingsMgr->SetCallState(callState);
+}
+
+bool
+SettingsPresentationModel::GetFlightModeStatus(void)
+{
+ return __pSettingsMgr->GetFlightModeStatus();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallSettingsMoreOptionsForm.cpp
+ * @brief Sound manager class
+ */
+#include "CallSoundManager.h"
+#include "CallTelephonyManager.h"
+#include "vconf.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Io;
+using namespace Tizen::Media;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+
+static const wchar_t* RINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/ringtone_sdk.mp3";
+static const wchar_t* CALLCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Connect.ogg";
+static const wchar_t* CALLDISCONNECTTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_Disconnect.ogg";
+static const wchar_t* MINUTEREMINDERTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_RecordStart.wav";
+static const wchar_t* CALLWAITINGTONE_PATH = L"/opt/usr/apps/zktdpemtmw/shared/data/Call_WaitingTone.wav";
+
+
+SoundManager::SoundManager(void)
+ : __pSoundCallSession(null)
+ , __pVibrator(null)
+ , __pPlayer(null)
+ , __pDisconnectPlayer(null)
+ , __pConnectPlayer(null)
+ , __pReminderPlayer(null)
+ , __pWaitingTonePlayer(null)
+ , __lastEndedConferenceCall(false)
+{
+ __timer.Construct(*this);
+ __isSoundStatusOn = false;
+ __isVibrateStatusOn = false;
+}
+
+SoundManager::~SoundManager(void)
+{
+ if(__pSoundCallSession != null)
+ {
+ sound_manager_call_session_destroy(__pSoundCallSession);
+ }
+ if (__pVibrator != null)
+ {
+ delete __pVibrator;
+ __pVibrator = null;
+ }
+ if (__pPlayer != null)
+ {
+ delete __pPlayer;
+ __pPlayer = null;
+ }
+ if(__pConnectPlayer != null)
+ {
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
+ }
+ if(__pDisconnectPlayer != null)
+ {
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
+ }
+ if(__pReminderPlayer != null)
+ {
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
+ }
+ if(__pWaitingTonePlayer != null)
+ {
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+ }
+
+}
+
+void
+SoundManager::SetlastEndedConferenceCall()
+{
+ __lastEndedConferenceCall = true;
+}
+
+bool
+SoundManager::GetLastConferenceCall()
+{
+ return __lastEndedConferenceCall;
+}
+
+Timer*
+SoundManager::GetTimer()
+{
+ return &__timer;
+}
+
+result
+SoundManager::StopSession(void)
+{
+ AppLogDebug("Enter");
+ if(__pSoundCallSession != null)
+ {
+ AppLogDebug("sound_manager_call_session_destroy");
+ sound_manager_call_session_destroy(__pSoundCallSession);
+ __pSoundCallSession = null;
+ }
+
+ return E_SUCCESS;
+}
+
+result
+SoundManager::StartSession(void)
+{
+ AppLogDebug("Enter");
+ if (__pSoundCallSession != null)
+ {
+ sound_manager_call_session_set_mode(__pSoundCallSession,(sound_call_session_mode_e)SOUND_CALL_SESSION_MODE_VOICE);
+ sound_manager_set_active_route((sound_route_e)SOUND_ROUTE_IN_MIC_OUT_RECEIVER);
+ sound_manager_set_volume((sound_type_e)SOUND_TYPE_CALL,5);
+ return E_SUCCESS;
+ }
+ int res = sound_manager_call_session_create((sound_call_session_type_e)SOUND_SESSION_TYPE_CALL, &__pSoundCallSession);
+ if (res != SOUND_MANAGER_ERROR_NONE)
+ {
+ AppLogDebug("Sound manager creation failed");
+ return E_FAILURE;
+ }
+ res = sound_manager_call_session_set_mode(__pSoundCallSession,(sound_call_session_mode_e)SOUND_CALL_SESSION_MODE_VOICE);
+ sound_manager_set_active_route((sound_route_e)SOUND_ROUTE_IN_MIC_OUT_RECEIVER);
+ //todo start listening for volume key and set the volume
+ sound_manager_set_volume((sound_type_e)SOUND_TYPE_CALL,5);
+ //
+ SetSoundPath();
+ return E_SUCCESS;
+}
+
+result
+SoundManager::SetSoundPath(bool bSpeaker)
+{
+ AppLogDebug("Enter");
+ int btStatus;
+ TelCallSoundPathInfo_t callSoundPathInfo;
+ sound_route_e soundRoute;
+ bool isEarJackPresent = IsEarJackConnected();
+ vconf_get_int(VCONFKEY_BT_HEADSET_SCO,&btStatus);
+ if(btStatus == VCONFKEY_BT_SCO_CONNECT)
+ {
+ AppLogDebug("Routing audio input and output to bluetooth SCO");
+ callSoundPathInfo.path = TAPI_SOUND_PATH_BLUETOOTH;
+ soundRoute = SOUND_ROUTE_INOUT_BLUETOOTH;
+ }
+ else
+ {
+ if(bSpeaker == false)
+ {
+ if (isEarJackPresent == true)
+ {
+ AppLogDebug("Routing audio input to device builtin mic and routing audio output to headphone");
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_HEADPHONE;
+ callSoundPathInfo.path = TAPI_SOUND_PATH_HEADSET;
+ }
+ else
+ {
+ AppLogDebug("Routing audio input to device builtin mic and routing audio output to builtin receiver");
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_RECEIVER;
+ callSoundPathInfo.path = TAPI_SOUND_PATH_HANDSET;
+ }
+ }
+ else
+ {
+ AppLogDebug("Routing audio input to device builtin mic and routing audio output to builtin speaker");
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_SPEAKER;
+ callSoundPathInfo.path = TAPI_SOUND_PATH_SPK_PHONE;
+ }
+
+ }
+ callSoundPathInfo.ex_volume = TelCallSoundPathInfo_t::TAPI_SOUND_EX_VOLUME_ON;
+
+ int res = tel_set_call_sound_path(TelephonyManager::GetInstance(null)->GetTapiHandle(), &callSoundPathInfo, &HandleCallbackResponse, this);
+ TryReturn(res == TAPI_CAUSE_SUCCESS,E_FAILURE, "[%d] tel_set_call_sound_path failed",res );
+
+ res = sound_manager_set_active_route(soundRoute);
+ TryReturn(res == SOUND_MANAGER_ERROR_NONE,E_FAILURE, "[%d] sound_manager_set_active_route failed",res );
+
+ return E_SUCCESS;
+ AppLogDebug("Exit");
+}
+
+result
+SoundManager::SetSpeakerStatus(bool setSpeaker)
+{
+ result r = E_FAILURE;
+ int res = -1;
+ bool isEarJackPresent = IsEarJackConnected();
+ sound_route_e soundRoute;
+ if (setSpeaker == true)
+ {
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_SPEAKER;
+ }
+ else
+ {
+ if (isEarJackPresent == true)
+ {
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_HEADPHONE;
+ }
+ else
+ {
+ soundRoute = SOUND_ROUTE_IN_MIC_OUT_RECEIVER;
+ }
+ }
+ res = sound_manager_set_active_route(soundRoute);
+ if (res == SOUND_MANAGER_ERROR_NONE)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ return r;
+}
+
+result
+SoundManager::SetSoundMode(SoundMode soundMode)
+{
+ if (__pSoundCallSession == null)
+ {
+ return E_FAILURE;
+ }
+ sound_call_session_mode_e sessionMode;
+ switch (soundMode)
+ {
+ case SOUND_MODE_RINGTONE:
+ {
+ sessionMode = SOUND_CALL_SESSION_MODE_RINGTONE;
+ break;
+ }
+ case SOUND_MODE_MEDIA:
+ {
+ sessionMode = SOUND_CALL_SESSION_MODE_MEDIA;
+ break;
+ }
+ case SOUND_MODE_VOICE:
+ {
+ sessionMode = SOUND_CALL_SESSION_MODE_VOICE;
+ }
+ break;
+ default:
+ {
+ sessionMode = SOUND_CALL_SESSION_MODE_RINGTONE;
+ break;
+ }
+ }
+ int res = sound_manager_call_session_set_mode(__pSoundCallSession,sessionMode);
+ if (res != SOUND_MANAGER_ERROR_NONE)
+ {
+ return E_FAILURE;
+ }
+ return E_SUCCESS;
+}
+
+void
+SoundManager::OnTimerExpired(Timer& timer)
+{
+ AppLogDebug("Enter");
+ String reminderTonePath;
+ int unknownRejectStatus = -1;
+ vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
+ bool ReminderToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
+ reminderTonePath.Append(MINUTEREMINDERTONE_PATH);
+
+ if(ReminderToneSetStatus == true)
+ {
+
+ if(__pReminderPlayer == null)
+ {
+
+ if(reminderTonePath.IsEmpty() == false)
+ {
+ __pReminderPlayer = new (std::nothrow) Player();
+ res = __pReminderPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pReminderPlayer Construct failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
+ return;
+ }
+ res = __pReminderPlayer->OpenFile(reminderTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pReminderPlayer OpenFile failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
+ return;
+ }
+ res = __pReminderPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pReminderPlayer SetLooping failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
+ return;
+ }
+ res = __pReminderPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pReminderPlayer SetVolume failed with %d",res);
+ delete __pReminderPlayer;
+ __pReminderPlayer = null;
+ return;
+ }
+ }
+ }
+
+ if(__pReminderPlayer != null)
+ {
+ SetSoundMode(SOUND_MODE_MEDIA);
+ res = __pReminderPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pReminderPlayer Play failed with %d",res);
+ return;
+ }
+ SetSoundMode(SOUND_MODE_VOICE);
+ }
+ }
+ /*else if(ReminderToneSetStatus == false)
+ {
+ timer.Cancel();
+ }*/
+
+}
+
+
+
+void
+SoundManager::SetDisconnectTone(void)
+{
+
+ AppLogDebug("Enter");
+ int unknownRejectStatus = -1;
+ String disconnectTonePath=L"";
+ vconf_get_bool(VCONFKEY_CISSAPPL_CALL_END_TONE_BOOL, &unknownRejectStatus);
+ bool disconnectToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
+
+ if(disconnectToneSetStatus == true)
+ {
+ AppLogDebug("disconnectToneSetStatus == true");
+ disconnectTonePath.Append(CALLDISCONNECTTONE_PATH);
+ if(disconnectTonePath.IsEmpty() == false)
+ {
+ if(__pDisconnectPlayer == null)
+ {
+ AppLogDebug("__pConnectPlayer == null");
+ __pDisconnectPlayer = new (std::nothrow) Player();
+ res = __pDisconnectPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pDisconnectPlayer Construct failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
+ return;
+ }
+ res = __pDisconnectPlayer->OpenFile(disconnectTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pDisconnectPlayer OpenFile failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
+ return;
+ }
+ res = __pDisconnectPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pDisconnectPlayer SetLooping failed with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
+ return;
+ }
+ res = __pDisconnectPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pDisconnectPlayer SetLooping SetVolume with %d",res);
+ delete __pDisconnectPlayer;
+ __pDisconnectPlayer = null;
+ return;
+ }
+
+ }
+ }
+
+ if(__pDisconnectPlayer != null)
+ {
+ AppLogDebug("__pDisconnectPlayer OpenFile %ls",disconnectTonePath.GetPointer());
+ SetSoundMode(SOUND_MODE_MEDIA);
+ AppLogDebug("__pDisconnectPlayer SetVolume");
+ if(__pDisconnectPlayer->GetState() == PLAYER_STATE_PLAYING)
+ {
+ __pDisconnectPlayer->Stop();
+ }
+ res = __pDisconnectPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pDisconnectPlayer Play with %d",res);
+ return;
+ }
+ }
+
+ }
+
+
+
+
+ AppLogDebug("Exit");
+
+}
+
+void
+SoundManager::SetMinuteReminderTone(void)
+{
+ __timer.StartAsRepeatable(60000);
+}
+
+
+void
+SoundManager::SetConnectTone(void)
+{
+
+ String connectTonePath;
+ int unknownRejectStatus = -1;
+ vconf_get_bool(VCONFKEY_CISSAPPL_CALL_CONNECT_TONE_BOOL, &unknownRejectStatus);
+ bool connectToneSetStatus = unknownRejectStatus;
+ result res = E_FAILURE;
+
+ connectTonePath.Append(CALLCONNECTTONE_PATH);
+
+ if(connectToneSetStatus == true)
+ {
+
+ if(__pConnectPlayer == null)
+ {
+ if (connectTonePath.IsEmpty() == false)
+ {
+ __pConnectPlayer = new (std::nothrow) Player();
+ res = __pConnectPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pConnectPlayer Construct failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
+ return;
+ }
+ res = __pConnectPlayer->OpenFile(connectTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pConnectPlayer OpenFile failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
+ return;
+ }
+ res = __pConnectPlayer->SetLooping(false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pConnectPlayer SetLooping failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
+ return;
+ }
+ res = __pConnectPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pConnectPlayer SetVolume failed with %d",res);
+ delete __pConnectPlayer;
+ __pConnectPlayer = null;
+ return;
+ }
+ }
+ }
+
+ if(__pConnectPlayer != null)
+ {
+ res = SetSoundMode(SOUND_MODE_MEDIA);
+ AppLogDebug("__pConnectPlayer Playing connect tone");
+ res = __pConnectPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pConnectPlayer Play failed with %d",res);
+ return;
+ }
+ }
+
+ }
+
+
+}
+
+void
+SoundManager::SetWaitTone(void)
+{
+ CallAlertStatus status= CALL_ALERT_SOUND;
+ int alertStatus = -1;
+ result res = E_FAILURE;
+ int retVal = vconf_get_int(VCONFKEY_CISSAPPL_ALERT_ON_CALL_INT, &alertStatus);
+ if (retVal == 0)
+ {
+ status = (CallAlertStatus) alertStatus;
+ }
+ AppLogDebug("No Alert already in call");
+ if(status == CALL_ALERT_SOUND)
+ {
+ AppLogDebug("Playing alert tone");
+ String waitingTonePath;
+ waitingTonePath.Append(CALLWAITINGTONE_PATH);
+ if(__pWaitingTonePlayer == null)
+ {
+ if (waitingTonePath.IsEmpty() == false)
+ {
+ __pWaitingTonePlayer = new (std::nothrow) Player();
+ res = __pWaitingTonePlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pWaitingTonePlayer Construct failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+ return;
+ }
+ res = __pWaitingTonePlayer->OpenFile(waitingTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pWaitingTonePlayer OpenFile failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
+ return;
+ }
+ res = __pWaitingTonePlayer->SetLooping(true);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pWaitingTonePlayer SetLooping failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
+ return;
+ }
+ res = __pWaitingTonePlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pWaitingTonePlayer SetVolume failed with %d",res);
+ delete __pWaitingTonePlayer;
+ __pWaitingTonePlayer = null;
+
+ return;
+ }
+ }
+ }
+
+ if( __pWaitingTonePlayer != null )
+ {
+ SetSoundMode(SOUND_MODE_MEDIA);
+ res = __pWaitingTonePlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pWaitingTonePlayer Play failed with %d",res);
+ return;
+ }
+ }
+
+ }
+}
+
+void
+SoundManager::ResumeAlert(String& contactRingTone)
+{
+ AppLogDebug("Enter");
+ result res = E_FAILURE;
+ IntensityDurationVibrationPattern vibration;
+ vibration.duration = 3000;
+ vibration.intensity = -1;
+ AppLogDebug("Enter");
+ /* if(__pWaitingTonePlayer != null)
+ {
+ if(__pWaitingTonePlayer->GetState() == PLAYER_STATE_PLAYING)
+ {
+ __pWaitingTonePlayer->Stop();
+ }
+ }*/
+ StopAlert();
+ if(__pSoundCallSession == null)
+ {
+ StartSession();
+ }
+ if(__pVibrator == null)
+ {
+ __pVibrator = new (std::nothrow) Vibrator();
+ res = __pVibrator->Construct();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pVibrator Construct failed with %d",res);
+ return;
+ }
+ }
+ if(__pPlayer == null)
+ {
+ __pPlayer = new (std::nothrow) Player();
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ delete __pPlayer;
+ __pPlayer = null;
+ return;
+ }
+ }
+ int retVal = -1;
+ vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &retVal);
+ __isSoundStatusOn = retVal;
+ vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &retVal);
+ __isVibrateStatusOn = retVal;
+ //todo: do only if call alert mode is set
+ if (__isSoundStatusOn == true)
+ {
+ String ringTonePath;
+ //Check if contact has any custom ringtone, else play defautl ringtone.
+ if(contactRingTone.IsEmpty() == true)
+ {
+ char* pRingTonePtr = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR);
+ AppLog("Ringtone Path : %s",pRingTonePtr);
+ ringTonePath.Append(pRingTonePtr);
+ }
+ else
+ {
+ AppLog("Ringtone Path : %ls",contactRingTone.GetPointer());
+ ringTonePath.Append(contactRingTone);
+ }
+
+ //Check if file is present
+ File file;
+ res = file.Construct(ringTonePath, "r");
+ if(res != E_SUCCESS )
+ {
+ ringTonePath.Clear();
+ ringTonePath.Append(RINGTONE_PATH);
+ }
+
+ res = __pPlayer->OpenFile(ringTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(true);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetVolume failed with %d",res);
+ return;
+ }
+ res = SetSoundMode(SOUND_MODE_RINGTONE);
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play failed with %d",res);
+ return;
+ }
+ }
+ if (__isVibrateStatusOn == true)
+ {
+ //todo: Get the level from settings
+ __pVibrator->Start(&vibration, 1, 1000);
+ }
+ AppLogDebug("Exit");
+ return;
+}
+
+void
+SoundManager::StartAlert(String& contactRingTone)
+{
+ result res = E_FAILURE;
+ IntensityDurationVibrationPattern vibration;
+ vibration.duration = 3000;
+ vibration.intensity = -1;
+ AppLogDebug("Enter");
+ if(__pSoundCallSession != null)
+ {
+ SetWaitTone();
+ return;
+ }
+ else
+ {
+ StartSession();
+ }
+ if(__pVibrator == null)
+ {
+ __pVibrator = new (std::nothrow) Vibrator();
+ res = __pVibrator->Construct();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pVibrator Construct failed with %d",res);
+ return;
+ }
+ }
+ if(__pPlayer == null)
+ {
+ __pPlayer = new (std::nothrow) Player();
+ res = __pPlayer->Construct(*this);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Construct failed with %d",res);
+ delete __pPlayer;
+ __pPlayer = null;
+ return;
+ }
+ }
+ int retVal = -1;
+ vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &retVal);
+ __isSoundStatusOn = retVal;
+ vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &retVal);
+ __isVibrateStatusOn = retVal;
+ //todo: do only if call alert mode is set
+ if (__isSoundStatusOn == true)
+ {
+ String ringTonePath;
+ //Check if contact has any custom ringtone, else play defautl ringtone.
+ if(contactRingTone.IsEmpty() == true)
+ {
+ char* pRingTonePtr = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR);
+ AppLog("Ringtone Path : %s",pRingTonePtr);
+ ringTonePath.Append(pRingTonePtr);
+ }
+ else
+ {
+ AppLog("Ringtone Path : %ls",contactRingTone.GetPointer());
+ ringTonePath.Append(contactRingTone);
+ }
+
+ //Check if file is present
+ File file;
+ res = file.Construct(ringTonePath, "r");
+ if(res != E_SUCCESS )
+ {
+ ringTonePath.Clear();
+ ringTonePath.Append(RINGTONE_PATH);
+ }
+
+ res = __pPlayer->OpenFile(ringTonePath,false);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer OpenFile failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetLooping(true);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetLooping failed with %d",res);
+ return;
+ }
+ res = __pPlayer->SetVolume(80);
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer SetVolume failed with %d",res);
+ return;
+ }
+ res = SetSoundMode(SOUND_MODE_RINGTONE);
+ res = __pPlayer->Play();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Play failed with %d",res);
+ return;
+ }
+ }
+ if (__isVibrateStatusOn == true)
+ {
+ //todo: Get the level from settings
+ __pVibrator->Start(&vibration, 1, 1000);
+ }
+ AppLogDebug("Exit");
+ return;
+}
+
+void
+SoundManager::StopAlert(void)
+{
+ result res = E_FAILURE;
+ AppLogDebug("Enter");
+ if (__isSoundStatusOn == true)
+ {
+ //todo: stop player
+ if(__pPlayer != null)
+ {
+ AppLogDebug("Stopping ring tone");
+ if(__pPlayer->GetState() == PLAYER_STATE_PLAYING)
+ {
+ res = __pPlayer->Stop();
+ }
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Stop failed with %d",res);
+
+ }
+ res = __pPlayer->Close();
+ if(res != E_SUCCESS)
+ {
+ AppLogDebug("__pPlayer Close failed with %d",res);
+
+ }
+ SetSoundMode(SOUND_MODE_VOICE);
+ __isSoundStatusOn = false;
+ StopSession();
+ }
+ }
+ if (__isVibrateStatusOn == true)
+ {
+ __pVibrator->Stop();
+ __isVibrateStatusOn = false;
+ }
+ if(__pWaitingTonePlayer != null)
+ {
+ if(__pWaitingTonePlayer->GetState() == PLAYER_STATE_PLAYING)
+ {
+ __pWaitingTonePlayer->Stop();
+ }
+ }
+
+ AppLogDebug("Exit");
+}
+
+void
+SoundManager::OnPlayerOpened(result r)
+{
+}
+
+void
+SoundManager::OnPlayerEndOfClip(void)
+{
+}
+
+void
+SoundManager::OnPlayerSeekCompleted(result r)
+{
+}
+
+void
+SoundManager::OnPlayerBuffering(int percent)
+{
+}
+
+void
+SoundManager::OnPlayerErrorOccurred(Tizen::Media::PlayerErrorReason r)
+{
+}
+
+void
+SoundManager::OnPlayerInterrupted(void)
+{
+}
+
+void
+SoundManager::OnPlayerReleased(void)
+{
+}
+
+bool
+SoundManager::IsEarJackConnected(void)
+{
+ int earJackStatus = -1;
+ if (vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &earJackStatus) == 0)
+ {
+ if (earJackStatus == VCONFKEY_SYSMAN_EARJACK_REMOVED)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ else
+ {
+ return false;
+ }
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallTelephonyManager.cpp
+ * @brief Call log item provider
+ */
+#include <stdio.h>
+#include <FBaseSys.h>
+#include <FSystem.h>
+#include <FTelephony.h>
+#include "ITapiModem.h"
+#include "ITapiSim.h"
+#include "CallApp.h"
+#include "CallInfo.h"
+#include "CallTelephonyManager.h"
+#include "CallSettingsManager.h"
+#include "CallTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Social;
+using namespace Tizen::System;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
+
+const char* callEventList[] = {
+ TAPI_NOTI_VOICE_CALL_STATUS_IDLE,
+ TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE,
+ TAPI_NOTI_VOICE_CALL_STATUS_HELD,
+ TAPI_NOTI_VOICE_CALL_STATUS_DIALING,
+ TAPI_NOTI_VOICE_CALL_STATUS_ALERT,
+ TAPI_NOTI_VOICE_CALL_STATUS_WAITING,
+ TAPI_NOTI_CALL_INFO_CALL_CONNECTED_LINE,
+ TAPI_NOTI_CALL_INFO_WAITING,
+ TAPI_NOTI_CALL_INFO_CUG,
+ TAPI_NOTI_CALL_INFO_FORWARDED,
+ TAPI_NOTI_CALL_INFO_BARRED_INCOMING,
+ TAPI_NOTI_CALL_INFO_BARRED_OUTGOING,
+ TAPI_NOTI_CALL_INFO_DEFLECTED,
+ TAPI_NOTI_CALL_INFO_CLIR_SUPPRESSION_REJECT,
+ TAPI_NOTI_CALL_INFO_FORWARD_UNCONDITIONAL,
+ TAPI_NOTI_CALL_INFO_FORWARD_CONDITIONAL,
+ TAPI_NOTI_CALL_INFO_CALL_LINE_IDENTITY,
+ TAPI_NOTI_CALL_INFO_CALL_NAME_INFORMATION,
+ TAPI_NOTI_CALL_INFO_FORWARDED_CALL,
+ TAPI_NOTI_CALL_INFO_CUG_CALL,
+ TAPI_NOTI_CALL_INFO_DEFLECTED_CALL,
+ TAPI_NOTI_CALL_INFO_TRANSFERED_CALL,
+ TAPI_NOTI_CALL_INFO_HELD,
+ TAPI_NOTI_CALL_INFO_ACTIVE,
+ TAPI_NOTI_CALL_INFO_JOINED,
+ TAPI_NOTI_CALL_INFO_RELEASED_ON_HOLD,
+ TAPI_NOTI_CALL_INFO_TRANSFER_ALERT,
+ TAPI_NOTI_CALL_INFO_TRANSFERED,
+ TAPI_NOTI_CALL_INFO_CF_CHECK_MESSAGE,
+};
+
+TelephonyManager* TelephonyManager::__pManager = null;
+
+TelephonyManager::TelephonyManager(ITelephonyEventListener* pEventListener)
+: __pEventListener(pEventListener)
+{
+ __pDialedCall = null;
+ __pIncomingCall = null;
+ __pActiveCallList = null;
+ __pSettingsManager = null;
+ __pTapiHandle = null;
+ __pAddressBook = null;
+ __pCachedContact = null;
+ __isMuted = false;
+ __isSpeakerOn = false;
+ __pSoundManager = null;
+ __pCalllogMgr = null;
+ __pNetworkManager = null;
+ __isDialCallPresentAfterHold = false;
+ __pDialNumberAfterHold = null;
+ __isDialNumberAfterHoldEmergency = false;
+}
+
+TelephonyManager::~TelephonyManager(void)
+{
+ AppLogDebug("Enter");
+ if (__pActiveCallList != null)
+ {
+ delete __pActiveCallList;
+ }
+
+ if (__pDialedCall != null)
+ {
+ delete __pDialedCall;
+ __pDialedCall = null;
+ }
+
+ if (__pIncomingCall != null)
+ {
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+ }
+
+ if (__pAddressBook != null)
+ {
+ delete __pAddressBook;
+ __pAddressBook = null;
+ }
+ if (__pCachedContact != null)
+ {
+ delete __pCachedContact;
+ __pCachedContact = null;
+ }
+
+ //unregister for events from TAPI Lib.
+ UnregisterEvents();
+
+ //De-initialize the TAPI Library
+ if(__pTapiHandle != null)
+ {
+ tel_deinit(__pTapiHandle);
+ }
+
+ if (__pSoundManager != null)
+ {
+ delete __pSoundManager;
+ }
+
+ if (__pCalllogMgr != null)
+ {
+ __pCalllogMgr = null;
+ }
+ AppLogDebug("Exit");
+}
+
+TelephonyManager*
+TelephonyManager::GetInstance(ITelephonyEventListener* pEventListener)
+{
+ AppLogDebug("Enter");
+ if (__pManager == null)
+ {
+ CreateInstance(pEventListener);
+ }
+ return __pManager;
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::CreateInstance(ITelephonyEventListener* pEventListener)
+{
+ AppLogDebug("Enter");
+ __pManager = new (std::nothrow) TelephonyManager(pEventListener);
+ result r = __pManager->Initialize();
+ if (IsFailed(r))
+ {
+ delete __pManager;
+ __pManager = null;
+ }
+ atexit(&(TelephonyManager::DestroyInstance));
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::DestroyInstance(void)
+{
+ AppLogDebug("Enter");
+ if (__pManager != null)
+ {
+ __pManager->EndAllCalls();
+ delete __pManager;
+ __pManager = null;
+ }
+ vconf_ignore_key_changed(VCONFKEY_BT_HEADSET_SCO,TelephonyManager::OnBluetoothStateChange);
+ AppLogDebug("Exit");
+}
+
+result
+TelephonyManager::Initialize(void)
+{
+ AppLogDebug("Enter");
+ //Initialize telephony library
+ result r = InitializeTelephonyLibrary();
+ if (IsFailed(r))
+ {
+ return r;
+ }
+ __pActiveCallList = new (std::nothrow) HashMapT<long, AppCallInfo>();
+ __pActiveCallList->Construct(IDI_MAX_ACTIVE_CALLS);
+
+ //Initialize the Settings Manager to fetch call settings
+ __pSettingsManager = SettingsManager::GetInstance();
+
+ __pSoundManager = new (std::nothrow) SoundManager();
+ __pCalllogMgr = CallLogManager::GetInstance();
+
+ //initialize address book to fetch contacts information
+ __pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+ if(__pAddressBook == null)
+ {
+ return E_FAILURE;
+ }
+ __pNetworkManager = new NetworkManager();
+ if(__pNetworkManager != null)
+ {
+ __pNetworkManager->Construct(this);
+ }
+ vconf_notify_key_changed(VCONFKEY_BT_HEADSET_SCO,TelephonyManager::OnBluetoothStateChange,this);
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::InitializeTelephonyLibrary(void)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+
+ __pTapiHandle = tel_init(null);
+ if (__pTapiHandle != null)
+ {
+ //register telephony events
+ int errorCode = RegisterEvents();
+ if (errorCode == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ }
+ //TAPI Library is initialized and events registered successfully
+ AppLogDebug("Exit");
+ return r;
+}
+
+int
+TelephonyManager::RegisterEvents(void)
+{
+ AppLogDebug("Enter");
+ int errCode = -1;
+ int eventCount = sizeof(callEventList) / sizeof(char *);
+ for (int index = 0; index < eventCount; index++)
+ {
+ errCode = tel_register_noti_event(__pTapiHandle, callEventList[index], &HandleCallback, this);
+ if (errCode != TAPI_API_SUCCESS)
+ {
+ return errCode;
+ }
+ }
+ AppLogDebug("Exit");
+ return errCode;
+}
+
+void
+TelephonyManager::UnregisterEvents(void)
+{
+ AppLogDebug("Enter");
+ int eventCount = sizeof(callEventList) / sizeof(char *);
+ for (int index = 0; index < eventCount; index++)
+ {
+ tel_deregister_noti_event(__pTapiHandle, callEventList[index]);
+ }
+ AppLogDebug("Exit");
+}
+
+ErrorCodes
+TelephonyManager::SetupMoCall(String& contactNumber, bool isEmergency)
+{
+ AppLogDebug("Enter");
+ result res = E_SUCCESS;
+ //check if valid phone number exist
+ res = CheckValidTelePhoneNumber(contactNumber);
+ if (IsFailed(res))
+ {
+ AppLogDebug("ERROR_INVALID_NUMBER");
+ return ERROR_INVALID_NUMBER;
+ }
+
+ //if dialing an emergency call and active calls exist
+ //then end all active calls.
+ if (isEmergency && __pActiveCallList->GetCount() > 0)
+ {
+ //Get first call handle
+ AppCallInfo endCallInfo;
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ pCallList->GetAt(0, endCallInfo);
+ int callHandle = endCallInfo.GetCallHandle()->ToLong();
+ delete pCallList;
+ pCallList = null;
+
+ //release all active or held calls
+ AppLogDebug("TAPI_CALL_END_ALL");
+ int tapiRes = tel_end_call(__pTapiHandle, callHandle, TAPI_CALL_END_ALL, &HandleCallbackResponse, this);
+ if (tapiRes == TAPI_CAUSE_SUCCESS)
+ {
+ __pActiveCallList->RemoveAll();
+ res = E_SUCCESS;
+ }
+ else
+ {
+ res = E_FAILURE;
+ }
+ }
+ else if (__pActiveCallList->GetCount() == 1)
+ {
+ //Check if there is already an active call,
+ //Put the already active call on hold.
+ AppCallInfo holdCallInfo;
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+
+ pCallList->GetAt(0, holdCallInfo);
+ //Check if call is active, then put on hold
+ if (holdCallInfo.IsOnHold() == false)
+ {
+ AppLogDebug("holdCallInfo.IsOnHold()");
+ __isDialCallPresentAfterHold = true;
+ __pDialNumberAfterHold = new (std::nothrow) String(contactNumber);
+ __isDialNumberAfterHoldEmergency = isEmergency;
+ res = HoldActiveCall(&holdCallInfo, true);
+ }
+ else
+ {
+ res = DialOutgoingCall(contactNumber, isEmergency);
+ }
+ delete pCallList;
+ pCallList = null;
+
+ }
+ //make the next call, only if any existing active call
+ //is successfully put on hold or is already on hold.
+ else
+ {
+ AppLogDebug("DialOutgoingCall");
+ res = DialOutgoingCall(contactNumber, isEmergency);
+ }
+
+ if(res == E_SUCCESS)
+ {
+ return ERROR_NONE;
+ }
+ else if (res == TAPI_CAUSE_CALL_BARRED)
+ {
+ return ERROR_CALL_BARRED;
+ }
+ else
+ {
+ return ERROR_TAPI_ERROR;
+ }
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::EndAllCalls(void)
+{
+ AppLogDebug("Enter");
+ if(__pDialedCall != null)
+ {
+ if(__pDialedCall->GetCallHandle() != null)
+ {
+ tel_end_call(__pTapiHandle, __pDialedCall->GetCallHandle()->ToLong(), TAPI_CALL_END, &HandleCallbackResponse, this);
+ }
+ }
+ tel_end_call(__pTapiHandle, -1, TAPI_CALL_END_HOLD_ALL, &HandleCallbackResponse, this);
+ //end all active calls before terminating application
+ tel_end_call(__pTapiHandle, -1, TAPI_CALL_END_ALL, &HandleCallbackResponse, this);
+ __pSettingsManager->SetCallState(CALL_STATE_CALL_OFF);
+ AppLogDebug("Exit");
+}
+
+result
+TelephonyManager::EndActiveCall(Long callHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ //fetch ended callInfo from active call list
+ AppCallInfo endCall;
+ r = __pActiveCallList->GetValue(callHandle.ToLong(), endCall);
+ if (r == E_SUCCESS)
+ {
+ r = EndCall(endCall);
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::EndDialingCall(String& contactNumber)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ //This is because for a dialing call, call handle is updated with some delay in telephony manager.
+ //And it is not available with outgoing call screen.
+ if (contactNumber.IsEmpty())
+ {
+ return r;
+ }
+
+ //Check If Ended call matches Dialed Call.
+ AppCallInfo endCall;
+ if (__pDialedCall != null && __pDialedCall->GetContactNumber().Equals(contactNumber))
+ {
+ endCall = *__pDialedCall;
+ r = EndCall(endCall);
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::EndCall(AppCallInfo& endCallInfo)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+
+ if (endCallInfo.GetCallHandle() != null)
+ {
+ unsigned int callHandle = endCallInfo.GetCallHandle()->ToLong();
+ //end "dialed but unconnected" call or active call - processing to be handled in HandleIdleCallback().
+ AppLogDebug("TAPI_CALL_END");
+ int res = tel_end_call(__pTapiHandle, callHandle, TAPI_CALL_END, &HandleCallbackResponse, this);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::AnswerAutoRejectCall(int callHandle)
+{
+ //Incoming call automatically blocked is handled here.
+ AppLogDebug("Enter ");
+ result r = E_FAILURE;
+ TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_REJECT;
+ int res = -1;
+
+ AppLogDebug("tel_answer_call");
+ //save to logs db.
+ AppCallInfo rejectedCallInfo;
+ rejectedCallInfo = *(__pIncomingCall);
+ rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_BLOCKED);
+ SaveCallInfoToLogsDb(rejectedCallInfo);
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+
+ // redirect to reject call back handler as the flow has to be handled
+ res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleCallbackResponse, this);
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::AnswerCall(int callHandle, bool acceptCall)
+{
+ AppLogDebug("Enter %d %d",acceptCall,callHandle);
+ result r = E_FAILURE;
+ __pSoundManager->StopAlert();
+ TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
+ int res = -1;
+ if (acceptCall == true)
+ {
+ answerType = TAPI_CALL_ANSWER_ACCEPT;
+ // redirect to dummy call back handler as the flow already handled in registered event callback
+ res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleCallbackResponse, this);
+ }
+ else
+ {
+ AppLogDebug("tel_answer_call");
+ answerType = TAPI_CALL_ANSWER_REJECT;
+ // redirect to reject call back handler as the flow has to be handled
+ res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleRejectCallbackResponse, this);
+ }
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::AcceptCall(CallAnsweringOptions answerOptions,int callHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ __pSoundManager->StopAlert();
+ __pSoundManager->SetSoundMode(SOUND_MODE_VOICE);
+
+ //Check if this is a new incoming call
+ if(__pIncomingCall == null || (callHandle != (unsigned int)__pIncomingCall->GetCallHandle()->ToLong()))
+ {
+ //construct and fetch new Incoming call Info
+ String incomingHandle;
+ incomingHandle.Append(callHandle);
+ AppCallInfo* pDuplicateCallInfo = FetchIncomingCallHandleN(incomingHandle, String(L""));
+ if(pDuplicateCallInfo == null)
+ {
+ r = E_SUCCESS;
+ return r;
+ }
+ delete pDuplicateCallInfo;
+ pDuplicateCallInfo = null;
+ }
+
+ switch(answerOptions)
+ {
+ case ANSERWING_OPTION_HOLD_SINGLE_CALL:
+ case ANSERWING_OPTION_END_SINGLE_CALL:
+ {
+ //N_SE-50012
+ if(__pActiveCallList->GetCount() < 1)
+ {
+ r = E_SUCCESS;
+ return r;
+ }
+ r = AcceptSecondCall(answerOptions, callHandle);
+ }
+ break;
+
+ case ANSERWING_OPTION_REPLACE_ACTIVE_CALL:
+ case ANSERWING_OPTION_REPLACE_HELD_CALL:
+ case ANSERWING_OPTION_END_ALL_CALLS:
+ {
+ //N_SE-50012
+ if(__pActiveCallList->GetCount() < 2)
+ {
+ //some call got disconnected just when we are trying to answer
+ r = E_SUCCESS;
+ return r;
+
+ }
+ r = AcceptMultipleCall(answerOptions, callHandle);
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::AcceptSecondCall(CallAnsweringOptions answerOptions, const int incomingCallHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+
+ switch (answerOptions)
+ {
+ case ANSERWING_OPTION_HOLD_SINGLE_CALL:
+ {
+ //accept incoming call by putting active call on Hold with 'TAPI_CALL_ANSWER_HOLD_AND_ACCEPT'
+ int res = tel_answer_call(__pTapiHandle, incomingCallHandle, TAPI_CALL_ANSWER_HOLD_AND_ACCEPT, &HandleCallbackResponse, this);
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ break;
+ }
+
+ //Call connected successfully
+ r = E_SUCCESS;
+ //update status of first call to "OnHold"
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ AppCallInfo firstCallInfo;
+ pCallList->GetAt(0, firstCallInfo);
+ //replace old object with update AppCallInfo
+ AppCallInfo* pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ *pHeldCallInfo = firstCallInfo;
+ pHeldCallInfo->SetOnHold(true);
+ __pActiveCallList->Remove(firstCallInfo.GetCallHandle()->ToLong());
+ __pActiveCallList->Add(pHeldCallInfo->GetCallHandle()->ToLong(), *pHeldCallInfo);
+ delete pCallList;
+ pCallList = null;
+ }
+ break;
+
+ case ANSERWING_OPTION_END_SINGLE_CALL:
+ {
+ //Transfer Old active calls to a separate list to avoid any processing in HandleIdleCallback().
+ HashMapT<long, AppCallInfo>* pEndCallsList = __pActiveCallList;
+ //create a new ActiveCallList
+ __pActiveCallList = new (std::nothrow) HashMapT<long, AppCallInfo>();
+ __pActiveCallList->Construct(IDI_MAX_ACTIVE_CALLS);
+
+ //accept call and reject all active calls with 'TAPI_CALL_ANSWER_REPLACE'
+ int res = tel_answer_call(__pTapiHandle, incomingCallHandle, TAPI_CALL_ANSWER_REPLACE, &HandleCallbackResponse, this);
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ //delete newly constructed list and gain ownership of old list
+ delete __pActiveCallList;
+ __pActiveCallList = pEndCallsList;
+ break;
+ }
+
+ //Call connected successfully
+ r = E_SUCCESS;
+ //Add calls information to call log before deleting from active call list.
+ IListT<AppCallInfo>* pCallList = pEndCallsList->GetValuesN();
+ if(pCallList != null)
+ {
+ AppCallInfo endCallInfo;
+ if (pCallList->GetAt(0, endCallInfo) == E_SUCCESS)
+ {
+ SaveCallInfoToLogsDb(endCallInfo);
+ }
+ delete pCallList;
+ }
+ pEndCallsList->RemoveAll();
+ delete pEndCallsList;
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::AcceptMultipleCall(CallAnsweringOptions answerOptions, const int incomingCallHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+
+ switch (answerOptions)
+ {
+ case ANSERWING_OPTION_REPLACE_ACTIVE_CALL:
+ {
+ //Replace "Active" call by incoming call and save ended call to call logs db.
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ AppCallInfo callToBeEnded;
+ pCallList->GetAt(0, callToBeEnded);
+ //Check if the call is on "Hold", then fetch 2nd callInfo
+ if (callToBeEnded.IsOnHold() == true)
+ {
+ pCallList->GetAt(1, callToBeEnded);
+ }
+ delete pCallList;
+ pCallList = null;
+
+ //remove "CallToBeEnded" from Active call list to avoid processing in HandleIdleCallback().
+ __pActiveCallList->Remove(callToBeEnded.GetCallHandle()->ToLong());
+
+ //Accept incoming call by End Active call with 'TAPI_CALL_ANSWER_REPLACE'
+ int res = tel_answer_call(__pTapiHandle, incomingCallHandle, TAPI_CALL_ANSWER_REPLACE, &HandleCallbackResponse, this);
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ //save the previous call back to active call list
+ __pActiveCallList->Add(callToBeEnded.GetCallHandle()->ToLong(), callToBeEnded);
+ break;
+ }
+
+ //Incoming Call connected successfully
+ r = E_SUCCESS;
+ //save to ended call to call logs db.
+ SaveCallInfoToLogsDb(callToBeEnded);
+ }
+ break;
+
+ case ANSERWING_OPTION_REPLACE_HELD_CALL:
+ {
+ //Replace "Held" call by incoming call and save ended call to call logs db.
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ //"Held" call is to be ended
+ AppCallInfo callToBeEnded;
+ //"Active" call will be put on Hold
+ AppCallInfo callToPutOnHold;
+ pCallList->GetAt(0, callToBeEnded);
+ //Check if the call is NOT "Held", then fetch 2nd callInfo
+ if (callToBeEnded.IsOnHold() == false)
+ {
+ callToPutOnHold = callToBeEnded;
+ pCallList->GetAt(1, callToBeEnded);
+ }
+ else
+ {
+ pCallList->GetAt(1, callToPutOnHold);
+ }
+ delete pCallList;
+ pCallList = null;
+
+ //remove "CallToBeEnded" from Active call list to avoid processing in HandleIdleCallback().
+ __pActiveCallList->Remove(callToBeEnded.GetCallHandle()->ToLong());
+
+ //End "Held" Call using 'TAPI_CALL_END'.
+ int res = -1;
+ if (callToBeEnded.IsConferenceCall() == false)
+ {
+ res = tel_end_call(__pTapiHandle, callToBeEnded.GetCallHandle()->ToLong(), TAPI_CALL_END, &HandleCallbackResponse, this);
+ }
+ else
+ {
+ IListT<AppCallInfo>* pParticipantsInfo = callToBeEnded.GetCallerList();
+ //need to end every participant individually for conference call
+ for (int index = 0; index < pParticipantsInfo->GetCount(); index++)
+ {
+ AppCallInfo memberCallInfo;
+ pParticipantsInfo->GetAt(index, memberCallInfo);
+ res = tel_end_call(__pTapiHandle, memberCallInfo.GetCallHandle()->ToLong(), TAPI_CALL_END, &HandleCallbackResponse, this);
+ }
+ }
+
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ //save the previous "callToBeEnded" call back to active call list
+ __pActiveCallList->Add(callToBeEnded.GetCallHandle()->ToLong(), callToBeEnded);
+ break;
+ }
+ //"Held" call successfully ended - Add call ended to call log database
+ SaveCallInfoToLogsDb(callToBeEnded);
+
+ //accept incoming call by Holding "Active" call using "TAPI_CALL_ANSWER_HOLD_AND_ACCEPT".
+ res = tel_answer_call(__pTapiHandle, incomingCallHandle, TAPI_CALL_ANSWER_HOLD_AND_ACCEPT, &HandleCallbackResponse, this);
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ break;
+ }
+
+ //Call connected successfully and active call is "Onhold"
+ r = E_SUCCESS;
+ //replace old object with update CallInfo
+ AppCallInfo* pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ *pHeldCallInfo = callToPutOnHold;
+ pHeldCallInfo->SetOnHold(true);
+ __pActiveCallList->Remove(callToPutOnHold.GetCallHandle()->ToLong());
+ __pActiveCallList->Add(pHeldCallInfo->GetCallHandle()->ToLong(), *pHeldCallInfo);
+ }
+ break;
+
+ case ANSERWING_OPTION_END_ALL_CALLS:
+ {
+ //End all active and Held calls after saving to call log. Incoming call is automatically accepted by TAPI engine,
+ // and processing of Incoming call is handled in HandleActiveCallback().
+
+ //Transfer Old active calls to a separate list to avoid any processing in HandleIdleCallback().
+ HashMapT<long, AppCallInfo>* pEndCallsList = __pActiveCallList;
+ //create a new ActiveCallList
+ __pActiveCallList = new (std::nothrow) HashMapT<long, AppCallInfo>();
+ __pActiveCallList->Construct(IDI_MAX_ACTIVE_CALLS);
+
+ //End all active calls and all hold calls
+ int res = tel_end_call(__pTapiHandle, -1, TAPI_CALL_END_ACTIVE_ALL, &HandleCallbackResponse, this);
+ if(res == 0)
+ {
+ res = tel_end_call(__pTapiHandle, -1, TAPI_CALL_END_HOLD_ALL, &HandleCallbackResponse, this);
+ }
+
+ if (res != 0)
+ {
+ r = E_FAILURE;
+ //delete newly constructed list and gain ownership of old list
+ delete __pActiveCallList;
+ __pActiveCallList = pEndCallsList;
+ break;
+ }
+
+ //all calls ended successfully, Incoming call is automatically accepted.
+ r = E_SUCCESS;
+
+ //Add calls information to call log before deleting from active call list.
+ IListT<AppCallInfo>* pCallList = pEndCallsList->GetValuesN();
+ if(pCallList != null)
+ {
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo endCallInfo;
+ if (pCallList->GetAt(index, endCallInfo) == E_SUCCESS)
+ {
+ SaveCallInfoToLogsDb(endCallInfo);
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ }
+ pEndCallsList->RemoveAll();
+ delete pEndCallsList;
+ pEndCallsList = null;
+ }
+ break;
+
+ default:
+ break;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::HoldCall(Tizen::Base::Long callHandle, bool holdCall)
+{
+ AppLogDebug("Enter");
+ result r = E_SUCCESS;
+ //Check if there are any existing active calls
+ if (__pActiveCallList->GetCount())
+ {
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo holdCallInfo;
+
+ r = pCallList->GetAt(index, holdCallInfo);
+ //check if an active call is found with matching contact no.
+ if ((r == E_SUCCESS) && (holdCallInfo.GetCallHandle()->Equals(callHandle)))
+ {
+ r = HoldActiveCall(&holdCallInfo, holdCall);
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ }
+
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::EndConferenceCall(void)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ //fetch conference callInfo to end
+ AppCallInfo confCallToEnd;
+ bool isConferenceCallFound = false;
+
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, confCallToEnd);
+ if (confCallToEnd.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+
+ if (isConferenceCallFound == true)
+ {
+ //End conference call
+ TelCallEndType_t callEndType = TAPI_CALL_END_ACTIVE_ALL;
+ if (confCallToEnd.IsOnHold() == true)
+ {
+ callEndType = TAPI_CALL_END_HOLD_ALL;
+ }
+ int res = tel_end_call(__pTapiHandle, confCallToEnd.GetCallHandle()->ToLong(), callEndType, &HandleEndConferenceCallbackResponse, this);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::HoldConferenceCall(bool holdCall)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ int confCallIndex = -1;
+ AppCallInfo confCallToHold;
+ bool isConferenceCallFound = false;
+
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int confCallCount = pCallList->GetCount();
+
+ for (int index = 0; index < confCallCount; index++)
+ {
+ pCallList->GetAt(index, confCallToHold);
+ if (confCallToHold.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ confCallIndex = index;
+ //Found the Conference call to be ended.
+ break;
+ }
+ }
+
+ if (isConferenceCallFound == false)
+ {
+ delete pCallList;
+ pCallList = null;
+ return r;
+ }
+
+ unsigned int callHandle = confCallToHold.GetCallHandle()->ToLong();
+ int res = TAPI_API_INVALID_INPUT;
+ if (holdCall == true)
+ {
+ res = tel_hold_call(__pTapiHandle, callHandle, &HandleHoldConferenceCallbackResponse, this);
+ }
+ else
+ {
+ res = tel_active_call(__pTapiHandle, callHandle, &HandleActiveConferenceCallbackResponse, this);
+ }
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+
+ delete pCallList;
+ pCallList = null;
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::JoinCall(void)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ int res = -1;
+ AppCallInfo activeCall;
+ AppCallInfo heldCall;
+ // Use enumerator to access elements in the map
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ r = pCallList->GetAt(0, activeCall);
+
+ if (r == E_SUCCESS)
+ {
+ r = pCallList->GetAt(1, heldCall);
+ if (r == E_SUCCESS)
+ {
+ unsigned int activeCallHandle = activeCall.GetCallHandle()->ToLong();
+ unsigned int heldCallHandle = heldCall.GetCallHandle()->ToLong();
+
+ //Check if participants in conference call are under limit.
+ if ((heldCall.IsConferenceCall() == true) && (heldCall.GetCallerListCount() < IDI_MAX_CONF_CALL_PARTICIPANTS))
+ {
+ res = tel_join_call(__pTapiHandle, heldCallHandle, activeCallHandle, &HandleJoinCallbackResponse, this);
+ }
+ else if (activeCall.GetCallerListCount() < IDI_MAX_CONF_CALL_PARTICIPANTS)
+ {
+ res = tel_join_call(__pTapiHandle, activeCallHandle, heldCallHandle, &HandleJoinCallbackResponse, this);
+ }
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ if (res == TAPI_API_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::HoldActiveCall(AppCallInfo* pActiveCallInfo, bool holdCall)
+{
+
+ AppLogDebug("Enter");
+ unsigned int callHandle = pActiveCallInfo->GetCallHandle()->ToLong();
+ AppLogDebug("Enter %d",callHandle);
+
+ int retStatus = -1;
+ if (holdCall == true)
+ {
+ retStatus = tel_hold_call(__pTapiHandle, callHandle, &HandleHoldCallbackResponse, this);
+ }
+ else
+ {
+ retStatus = tel_active_call(__pTapiHandle, callHandle, &HandleActiveCallbackResponse, this);
+ }
+
+ if (retStatus == TAPI_CAUSE_SUCCESS)
+ {
+ AppLogDebug("Exit");
+ return E_SUCCESS;
+ }
+ else
+ {
+ return E_FAILURE;
+ }
+}
+
+result
+TelephonyManager::DialOutgoingCall(String& contactNumber, bool isEmergency)
+{
+ TelCallDial_t structDialCall;
+
+ AppLogDebug("Enter %ls",contactNumber.GetPointer());
+ //Temp String to replace , with P and ; with W
+ String TempContactNum;
+ TempContactNum.Append(contactNumber);
+ TempContactNum.Replace(L",",L"W");
+ TempContactNum.Replace(L";",L",");
+ //conversion "contactNumber" to char*
+ const wchar_t* pContact = TempContactNum.GetPointer();
+ int len = TempContactNum.GetLength()+1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+
+
+ //initialize request parameter
+ memset(&structDialCall, '\0', sizeof(TelCallDial_t));
+ memcpy(structDialCall.szNumber, pNumber, strlen(pNumber));
+ AppLogDebug("%s",structDialCall.szNumber);
+ if(isEmergency == true)
+ {
+ structDialCall.CallType = TAPI_CALL_TYPE_E911;
+ }
+ else
+ {
+ structDialCall.CallType = TAPI_CALL_TYPE_VOICE;
+ }
+
+ int res = tel_dial_call(__pTapiHandle, &structDialCall, &HandleDialCallbackResponse, this);
+ if (__pSoundManager == null)
+ {
+ __pSoundManager = new (std::nothrow) SoundManager();
+ }
+ __pSoundManager->StartSession();
+ delete[] pNumber;
+ pNumber = null;
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ if (__pDialedCall != null)
+ {
+ delete __pDialedCall;
+ __pDialedCall = null;
+ }
+ __pDialedCall = new (std::nothrow) AppCallInfo();
+ __pDialedCall->SetContactNumber(contactNumber);
+ __pDialedCall->SetEmergency(isEmergency);
+ result r = FetchContactInfoForNumber(contactNumber);
+ if (!IsFailed(r))
+ {
+ __pDialedCall->SetContactInfo(*__pCachedContact);
+ }
+ AppLogDebug("Exit");
+ return E_SUCCESS;
+ }
+ else
+ {
+ AppLogDebug("%d",res);
+ return res;
+ }
+}
+
+result
+TelephonyManager::SwapCalls(void)
+{
+ result r = E_FAILURE;
+
+ AppLogDebug("Enter");
+ //check if there are atleast 2 active calls
+ if (__pActiveCallList->GetCount() == IDI_MAX_ACTIVE_CALLS)
+ {
+ int retStatus = 0;
+
+ //fetch call handles
+ IListT<long>* pCallHandleList = __pActiveCallList->GetKeysN();
+ long callHandle1 = 0;
+ pCallHandleList->GetAt(0, callHandle1);
+ long callHandle2 = 0;
+ pCallHandleList->GetAt(1, callHandle2);
+
+ retStatus = tel_swap_call(__pTapiHandle, callHandle1, callHandle2, &HandleSwapCallbackResponse, this);
+
+ if (retStatus == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ delete pCallHandleList;
+ pCallHandleList = null;
+ }
+
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::SendCallDTMF(String& textToBeSent)
+{
+ result r = E_FAILURE;
+ AppLogDebug("Enter");
+ //check if there is an active Call
+ if (__pActiveCallList->GetCount() > 0)
+ {
+ //conversion "textToBeSent" to char*
+ const wchar_t* pTextToBeSent = textToBeSent.GetPointer();
+ int len = textToBeSent.GetLength() + 1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pTextToBeSent, len);
+ int retStatus = tel_call_dtmf(__pTapiHandle, pNumber, &HandleCallbackResponse, this);
+ delete []pNumber;
+ pNumber = null;
+ if (retStatus == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::EndFromConference(int callHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ int confCallIndex = -1;
+ AppCallInfo endConfCall;
+ bool isConferenceCallFound = false;
+
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, endConfCall);
+ if (endConfCall.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ confCallIndex = index;
+ //Found the Conference call to be ended.
+ break;
+ }
+ }
+
+ delete pCallList;
+ pCallList = null;
+
+ if (isConferenceCallFound == false)
+ {
+ //no conference call found
+ return r;
+ }
+
+ //Identify the call to be ended and remove from list on API success
+ AppCallInfo callToBeEnded;
+ IListT<AppCallInfo>* pParticipantList = endConfCall.GetCallerList();
+ int participantCount = pParticipantList->GetCount();
+ for (int index = 0; index < participantCount; index++)
+ {
+ pParticipantList->GetAt(index, callToBeEnded);
+ if (callToBeEnded.GetCallHandle()->ToLong() == callHandle)
+ {
+ //Identify the call to be ended and remove from list on API success
+ TelCallEndType_t endType = TAPI_CALL_END;
+
+ int res = tel_end_call(__pTapiHandle, callHandle, endType, &HandleEndFromConferenceCallbackResponse, this);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ break;
+ }
+ }
+
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::SplitFromConference(int callHandle)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ int confCallIndex = -1;
+ AppCallInfo endConfCall;
+ bool isConferenceCallFound = false;
+
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, endConfCall);
+ if (endConfCall.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ confCallIndex = index;
+ //Found the Conference call to be ended.
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ if (isConferenceCallFound == false)
+ {
+ //no conference call found
+ return r;
+ }
+
+ //Identify the call to be ended and remove from list on API success
+ AppCallInfo callToBeEnded;
+ pCallList = endConfCall.GetCallerList();
+ callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, callToBeEnded);
+ if (callToBeEnded.GetCallHandle()->ToLong() == callHandle)
+ {
+ int res = tel_split_call(__pTapiHandle, callHandle, &HandleSplitFromConferenceCallbackResponse, this);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ break;
+ }
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+result
+TelephonyManager::SetMuteStatus(bool setMute)
+{
+ AppLogDebug("Enter");
+ TelSoundMuteStatus_t muteStatus;
+ result r = E_FAILURE;
+ if (setMute == true)
+ {
+ muteStatus = TAPI_SOUND_MUTE_STATUS_ON;
+ }
+ else
+ {
+ muteStatus = TAPI_SOUND_MUTE_STATUS_OFF;
+ }
+ int res = tel_set_call_mute_status(__pTapiHandle, muteStatus, &HandleCallbackResponse, this);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ __isMuted = setMute;
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ AppLogDebug("Exit");
+ return r;
+}
+
+bool
+TelephonyManager::IsCallMuted(void)
+{
+ AppLogDebug("Enter");
+ return __isMuted;
+}
+
+result
+TelephonyManager::SetSpeakerStatus(bool setSpeaker)
+{
+ AppLogDebug("Enter");
+
+ result res = __pSoundManager->SetSoundPath(setSpeaker);
+ TryReturn(res==E_SUCCESS,E_FAILURE,"SetSoundPath failed");
+ __isSpeakerOn = setSpeaker;
+ return E_SUCCESS;
+ /*result r = E_FAILURE;
+ TelCallSoundPathInfo_t callSoundPathInfo;
+ __pSoundManager->SetSpeakerStatus(setSpeaker);
+ if (setSpeaker == true)
+ {
+ callSoundPathInfo.path = TAPI_SOUND_PATH_SPK_PHONE;
+ }
+ else
+ {
+ callSoundPathInfo.path = TAPI_SOUND_PATH_HANDSET;
+ }
+ callSoundPathInfo.ex_volume = TelCallSoundPathInfo_t::TAPI_SOUND_EX_VOLUME_ON;
+
+ int res = tel_set_call_sound_path(__pTapiHandle, &callSoundPathInfo, &HandleCallbackResponse, this);
+
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ __isSpeakerOn = setSpeaker;
+ r = E_SUCCESS;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ AppLogDebug("Exit");
+ return r;*/
+}
+
+bool
+TelephonyManager::IsSpeakerOn(void)
+{
+ AppLogDebug("Enter");
+ return __isSpeakerOn;
+ AppLogDebug("Exit");
+}
+
+bool
+TelephonyManager::IsSplitAllowed(void)
+{
+ // Split functionality is allowed only if a one call is present.
+ // The call can be a single call or a conference call
+ AppLogDebug("Enter");
+ if (__pActiveCallList->GetCount() == 1)
+ {
+ return true;
+ }
+ AppLogDebug("Exit");
+ return false;
+}
+void
+TelephonyManager::HandleActiveConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ AppCallInfo confCallToHold;
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ if(pCallList == null)
+ {
+ return;
+ }
+ int confCallCount = pCallList->GetCount();
+
+ for (int index = 0; index < confCallCount; index++)
+ {
+ pCallList->GetAt(index, confCallToHold);
+ if (confCallToHold.IsConferenceCall() == true)
+ {
+ unsigned int conferenceCallHandleToHold = 0;
+ memcpy(&conferenceCallHandleToHold, pData, sizeof(TS_UINT));
+ if (callBackResult == TAPI_API_SUCCESS)
+ {
+ confCallToHold.SetOnHold(false);
+ AppCallInfo* pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *pConfCallInfo = confCallToHold;
+ pTelManager->__pActiveCallList->Remove(conferenceCallHandleToHold);
+ pTelManager->__pActiveCallList->Add(conferenceCallHandleToHold, *pConfCallInfo);
+ pTelManager->__pEventListener->HandleConfCallActiveOccured(true);
+ }
+ break;
+ }
+ }
+
+ if(pCallList != null)
+ {
+ delete pCallList;
+ pCallList = null;
+ }
+ AppLogDebug("Exit");
+}
+void
+TelephonyManager::HandleHoldConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ AppCallInfo confCallToHold;
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ if(pCallList == null)
+ {
+ return;
+ }
+ int confCallCount = pCallList->GetCount();
+
+ for (int index = 0; index < confCallCount; index++)
+ {
+ pCallList->GetAt(index, confCallToHold);
+ if (confCallToHold.IsConferenceCall() == true)
+ {
+ unsigned int conferenceCallHandleToHold = 0;
+ memcpy(&conferenceCallHandleToHold, pData, sizeof(TS_UINT));
+ if (callBackResult == TAPI_API_SUCCESS)
+ {
+ confCallToHold.SetOnHold(true);
+ AppCallInfo* pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *pConfCallInfo = confCallToHold;
+ pTelManager->__pActiveCallList->Remove(conferenceCallHandleToHold);
+ pTelManager->__pActiveCallList->Add(conferenceCallHandleToHold, *pConfCallInfo);
+ pTelManager->__pEventListener->HandleConfCallHoldOccured(true);
+ }
+ break;
+ }
+ }
+ if(pCallList != null)
+ {
+ delete pCallList;
+ pCallList = null;
+ }
+ AppLogDebug("Exit");
+}
+
+
+void
+TelephonyManager::HandleHoldCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("%d",callBackResult);
+ result r = E_FAILURE;
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (pData != null && callBackResult == TAPI_API_SUCCESS)
+ {
+ unsigned int heldCallHandle = 0;
+ memcpy(&heldCallHandle, pData, sizeof(TS_UINT));
+
+ if (pTelManager->__pActiveCallList->GetCount())
+ {
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo holdCallInfo;
+ r = pCallList->GetAt(index, holdCallInfo);
+ //check if an active call is found with matching contact no.
+ if ((r == E_SUCCESS) && (heldCallHandle == (unsigned int) holdCallInfo.GetCallHandle()->ToLong()))
+ {
+ AppCallInfo* pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ //copy state into new callinfo object
+ *pHeldCallInfo = holdCallInfo;
+ //set call to hold state
+ pHeldCallInfo->SetOnHold(true);
+ //update the state of the call in Active call list by removing and adding again
+ pTelManager->__pActiveCallList->Remove(heldCallHandle);
+ pTelManager->__pActiveCallList->Add(heldCallHandle, *pHeldCallInfo);
+ pTelManager->__pEventListener->HandleCallHeld(true);
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ }
+ }
+ pTelManager->CheckPendingDialCalls(callBackResult);
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::HandleActiveCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("%d",callBackResult);
+ result r = E_FAILURE;
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (pData != null && callBackResult == TAPI_API_SUCCESS)
+ {
+ unsigned int activeCallHandle = 0;
+ memcpy(&activeCallHandle, pData, sizeof(TS_UINT));
+
+ if (pTelManager->__pActiveCallList->GetCount())
+ {
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo ActiveCallInfo;
+ r = pCallList->GetAt(index, ActiveCallInfo);
+ //check if an active call is found with matching contact no.
+ if ((r == E_SUCCESS) && (activeCallHandle == (unsigned int) ActiveCallInfo.GetCallHandle()->ToLong()))
+ {
+ AppCallInfo* pActiveCallInfo = new (std::nothrow) AppCallInfo();
+ //copy state into new callinfo object
+ *pActiveCallInfo = ActiveCallInfo;
+ //set call to active state
+ pActiveCallInfo->SetOnHold(false);
+ //update the state of the call in Active call list by removing and adding again
+ pTelManager->__pActiveCallList->Remove(activeCallHandle);
+ pTelManager->__pActiveCallList->Add(activeCallHandle, *pActiveCallInfo);
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+ pTelManager->__pEventListener->HandleCallActive(true);
+ }
+ }
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::HandleCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ //should not do anything here.
+
+}
+
+void
+TelephonyManager::HandleDialCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (callBackResult != TAPI_CAUSE_SUCCESS)
+ {
+ if (pTelManager->__pDialedCall != null)
+ {
+ delete pTelManager->__pDialedCall;
+ pTelManager->__pDialedCall = null;
+ }
+
+ //Check if there are no active connected calls and no incoming call.
+ if (pTelManager->__pIncomingCall != null)
+ {
+ pTelManager->__pSettingsManager->SetCallState(CALL_STATE_CALL_VOICE_CONNECTING);
+ }
+ else if (pTelManager->GetCurrentCallCount() >= 1)
+ {
+ pTelManager->__pSettingsManager->SetCallState(CALL_STATE_CALL_VOICE_ACTIVE);
+ }
+ else
+ {
+ pTelManager->__pSettingsManager->SetCallState(CALL_STATE_CALL_OFF);
+ }
+
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_DIAL_FAILED);
+ }
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::HandleRejectCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ // This callback comes only if user has rejected an incoming call from IncomingCallForm.
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (pData != null && callBackResult == TAPI_API_SUCCESS)
+ {
+ unsigned int rejectedCallHandle = 0;
+ memcpy(&rejectedCallHandle, pData, sizeof(TS_UINT));
+
+ //Check if incoming call is rejected
+ if (pTelManager->__pIncomingCall != null && (rejectedCallHandle == (unsigned int) pTelManager->__pIncomingCall->GetCallHandle()->ToLong()))
+ {
+ AppLogDebug("Call rejected by user");
+ AppCallInfo rejectedCallInfo;
+ rejectedCallInfo = *(pTelManager->__pIncomingCall);
+ delete pTelManager->__pIncomingCall;
+ pTelManager->__pIncomingCall = null;
+
+ //rejected by user from incoming call form
+ rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_REJECTED);
+ //Save rejected incoming call to call log db.
+ pTelManager->SaveCallInfoToLogsDb(rejectedCallInfo);
+
+ //check if the ended call was the last call
+ bool isLastCall = (pTelManager->__pActiveCallList->GetCount() == 0);
+ //Stop alert - started only for incoming calls which are not blocked.
+ if(pTelManager->__pSoundManager != null)
+ {
+ pTelManager->__pSoundManager->StopAlert();
+ //Do not call stop session if there is already a call going on
+ if(isLastCall == true)
+ {
+ pTelManager->__pSoundManager->StopSession();
+ }
+ }
+ //Send notification to user
+ ArrayListT<AppCallInfo>* pCallList = null;
+ if (isLastCall)
+ {
+ //save 'RejectedCall' to list to show on EndCallForm
+ pCallList = new (std::nothrow) ArrayListT<AppCallInfo>();
+ pCallList->Construct(1);
+ AppCallInfo* pRejectedCall = new (std::nothrow) AppCallInfo();
+ *pRejectedCall = rejectedCallInfo;
+ pCallList->Add(*pRejectedCall);
+ }
+ else
+ {
+ //fetch active calls to show appropriate scene
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+ }
+ pTelManager->__pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
+ delete pCallList;
+ pCallList = null;
+ }
+ }
+ else
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_REJECT_FAILED);
+ }
+ AppLogDebug("EXIT");
+}
+
+void
+TelephonyManager::HandleJoinCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (callBackResult == TAPI_API_SUCCESS && pData != null)
+ {
+ unsigned int tempHandle = 0;
+ TelCallInfoJoinedNoti_t joinedInfoNotification;
+ AppCallInfo confCallInfo;
+
+ memcpy(&tempHandle, pData, sizeof(TS_UINT));
+ joinedInfoNotification.id = tempHandle;
+ AppCallInfo activeCall;
+ AppCallInfo heldCall;
+ // Use enumerator to access elements in the map
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ result r = pCallList->GetAt(0, activeCall);
+
+ if (r == E_SUCCESS)
+ {
+ r = pCallList->GetAt(1, heldCall);
+ if (r == E_SUCCESS)
+ {
+ AppCallInfo* pConfCallInfo = new (std::nothrow) AppCallInfo();
+ unsigned int activeCallHandle = activeCall.GetCallHandle()->ToLong();
+ unsigned int heldCallHandle = heldCall.GetCallHandle()->ToLong();
+ if (activeCall.IsConferenceCall() == true)
+ {
+ r = E_SUCCESS;
+ //When joined both become active
+ activeCall.SetOnHold(false);
+ heldCall.SetOnHold(false);
+ *pConfCallInfo = activeCall;
+ pConfCallInfo->AddCallToCallerList(heldCall);
+ pConfCallInfo->SetCallHandle(activeCallHandle);
+ //Set call start time
+ //if (pConfCallInfo->GetCallConnectTime() > heldCall.GetCallConnectTime())
+ if (pConfCallInfo->GetDurationTime() > heldCall.GetDurationTime())
+ {
+ pConfCallInfo->SetCallConnectTime(heldCall.GetCallConnectTime());
+ pConfCallInfo->SetDurationTime(heldCall.GetDurationTime());
+ pConfCallInfo->SetCallNotificationTime(heldCall.GetCallNotificationTime());
+ }
+ }
+ else if (heldCall.IsConferenceCall() == true)
+ {
+ r = E_SUCCESS;
+ heldCall.SetOnHold(false);
+ activeCall.SetOnHold(false);
+ *pConfCallInfo = heldCall;
+ pConfCallInfo->AddCallToCallerList(activeCall);
+ pConfCallInfo->SetCallHandle(heldCallHandle);
+ //Set call start time
+ //if (pConfCallInfo->GetCallConnectTime() > activeCall.GetCallConnectTime())
+ if (pConfCallInfo->GetDurationTime() > activeCall.GetDurationTime())
+ {
+ pConfCallInfo->SetCallConnectTime(activeCall.GetCallConnectTime());
+ pConfCallInfo->SetDurationTime(activeCall.GetDurationTime());
+ pConfCallInfo->SetCallNotificationTime(activeCall.GetCallNotificationTime());
+ }
+ }
+ else
+ {
+ r = E_SUCCESS;
+ pConfCallInfo->SetConference(true);
+ heldCall.SetOnHold(false);
+ activeCall.SetOnHold(false);
+ pConfCallInfo->AddCallToCallerList(activeCall);
+ pConfCallInfo->AddCallToCallerList(heldCall);
+ pConfCallInfo->SetCallHandle(activeCallHandle);
+ //Set call start time
+ //if (activeCall.GetCallConnectTime() > heldCall.GetCallConnectTime())
+ if (activeCall.GetDurationTime() > heldCall.GetDurationTime())
+ {
+ pConfCallInfo->SetCallConnectTime(heldCall.GetCallConnectTime());
+ pConfCallInfo->SetDurationTime(heldCall.GetDurationTime());
+ pConfCallInfo->SetCallNotificationTime(heldCall.GetCallNotificationTime());
+ }
+ else
+ {
+ pConfCallInfo->SetCallConnectTime(activeCall.GetCallConnectTime());
+ pConfCallInfo->SetDurationTime(activeCall.GetDurationTime());
+ pConfCallInfo->SetCallNotificationTime(activeCall.GetCallNotificationTime());
+ }
+ }
+ pConfCallInfo->SetCallHandle(joinedInfoNotification.id);
+ pTelManager->__pActiveCallList->RemoveAll();
+ //only one call in the list
+ pTelManager->__pActiveCallList->Add(joinedInfoNotification.id, *pConfCallInfo);
+ //notify listener that call is connected.
+ pTelManager->__pEventListener->HandleConferenceCall(*pConfCallInfo);
+ delete pCallList;
+ pCallList = null;
+ }
+ }
+ }
+ else
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_JOIN_FAILED);
+ }
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::HandleSwapCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (callBackResult == TAPI_CAUSE_SUCCESS)
+ {
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ IListT<long>* pKeyList = pTelManager->__pActiveCallList->GetKeysN();
+ int callCount = pTelManager->__pActiveCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo* pTempCallInfo = new (std::nothrow) AppCallInfo();
+ pCallList->GetAt(index, *pTempCallInfo);
+ (pTempCallInfo->IsOnHold() == false) ? pTempCallInfo->SetOnHold(true) : pTempCallInfo->SetOnHold(false);
+ long callHandle;
+ pKeyList->GetAt(index, callHandle);
+ pTelManager->__pActiveCallList->SetValue(callHandle, *pTempCallInfo);
+ }
+ delete pCallList;
+ pCallList = null;
+ delete pKeyList;
+ pKeyList = null;
+ pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ pTelManager->__pEventListener->HandleCallSwapOccured(*pCallList);
+ }
+ else
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_SWAP_FAILED);
+ }
+}
+
+void
+TelephonyManager::HandleEndFromConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ //This callback comes if a single call is ended from Conference call.
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ bool isParticipantCallEnded = false;
+
+ if (callBackResult == TAPI_CAUSE_SUCCESS && pData != null)
+ {
+ //fetch end call handle
+ TelCallEndCnf_t callEndNotification;
+ memcpy(&callEndNotification, pData, sizeof(TelCallEndCnf_t));
+ //Fetch conference call
+ AppCallInfo endConfCall;
+ bool isConferenceCallFound = false;
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, endConfCall);
+ if (endConfCall.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ //Found the Conference call to be changed.
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+
+ //Identify the call to be ended and remove from list.
+ if (isConferenceCallFound == true)
+ {
+ isParticipantCallEnded = pTelManager->HandleParticipantEndedFromConference(callEndNotification.id, endConfCall);
+ }
+ }
+ else
+ {
+ AppLog("TAPI Failed - %d", callBackResult);
+ }
+
+ //Check if participant call or Conference call was not found, then show error
+ if (isParticipantCallEnded == false)
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_END_FROM_CONFERENCE_FAILED);
+ }
+ AppLogDebug("EXIT");
+}
+
+bool
+TelephonyManager::HandleParticipantEndedFromConference(unsigned int participantCallHandle, AppCallInfo& conferenceCall)
+{
+ AppLogDebug("ENTER");
+ //to check if participant call was found and ended.
+ bool isParticipantCallEnded = false;
+ //Identify the call to be ended and remove from list.
+ AppCallInfo callToBeEnded;
+ IListT<AppCallInfo>* pCallerList = conferenceCall.GetCallerList();
+ int callerCount = pCallerList->GetCount();
+ for (int index = 0; index < callerCount; index++)
+ {
+ pCallerList->GetAt(index, callToBeEnded);
+ if ((unsigned int)callToBeEnded.GetCallHandle()->ToLong() == participantCallHandle)
+ {
+ //Identify the call to be ended and remove from conference list
+ conferenceCall.RemoveCallFromCallerList(index);
+ //update its status to individual call before saving to database
+ callToBeEnded.SetConference(false);
+ SaveCallInfoToLogsDb(callToBeEnded);
+ isParticipantCallEnded = true;
+ //since participant call got ended play disconnect tone
+ __pSoundManager->SetDisconnectTone();
+ break;
+ }
+ }
+
+ if(isParticipantCallEnded == false)
+ {
+ //participant call not found and not ended
+ return isParticipantCallEnded;
+ }
+
+ unsigned int confCallHandle = (unsigned int)conferenceCall.GetCallHandle()->ToLong();
+ //Check if last participant removed. If yes, switch to single active view
+ if (conferenceCall.GetCallerListCount() == 1)
+ {
+ AppCallInfo callFromList;
+ pCallerList = conferenceCall.GetCallerList();
+ pCallerList->GetAt(0, callFromList);
+ //construct a new single active call
+ AppCallInfo* pActiveCall = new (std::nothrow) AppCallInfo();
+ *pActiveCall = callFromList;
+ //update conference status and Hold status
+ pActiveCall->SetConference(false);
+ pActiveCall->SetOnHold(conferenceCall.IsOnHold());
+
+ __pActiveCallList->Remove(confCallHandle);
+ __pActiveCallList->Add(pActiveCall->GetCallHandle()->ToLong(), *pActiveCall);
+ pActiveCall = null;
+
+ //using the callConnected to switch to single active screen
+ //or update multiple active call screen
+ IListT<AppCallInfo>* pActiveCallList = __pActiveCallList->GetValuesN();
+ __pEventListener->HandleCallConnected(*pActiveCallList);
+ delete pActiveCallList;
+ pActiveCallList = null;
+ }
+ else
+ {
+ AppCallInfo callFromList;
+ pCallerList = conferenceCall.GetCallerList();
+ pCallerList->GetAt(0, callFromList);
+ //construct a new conference call
+ AppCallInfo* pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *pConfCallInfo = conferenceCall;
+ if (confCallHandle == participantCallHandle)
+ {
+ //Call Handle is same as conf call handle, so need to change conf call handle
+ __pActiveCallList->Remove(confCallHandle);
+ int newConfCallHandle = callFromList.GetCallHandle()->ToLong();
+ pConfCallInfo->SetCallHandle(newConfCallHandle);
+ __pActiveCallList->Add(newConfCallHandle, *pConfCallInfo);
+ }
+ else
+ {
+ __pActiveCallList->SetValue(confCallHandle, *pConfCallInfo);
+ }
+ __pEventListener->HandleConferenceChange();
+ }
+ AppLogDebug("EXIT");
+ return isParticipantCallEnded;
+}
+
+void
+TelephonyManager::HandleSplitFromConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (callBackResult == TAPI_CAUSE_SUCCESS && pData != null)
+ {
+ TelCallSplitCnf_t callSplitNotification;
+ memcpy(&callSplitNotification, pData, sizeof(TelCallSplitCnf_t));
+ int confCallIndex = -1;
+ AppCallInfo endConfCall;
+ bool isConferenceCallFound = false;
+
+ IListT<AppCallInfo>* pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, endConfCall);
+ if (endConfCall.IsConferenceCall() == true)
+ {
+ isConferenceCallFound = true;
+ confCallIndex = index;
+ //Found the Conference call to be ended.
+ break;
+ }
+ }
+
+ if (isConferenceCallFound == false)
+ {
+ delete pCallList;
+ pCallList = null;
+ return;
+ }
+ delete pCallList;
+ pCallList = null;
+ //Identify the call to be ended and remove from list on API success
+ AppCallInfo callToBeEnded;
+ pCallList = endConfCall.GetCallerList();
+ callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ pCallList->GetAt(index, callToBeEnded);
+ if ((unsigned int)callToBeEnded.GetCallHandle()->ToLong() == callSplitNotification.id)
+ {
+ //Identified the call to be ended and remove from conference list
+ //Add this to the active call list
+ endConfCall.RemoveCallFromCallerList(index);
+ break;
+ }
+ }
+ unsigned int confCallHandle = (unsigned int)endConfCall.GetCallHandle()->ToLong();
+ //Set the hold flags correctly and make the changes to the active call list
+ if (endConfCall.GetCallerListCount() == 1)
+ {
+ //Set hold for the other single call
+ // and add to the list
+ AppCallInfo callFromList;
+ pCallList = endConfCall.GetCallerList();
+ pCallList->GetAt(0, callFromList);
+ AppCallInfo* pHeldCall = new (std::nothrow) AppCallInfo();
+ *pHeldCall = callFromList;
+ pHeldCall->SetConference(false);
+ pHeldCall->SetOnHold(true);
+ pTelManager->__pActiveCallList->Remove(confCallHandle);
+ pTelManager->__pActiveCallList->Add(pHeldCall->GetCallHandle()->ToLong(), *pHeldCall);
+ pHeldCall = null;
+ }
+ else
+ {
+ //Set hold flag for conference call
+ endConfCall.SetOnHold(true);
+ AppCallInfo callFromList;
+ pCallList = endConfCall.GetCallerList();
+ pCallList->GetAt(0, callFromList);
+
+ AppCallInfo* pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *pConfCallInfo = endConfCall;
+ if (confCallHandle == callSplitNotification.id)
+ {
+ //Call Handle is same as conf call handle.
+ //Change conf call handle
+ pTelManager->__pActiveCallList->Remove(confCallHandle);
+ int tmpCallHandle = callFromList.GetCallHandle()->ToLong();
+ pConfCallInfo->SetCallHandle(tmpCallHandle);
+ pTelManager->__pActiveCallList->Add(callFromList.GetCallHandle()->ToLong(), *pConfCallInfo);
+ }
+ else
+ {
+ pTelManager->__pActiveCallList->Remove(confCallHandle);
+ pTelManager->__pActiveCallList->Add(confCallHandle, *pConfCallInfo);
+ }
+ }
+ //Add the new active call to active call list
+ AppCallInfo* pActiveCall = new (std::nothrow) AppCallInfo();
+ *pActiveCall = callToBeEnded;
+ pActiveCall->SetConference(false);
+ pActiveCall->SetOnHold(false);
+ pTelManager->__pActiveCallList->Remove(pActiveCall->GetCallHandle()->ToLong());
+ pTelManager->__pActiveCallList->Add(pActiveCall->GetCallHandle()->ToLong(), *pActiveCall);
+ pActiveCall = null;
+ //using the callConnected to switch to Multiple active screen
+ pCallList = pTelManager->__pActiveCallList->GetValuesN();
+ pTelManager->__pEventListener->HandleCallConnected(*pCallList);
+ pCallList = null;
+ }
+ else
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_SPLIT_FROM_CONFERENCE_FAILED);
+ }
+}
+
+void
+TelephonyManager::HandleEndConferenceCallbackResponse(TapiHandle* pHandle, int callBackResult, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %d",callBackResult);
+ //This callback comes only if a conference call is ended by user.
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ AppCallInfo heldCall;
+ if (callBackResult == TAPI_CAUSE_SUCCESS && pData != null)
+ {
+ //fetch ended confCall details
+ result r = E_FAILURE;
+ AppCallInfo endConfCallInfo;
+ IListT<AppCallInfo>* pActiveCallList = pTelManager->__pActiveCallList->GetValuesN();
+ if(pActiveCallList != null && pActiveCallList->GetCount() > 0)
+ {
+ for (int index = 0; index < pActiveCallList->GetCount(); index++)
+ {
+ r = pActiveCallList->GetAt(index, endConfCallInfo);
+ if(r == E_SUCCESS && endConfCallInfo.IsConferenceCall() == true)
+ {
+ //conference call found.
+ r = E_SUCCESS;
+ break;
+ }
+ else
+ {
+ r = E_FAILURE;
+ }
+ }
+ }
+ delete pActiveCallList;
+ pActiveCallList = null;
+
+ //check if no conference call found, then return.
+ if(r == E_FAILURE)
+ {
+ return;
+ }
+ //remove the conference call handle from active call list to avoid any processing in HandleIdleCallback().
+ pTelManager->__pActiveCallList->Remove(endConfCallInfo.GetCallHandle()->ToLong());
+ //Save "End" Conf. call info to call log database
+ pTelManager->SaveCallInfoToLogsDb(endConfCallInfo);
+
+ //check if the ended call was the last call and show notification to user
+ bool isLastCall = (pTelManager->__pActiveCallList->GetCount() == 0);
+ ArrayListT<AppCallInfo>* pCallList = null;
+ if (isLastCall)
+ {
+ pTelManager->__pSoundManager->SetlastEndedConferenceCall();
+ //stop sound session
+ pTelManager->__pSoundManager->StopSession();
+ //send empty call list to show dialer or call log screen
+ pCallList =new (std::nothrow) ArrayListT<AppCallInfo>();
+ pCallList->Construct(1);
+ pCallList->Add(endConfCallInfo);
+ }
+ else
+ {
+ //fetch active calls to show appropriate scene
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+ r = pCallList->GetAt(0, heldCall);
+ if (r == E_SUCCESS)
+ {
+ //pTelManager->HoldActiveCall(&heldCall, false);
+ AppCallInfo* pHeldCallInfo = new (std::nothrow) AppCallInfo();
+ unsigned int callHandle = heldCall.GetCallHandle()->ToLong();
+ //copy state into new callinfo object
+ *pHeldCallInfo = heldCall;
+
+ //set call to hold state
+ pHeldCallInfo->SetOnHold(false);
+
+ pTelManager->__pActiveCallList->Remove(callHandle);
+ //replace old object with new
+ pTelManager->__pActiveCallList->Add(callHandle, *pHeldCallInfo);
+ delete pCallList;
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(pTelManager->__pActiveCallList->GetValuesN());
+ }
+ }
+ pTelManager->__pSoundManager->SetDisconnectTone();
+ //notify listener that call is disconnected.
+ pTelManager->__pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
+ delete pCallList;
+ pCallList = null;
+ }
+ else
+ {
+ pTelManager->__pEventListener->HandleTelephonyError(ERROR_END_CALL_FAILED);
+ }
+ AppLog("EXIT");
+}
+
+void
+TelephonyManager::HandleIdleCallBack(void* pData)
+{
+ //This callback comes when any type of calls are ended
+ //We do NOT handle below scenarios here -
+ //1) In incoming call scenarios, if we end any active calls - handled in "AcceptCall()".
+ //2) Incoming call automatically blocked is handled in "AnswerAutoRejectCall()" and rejection by user scenarios are handled in "HandleRejectCallbackResponse()".
+ //3) End conference call is handled in "HandleEndConferenceCallbackResponse()".
+ //4) End Single Call from Conference call by user is handled in "HandleEndFromConferenceCallbackResponse()".
+ //5) End Single Call from Conference call using eventInjector is diverted to "HandleParticipantEndedFromConference()".
+ //BUT, we do handle below scenarios here -
+ //1) "MISSED" incoming call scenario here i.e incoming call is rejected by other caller.
+ //2) an "unconnected" dialed call is ended by caller or other party.
+ //3) Any normal active calls(NOT conference calls) ended by user or by other party.
+
+ TelCallStatusIdleNoti_t idleNotification;
+ memcpy(&idleNotification, pData, sizeof(TelCallStatusIdleNoti_t));
+ //handle end call event, show next screen
+ unsigned int endCallHandle = idleNotification.id;
+ AppLogDebug("ENTER %d",endCallHandle);
+
+ //empty active call list or no dialed or incoming calls - ignore this event
+ IListT<AppCallInfo>* pActiveCallList = __pActiveCallList->GetValuesN();
+ if((pActiveCallList == null || pActiveCallList->GetCount() <= 0) && __pDialedCall == null && __pIncomingCall == null)
+ {
+ delete pActiveCallList;
+ AppLogDebug("EXIT - no calls exist");
+ return;
+ }
+
+ //Check if ended call was among conference caller list,
+ //then divert event to "HandleParticipantEndedFromConference()"
+ AppCallInfo confCallInfo;
+ bool isConferenceCallChanged = false;
+ for (int index = 0; (pActiveCallList != null && index < pActiveCallList->GetCount()); index++)
+ {
+ //fetch conference call
+ result r = pActiveCallList->GetAt(index, confCallInfo);
+ if (r == E_SUCCESS && confCallInfo.IsConferenceCall() == true)
+ {
+ //Conference call found - check if ended call is a participant
+ isConferenceCallChanged = HandleParticipantEndedFromConference(endCallHandle, confCallInfo);
+ break;
+ }
+ }
+ delete pActiveCallList;
+ pActiveCallList = null;
+ if (isConferenceCallChanged == true)
+ {
+ //end call event handled - conference call will now either remain as conf. call
+ //or become single active call, if it has only 1 participant left.
+ __pSoundManager->SetSoundMode(SOUND_MODE_VOICE);
+ AppLogDebug("isConferenceCallChanged == true");
+ return;
+ }
+
+ //check if ended call was among the active call list and not a conference call
+ AppCallInfo endCallInfo;
+ result r = __pActiveCallList->GetValue(endCallHandle, endCallInfo);
+ if (r == E_SUCCESS)
+ {
+ bool isHandled = HandleEndNormalActiveCall(endCallInfo);
+ if (isHandled == true)
+ {
+ __pSoundManager->SetSoundMode(SOUND_MODE_VOICE);
+ return;
+ }
+ }
+
+ //Check if dialed call is rejected by other party
+ bool isDialedCallEnded = ((__pDialedCall != null) && (__pDialedCall->GetCallHandle() != null) &&(((unsigned int)__pDialedCall->GetCallHandle()->ToLong()) == idleNotification.id));
+ //Check if "missed" incoming call is ended
+ bool isMissedIncomingCallEnded = (__pIncomingCall != null && ((unsigned int)__pIncomingCall->GetCallHandle()->ToLong() == idleNotification.id));
+ if (isDialedCallEnded == true || isMissedIncomingCallEnded == true)
+ {
+ //It comes here only if the ended call was either a "unconnected" dialed call or an "Missed" incoming call.
+ bool isLastCall = (__pActiveCallList->GetCount() == 0);
+
+ ArrayListT<AppCallInfo>* pCallList = null;
+ //Check if dialed call was ended
+ if (isDialedCallEnded == true)
+ {
+ AppLogDebug("Dialed Call Ended");
+ //Call Ended is the dialed call
+ endCallInfo = *(__pDialedCall);
+ __pSoundManager->SetDisconnectTone();
+ delete __pDialedCall;
+ __pDialedCall = null;
+ }
+ else
+ {
+ //Here, only "Missed" Incoming call ended by other caller is handled.
+ AppLogDebug("Missed Call Ended");
+ __pSoundManager->StopAlert();
+ endCallInfo = *(__pIncomingCall);
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+ //update missed status
+ endCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_MISSED_UNSEEN);
+ //save ended call to call log db.
+ //SaveCallInfoToLogsDb(endCallInfo);
+ }
+ //save ended call to call log db.
+ SaveCallInfoToLogsDb(endCallInfo);
+
+ //notify listener that call is disconnected.
+ if (isLastCall == true)
+ {
+ __pSoundManager->StopSession();
+ pCallList = new (std::nothrow) ArrayListT<AppCallInfo>();
+ pCallList->Construct(1);
+ //This is done to show end call form in missed call case also
+ //this was done on request received from HQ to solve a bug in
+ //camera application. In which if a call comes when camera is
+ //running and user disconnects before the ui is shown the camera
+ //application hangs
+ //if (isMissedIncomingCallEnded == false)
+ {
+ //save to list to show EndCallForm
+ pCallList->Add(endCallInfo);
+ }
+ __pSoundManager->GetTimer()->Cancel();
+
+ }
+ else
+ {
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ }
+ __pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
+ delete pCallList;
+ pCallList = null;
+ }
+ __pSoundManager->SetSoundMode(SOUND_MODE_VOICE);
+ AppLogDebug("EXIT");
+}
+
+bool
+TelephonyManager::HandleEndNormalActiveCall(AppCallInfo& endCallInfo)
+{
+ AppLogDebug("Enter");
+ result r = E_FAILURE;
+ AppCallInfo heldCall;
+ // This function gets called only from HandleIdleCallback(),
+ // to handle disconnection of normal active calls.
+ if (endCallInfo.IsConferenceCall() == false)
+ {
+ //since active call got ended play disconnect tone
+ __pSoundManager->SetDisconnectTone();
+ //remove the call handle from active call list
+ __pActiveCallList->Remove(endCallInfo.GetCallHandle()->ToLong());
+ //check if the ended call was the last call and show notification to user
+ bool isLastCall = (__pActiveCallList->GetCount() == 0);
+ ArrayListT<AppCallInfo>* pCallList = null;
+ if (isLastCall)
+ {
+ __pSoundManager->GetTimer()->Cancel();
+ //stop sound session
+ __pSoundManager->StopSession();
+ //save "End" CallInfo to list to show EndCallForm
+ pCallList = new (std::nothrow) ArrayListT<AppCallInfo>();
+ pCallList->Construct(1);
+ pCallList->Add(endCallInfo);
+ }
+ else
+ {
+ if(__pIncomingCall == null)
+ {
+ //fetch active calls to show appropriate scene
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ //fetch the held call on disconnecting the active call and activate it.
+ r = pCallList->GetAt(0, heldCall);
+ if (r == E_SUCCESS)
+ {
+ HoldActiveCall(&heldCall, false);
+ delete pCallList;
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ }
+ }
+ }
+
+ //Save "End" call info to call log database
+ SaveCallInfoToLogsDb(endCallInfo);
+ //notify listener that call is disconnected.
+ __pEventListener->HandleCallDisconnected(isLastCall, *pCallList);
+ delete pCallList;
+ pCallList = null;
+ return true;
+ }
+ return false;
+}
+
+void
+TelephonyManager::HandleDialingCallBack(void* pData)
+{
+ AppLogDebug("Enter");
+ unsigned int tempHandle = 0;
+ TelCallStatusDialingNoti_t dialingNotification;
+ memcpy(&tempHandle, pData, sizeof(TS_UINT));
+ dialingNotification.id = tempHandle;
+ //check if callback is for different dialed call
+ //Dont check for call handle, since this is the first time, we get call handle for a dialed call.
+ if (__pDialedCall == null)
+ {
+ AppLogDebug("__pDialedCall == null");
+ //construct new dialed call
+ __pDialedCall = new (std::nothrow) AppCallInfo();
+
+ TelCallStatus_t callStatus;
+ int res = tel_get_call_status(__pTapiHandle, dialingNotification.id, &callStatus);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ //save phone number
+ String contactNumber(callStatus.pNumber);
+ __pDialedCall->SetContactNumber(contactNumber);
+ //set emergency state
+ if(callStatus.CallType == TAPI_CALL_TYPE_E911)
+ {
+ __pDialedCall->SetEmergency(true);
+ }
+ else
+ {
+ __pDialedCall->SetEmergency(false);
+ }
+ //save contact info
+ FetchContactInfoForNumber(__pDialedCall->GetContactNumber());
+ if (__pCachedContact != null)
+ {
+ __pDialedCall->SetContactInfo(*(__pCachedContact));
+ }
+ }
+ }
+ //set call handle for dialed call
+ __pDialedCall->SetCallHandle(dialingNotification.id);
+ __pDialedCall->SetCalllogType(CALL_LOG_TYPE_VOICE_OUTGOING);
+
+ //set call notification time.
+ long long startTime = 0;
+ SystemTime::GetTicks(startTime);
+ __pDialedCall->SetCallNotificationTime(startTime);
+ //SaveCallInfoToLogsDb(*__pDialedCall);
+}
+
+void
+TelephonyManager::HandleActiveCallBack(void* pData)
+{
+ // This callback comes whenever any new call is connected
+ // Or, any "Held" call is activated (we ignore activation of "Held" calls).
+ unsigned int newCallHandle = 0;
+ TelCallStatusActiveNoti_t activeNotification;
+ memcpy(&newCallHandle, pData, sizeof(TS_UINT));
+ activeNotification.id = newCallHandle;
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ AppLogDebug("Enter %d",newCallHandle);
+ //Check if the "Held" call was activated, i.e it is already present in already activated calls list.
+ bool toHandleEvent = true;
+ for (int callIndex = 0; (callIndex < pCallList->GetCount() && toHandleEvent == true); callIndex++ )
+ {
+ AppCallInfo tempCallInfo;
+ pCallList->GetAt(callIndex, tempCallInfo);
+ unsigned int tempCallHandle = tempCallInfo.GetCallHandle()->ToLong();
+ //Check if active callback came for "HandleJoinCallbackResponse"
+ //or for "UnHold Conference Call or normal call".
+ if(tempCallInfo.IsConferenceCall() == true)
+ {
+ if (tempCallHandle == activeNotification.id)
+ {
+ AppLogDebug("tempCallHandle == activeNotification.id");
+ toHandleEvent = false;
+ }
+ else
+ {
+ //check individual participants of conf call
+ IListT<AppCallInfo>* pConfCallList = tempCallInfo.GetCallerList();
+ int confCallCount = pConfCallList->GetCount();
+ for (int callIndex = 0; (callIndex < confCallCount && toHandleEvent == true); callIndex++)
+ {
+ AppCallInfo confCallerInfo;
+ pConfCallList->GetAt(callIndex, confCallerInfo);
+ unsigned int confCallerHandle = confCallerInfo.GetCallHandle()->ToLong();
+ if (confCallerHandle == activeNotification.id)
+ {
+ AppLogDebug("confCallerHandle == activeNotification.id");
+ toHandleEvent = false;
+ }
+ }
+ }
+ }
+ else if(tempCallHandle == activeNotification.id)
+ {
+ AppLogDebug("normal call is UnHold");
+ //If normal call is UnHold
+ toHandleEvent = false;
+ }
+ }
+
+ AppLogDebug("%d",toHandleEvent);
+ //check if we need to handle this event.
+ if(toHandleEvent == true)
+ {
+ //Here it comes, only if either new dialed or incoming call was connected.
+ HandleCallConnected( activeNotification.id);
+ }
+ delete pCallList;
+ pCallList = null;
+ AppLogDebug("Exit");
+}
+
+void
+TelephonyManager::HandleCallConnected(unsigned int connectedCallHandle)
+{
+ //Here it comes, only if either new dialed or incoming call was connected.
+ //This function should be called only from "HandleActiveCallback()".
+ AppLogDebug("Enter %d",connectedCallHandle);
+ AppCallInfo* pConnectedCall = null;
+ //to check if incoming call was connected
+ bool isIncomingCallConnected = false;
+
+ __pSoundManager->SetConnectTone();
+ //Check if dialed call is connected.
+ if ((__pDialedCall != null) && (__pDialedCall->GetCallHandle() != null) && (connectedCallHandle == (unsigned int)__pDialedCall->GetCallHandle()->ToLong()))
+ {
+ pConnectedCall = __pDialedCall;
+ __pDialedCall = null;
+ }
+ //Check if connected call is incoming call.
+ else if (__pIncomingCall != null && (connectedCallHandle == (unsigned int)__pIncomingCall->GetCallHandle()->ToLong()))
+ {
+ pConnectedCall = __pIncomingCall;
+ __pIncomingCall = null;
+ isIncomingCallConnected = true;
+ }
+ else
+ {
+ // this is just for safety. This scenario should never come.
+ // Otherwise Correct the code in some other function, if it comes here.
+ AppLogDebug("Error - Connected call was neither one of active calls nor it was dialed or incoming call");
+ //Construct a new CallInfo object for call
+ pConnectedCall = new (std::nothrow) AppCallInfo();
+ pConnectedCall->SetCallHandle(connectedCallHandle);
+
+ TelCallStatus_t callStatus;
+ int res = tel_get_call_status(__pTapiHandle, connectedCallHandle, &callStatus);
+ if (res == TAPI_CAUSE_SUCCESS)
+ {
+ String contactNumber(callStatus.pNumber);
+ pConnectedCall->SetContactNumber(contactNumber);
+ //set emergency state
+ if(callStatus.CallType == TAPI_CALL_TYPE_E911)
+ {
+ pConnectedCall->SetEmergency(true);
+ }
+ else
+ {
+ pConnectedCall->SetEmergency(false);
+ }
+ //set call notification time
+ long long startTime = 0;
+ SystemTime::GetTicks(startTime);
+ pConnectedCall->SetCallNotificationTime(startTime);
+ if (callStatus.bMoCall == true)
+ {
+ pConnectedCall->SetCalllogType(CALL_LOG_TYPE_VOICE_OUTGOING);
+ }
+ else
+ {
+ pConnectedCall->SetCalllogType(CALL_LOG_TYPE_VOICE_INCOMING);
+ isIncomingCallConnected = true;
+ }
+ }
+ //delete any dialed or incoming call objects
+ delete __pDialedCall;
+ __pDialedCall = null;
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+ }
+
+ //fetch contact info for connected call & it is not a hidden call
+ if (pConnectedCall->GetContactInfo() == null && pConnectedCall->GetContactNumber().IsEmpty() == false)
+ {
+ FetchContactInfoForNumber(pConnectedCall->GetContactNumber());
+ if (__pCachedContact != null)
+ {
+ pConnectedCall->SetContactInfo(*(__pCachedContact));
+ }
+ }
+ //set Call connect time for newly connected call
+ long long startTime = 0;
+ SystemTime::GetTicks(startTime);
+ pConnectedCall->SetCallConnectTime(startTime);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pConnectedCall->SetDurationTime(pPhoneApp->GetCallAppTicks());
+ if(GetCurrentCallCount() == 0)
+ {
+ __pSoundManager->SetMinuteReminderTone();
+ }
+
+
+ //transfer ownership to Active calls list
+ __pActiveCallList->Add(connectedCallHandle, *(pConnectedCall));
+/* if (pConnectedCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_INCOMING)
+ {
+ SaveCallInfoToLogsDb(*pConnectedCall);
+ }*/
+ pConnectedCall = null;
+
+ //notify listener that call is connected.
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ __pSoundManager->SetSoundMode(SOUND_MODE_VOICE);
+ __pEventListener->HandleCallConnected(*pCallList);
+ if (isIncomingCallConnected == true)
+ {
+ __pSoundManager->StopAlert();
+ }
+ delete pCallList;
+ pCallList = null;
+}
+
+bool
+TelephonyManager::CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo)
+{
+ AppLogDebug("Enter");
+ int callHandle = pIncomingCallInfo->GetCallHandle()->ToLong();
+ String contactNumber(L"");
+ contactNumber.Append(pIncomingCallInfo->GetContactNumber());
+ //Check if "reject unknown calls" is set and contact number is not present in AddressBook
+ //or if contact number is blacklisted
+ if(__pSettingsManager != null)
+ {
+ if (((__pSettingsManager->GetUnknownRejectStatus() == true) && (pIncomingCallInfo->GetContactInfo() == null))
+ || (__pSettingsManager->IsCallToBeRejected(contactNumber) == true))
+ {
+ AnswerAutoRejectCall(callHandle);
+ return true;
+ }
+ }
+ return false;
+}
+
+void
+TelephonyManager::HandleCallback(TapiHandle* pHandle, const char* pNotiId, void* pData, void* pUserData)
+{
+ AppLogDebug("Enter %s",pNotiId);
+ unsigned int tempHandle = 0;
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (pTelManager->__pSoundManager == null)
+ {
+ AppLog("Creating Sound Manager");
+ pTelManager->__pSoundManager = new (std::nothrow) SoundManager();
+ }
+ //Handle telephony events
+ if (strcmp(pNotiId, TAPI_NOTI_VOICE_CALL_STATUS_IDLE) == 0)
+ {
+ pTelManager->HandleIdleCallBack(pData);
+ }
+ else if (strcmp(pNotiId, TAPI_NOTI_VOICE_CALL_STATUS_ACTIVE) == 0)
+ {
+ pTelManager->__pSoundManager->StartSession();
+ pTelManager->HandleActiveCallBack(pData);
+ }
+ else if (strcmp(pNotiId, TAPI_NOTI_VOICE_CALL_STATUS_DIALING) == 0)
+ {
+ pTelManager->HandleDialingCallBack(pData);
+ }
+ else
+ {
+ memcpy(&tempHandle, pData, sizeof(TS_UINT));
+ }
+}
+
+AppCallInfo*
+TelephonyManager::GetConferenceCallInfoN(void)
+{
+ AppCallInfo* pConfCallInfo = null;
+
+ IListT<AppCallInfo>* pCallList = __pActiveCallList->GetValuesN();
+ int callCount = pCallList->GetCount();
+ for (int index = 0; index < callCount; index++)
+ {
+ AppCallInfo callInfo;
+ pCallList->GetAt(index, callInfo);
+ if (callInfo.IsConferenceCall() == true)
+ {
+ pConfCallInfo = new (std::nothrow) AppCallInfo();
+ *pConfCallInfo = callInfo;
+ //Found the Conference call
+ break;
+ }
+ }
+ delete pCallList;
+ pCallList = null;
+
+ return pConfCallInfo;
+}
+
+IListT<AppCallInfo>*
+TelephonyManager::GetCallListN(void)
+{
+ ArrayListT<AppCallInfo>* pCallList = null;
+ if (__pActiveCallList != null)
+ {
+ pCallList = static_cast<ArrayListT<AppCallInfo>*>(__pActiveCallList->GetValuesN());
+ }
+ return pCallList;
+}
+
+int
+TelephonyManager::GetCurrentCallCount(void)
+{
+ if (__pActiveCallList != null)
+ {
+ return __pActiveCallList->GetCount();
+ }
+ return 0;
+}
+
+AppCallInfo*
+TelephonyManager::GetIncomingCallHandle()
+{
+ if(__pIncomingCall != null)
+ {
+ return __pIncomingCall;
+ }
+ else
+ {
+ return null;
+ }
+}
+
+void
+TelephonyManager::ResumeAlert(AppCallInfo& incomingCallInfo)
+{
+ String contactRingTone(L"");
+ String contactNumber = incomingCallInfo.GetContactNumber();
+ //check if not hidden call
+ if(contactNumber.IsEmpty() == false)
+ {
+ //fetch contact info from Db
+ Contact* foundContact = GetContactN(contactNumber);
+ if(foundContact != null)
+ {
+ //fetch custom ringtone for contact
+ result r = foundContact->GetValue(CONTACT_PROPERTY_ID_RINGTONE, contactRingTone);
+ //Now check if there is a group ring tone
+ if(contactRingTone.IsEmpty() == true)
+ {
+ IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(foundContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ contactRingTone = pCategory->GetRingtonePath();
+ }
+ }
+ AppLog("ringtone fetched - r = %d", r);
+ delete foundContact;
+ foundContact = null;
+ }
+ }
+ __pSoundManager->ResumeAlert(contactRingTone);
+}
+
+void
+TelephonyManager::StartAlert(AppCallInfo& incomingCallInfo)
+{
+ String contactRingTone(L"");
+ String contactNumber = incomingCallInfo.GetContactNumber();
+ //check if not hidden call
+ if(contactNumber.IsEmpty() == false)
+ {
+ //fetch contact info from Db
+ Contact* foundContact = GetContactN(contactNumber);
+ if(foundContact != null)
+ {
+ //fetch custom ringtone for contact
+ result r = foundContact->GetValue(CONTACT_PROPERTY_ID_RINGTONE, contactRingTone);
+ //Now check if there is a group ring tone
+ if(contactRingTone.IsEmpty() == true)
+ {
+ IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(foundContact->GetRecordId());
+ if(pCategoryList != null && pCategoryList->GetCount() > 0)
+ {
+ Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+ contactRingTone = pCategory->GetRingtonePath();
+ }
+ }
+ AppLog("ringtone fetched - r = %d", r);
+ delete foundContact;
+ foundContact = null;
+ }
+ }
+ __pSoundManager->StartAlert(contactRingTone);
+}
+
+void
+TelephonyManager::StopAlert(void)
+{
+ __pSoundManager->StopAlert();
+}
+
+result
+TelephonyManager::CheckValidTelePhoneNumber(const String& contactNumber)
+{
+ result r = E_SUCCESS;
+ if (contactNumber.GetLength() > TAPI_CALL_DIALDIGIT_LEN_MAX)
+ {
+ r = E_FAILURE;
+ }
+
+ //Pattern to compare all characters except 0-9 * # P ; , +
+ String phoneNumberPattern(L"[^0-9*#P,p+;]");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(contactNumber,false);
+ //return false for patterns other than 0-9 * # P ; , +
+ if(resultMatch == true)
+ {
+ //return phone number is invalid
+ r = E_FAILURE;
+ }
+ //TODO: check if valid phone number else return error message
+ return r;
+}
+
+result
+TelephonyManager::CheckIfMOCallIsPossible()
+{
+ result r = E_SUCCESS;
+
+ //Check modem power status
+ int modemStatus = 0;
+ int errorCode = tel_check_modem_power_status(__pTapiHandle, &modemStatus);
+ if (errorCode != TAPI_API_SUCCESS || modemStatus == TAPI_PHONE_POWER_STATUS_OFF
+ || modemStatus == TAPI_PHONE_POWER_STATUS_ERROR)
+ {
+ r = E_FAILURE;
+ }
+ else
+ {
+ TelSimCardStatus_t simStatus;
+ int simChangedStatus;
+ //fetch sim initialization status
+ int errorCode = tel_get_sim_init_info(__pTapiHandle, &simStatus, &simChangedStatus);
+ if (errorCode != TAPI_API_SUCCESS)
+ {
+ r = E_FAILURE;
+ }
+ else
+ {
+ switch (simStatus)
+ {
+ case TAPI_SIM_STATUS_SIM_INIT_COMPLETED: // Sim Initialization ok
+ r = E_SUCCESS;
+ break;
+
+ case TAPI_SIM_STATUS_UNKNOWN: //initial state
+ case TAPI_SIM_STATUS_CARD_NOT_PRESENT: //Card not present
+ case TAPI_SIM_STATUS_CARD_REMOVED: //Card removed
+ case TAPI_SIM_STATUS_CARD_ERROR: // Bad card / On the fly, SIM gone bad
+ //TODO: might want to set different error code, to give proper message to user
+ r = E_FAILURE;
+ break;
+ default:
+ r = E_FAILURE;
+ break;
+ }
+ }
+ }
+ return r;
+}
+
+bool
+TelephonyManager::CheckIfMOCallIsEmergency(const String& contactNumber, bool isSimInitialized)
+{
+ //TODO: extract actual telephone number from contactNumber
+ //by deleting prefix,'P','W', etx.
+
+ bool isEmergency = false;
+ //conversion "contactNumber" to char*
+ const wchar_t* pContact = contactNumber.GetPointer();
+ int len = contactNumber.GetLength() + 1;
+ char* pNumber = new (std::nothrow) char[len];
+ wcstombs(pNumber, pContact, len);
+
+ if(isSimInitialized)
+ {
+ //used to get Ecc information for 2G and 3G.
+ TelSimEccList_t simEccList;
+ memset(&simEccList, 0x00, sizeof(TelSimEccList_t));
+ //Check if given number matches the sim card's emergency numbers
+ int errorCode = tel_get_sim_ecc(__pTapiHandle, &simEccList);
+ if (errorCode == TAPI_API_SUCCESS && simEccList.ecc_count > 0)
+ {
+ for (int index = 0; index < simEccList.ecc_count; index++)
+ {
+ if ((strcmp(pNumber, simEccList.list[index].number) == 0))
+ {
+ isEmergency = true;
+ }
+ }
+ }
+ }
+ else
+ {
+ //TODO: check if we need to also check SOS call numbers, if sim not present.
+ }
+
+ delete[] pNumber;
+ pNumber = null;
+ return isEmergency;
+}
+
+result
+TelephonyManager::FetchContactInfoForNumber(const String& phoneNumberStr)
+{
+ result r = E_FAILURE;
+
+ //delete previously cached data
+ if (__pCachedContact != null)
+ {
+ delete __pCachedContact;
+ __pCachedContact = null;
+ }
+
+ //Searches contacts by phone number.
+ IList* pContactList = __pAddressBook->SearchContactsByPhoneNumberN(phoneNumberStr);
+ if (pContactList == null || IsFailed(GetLastResult()))
+ {
+ return r;
+ }
+
+ //Fetch the contact's info to be displayed
+ IEnumerator* pContactEnum = pContactList->GetEnumeratorN();
+ while ((E_SUCCESS == pContactEnum->MoveNext()) && (__pCachedContact == null))
+ {
+ Contact* pContact = static_cast<Contact*>(pContactEnum->GetCurrent());
+
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetPhoneNumber().Equals(phoneNumberStr))
+ {
+ //save newly fetched contact info.
+ __pCachedContact = new (std::nothrow) Contact(*pContact);
+ r = E_SUCCESS;
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ }
+ delete pContactEnum;
+ pContactList->RemoveAll(true);
+ delete pContactList;
+
+ return r;
+}
+
+Contact*
+TelephonyManager::GetContactN(const String& phoneNumber)
+{
+ result r = FetchContactInfoForNumber(phoneNumber);
+ if (!IsFailed(r))
+ {
+ return new (std::nothrow) Contact(*__pCachedContact);
+ }
+ return null;
+}
+
+AppCallInfo*
+TelephonyManager::FetchIncomingCallHandleN(const String& callHandle, const String& contactNumber)
+{
+ if(__pIncomingCall != null)
+ {
+ delete __pIncomingCall;
+ __pIncomingCall = null;
+ }
+
+ if(callHandle.IsEmpty() == false)
+ {
+ int incomingHandle;
+ Integer::Parse(callHandle,incomingHandle);
+ //This API call is synchronous
+ TelCallStatus_t callStatus;
+ int errCode = tel_get_call_status(__pTapiHandle, incomingHandle, &callStatus);
+ if (errCode != TAPI_API_SUCCESS)
+ {
+ AppLogDebug("tel_get_call_status failed");
+ return null;
+ }
+ //construct incoming call info object
+ __pIncomingCall = new (std::nothrow) AppCallInfo();
+ __pIncomingCall->SetCallHandle(incomingHandle);
+
+ //contact number
+ String phoneNumber(contactNumber);
+ if(phoneNumber.IsEmpty() == true)
+ {
+ phoneNumber.Append(callStatus.pNumber);
+ }
+ __pIncomingCall->SetContactNumber(phoneNumber);
+ //set emergency state
+ if(callStatus.CallType == TAPI_CALL_TYPE_E911)
+ {
+ __pIncomingCall->SetEmergency(true);
+ }
+ else
+ {
+ __pIncomingCall->SetEmergency(false);
+ }
+ //set start time, when call is connected
+ long long startTime = 0;
+ SystemTime::GetTicks(startTime);
+ __pIncomingCall->SetCallNotificationTime(startTime);
+ __pIncomingCall->SetCalllogType(CALL_LOG_TYPE_VOICE_INCOMING);
+ }
+ else
+ {
+ //TODO: This 'else' block can be removed once AppControl request API is stabilized.
+ //This API call is synchronous and 'HandleIncomingCallStatusCallBack' is called for each active call.
+ int errCode = tel_get_call_status_all(__pTapiHandle, &HandleIncomingCallStatusCallBack, this);
+ if (errCode != TAPI_API_SUCCESS)
+ {
+ return null;
+ }
+ }
+
+ if(__pIncomingCall != null)
+ {
+ //set call notification time
+ long long startTime = 0;
+ SystemTime::GetTicks(startTime);
+ __pIncomingCall->SetCallNotificationTime(startTime);
+
+ if(__pIncomingCall->GetContactNumber().IsEmpty() == false)
+ {
+ //fetch contact info
+ FetchContactInfoForNumber(__pIncomingCall->GetContactNumber());
+ if (__pCachedContact != null)
+ {
+ __pIncomingCall->SetContactInfo(*__pCachedContact);
+ }
+ }
+
+ //construct a new callinfo object to pass its ownership to caller.
+ AppCallInfo* pNewIncomingCall = new (std::nothrow) AppCallInfo();
+ *pNewIncomingCall = *__pIncomingCall;
+ return pNewIncomingCall;
+ }
+ //return null, if no incoming call found
+ return null;
+}
+
+void
+TelephonyManager::HandleIncomingCallStatusCallBack(TelCallStatus_t* pCallStatus, void* pUserData)
+{
+ TelephonyManager* pTelManager = (TelephonyManager*) pUserData;
+ if (pCallStatus != null && pCallStatus->bMoCall == false
+ && ((pCallStatus->CallState == TAPI_CALL_STATE_INCOMING)
+ || (pCallStatus->CallState == TAPI_CALL_STATE_WAITING)))
+ {
+ //construct incoming call details
+ pTelManager->__pIncomingCall = new (std::nothrow) AppCallInfo();
+ pTelManager->__pIncomingCall->SetCallHandle(pCallStatus->CallHandle);
+ //contact number
+ String contactNumber(pCallStatus->pNumber);
+ pTelManager->__pIncomingCall->SetContactNumber(contactNumber);
+ //set emergency state
+ if(pCallStatus->CallType == TAPI_CALL_TYPE_E911)
+ {
+ pTelManager->__pIncomingCall->SetEmergency(true);
+ }
+ else
+ {
+ pTelManager->__pIncomingCall->SetEmergency(false);
+ }
+
+ pTelManager->__pIncomingCall->SetCalllogType(CALL_LOG_TYPE_VOICE_INCOMING);
+ }
+}
+
+void
+TelephonyManager::SaveCallInfoToLogsDb(AppCallInfo& endCallInfo)
+{
+ if (endCallInfo.IsConferenceCall() == false)
+ {
+ //single active call - Add call ended to call log database
+ __pCalllogMgr->AddCallogInfoToDatabase(&endCallInfo);
+ }
+ else
+ {
+ //Conference call
+ int confCallCount = endCallInfo.GetCallerListCount();
+ IListT<AppCallInfo>* pParticipantList = endCallInfo.GetCallerList();
+ for (int index = 0; index < confCallCount; index++)
+ {
+ AppCallInfo participantInfo;
+ if (pParticipantList->GetAt(index, participantInfo) == E_SUCCESS)
+ {
+ //Add call ended to call log database
+ __pCalllogMgr->AddCallogInfoToDatabase(&participantInfo);
+ }
+ }
+ }
+}
+
+void
+TelephonyManager::OnTelephonyNetworkStatusChanged(const NetworkStatus& networkStatus)
+{
+ if(networkStatus.IsCallServiceAvailable() == false)
+ {
+ EndAllCalls();
+ }
+}
+
+bool
+TelephonyManager::IsIncomingCallPresent(void)
+{
+ return (__pIncomingCall != null);
+}
+
+
+bool
+TelephonyManager::IsIncomingorDialingCallPresent(void)
+{
+ //returns false, if incoming call or dialed call is present.
+ return ((__pIncomingCall != null) || (__pDialedCall != null));
+}
+
+void
+TelephonyManager::CheckPendingDialCalls(int callBackResult)
+{
+ if(callBackResult == TAPI_CAUSE_SUCCESS)
+ {
+ if(__isDialCallPresentAfterHold == true)
+ {
+ __isDialCallPresentAfterHold = false;
+ DialOutgoingCall(*__pDialNumberAfterHold,__isDialNumberAfterHoldEmergency);
+ delete __pDialNumberAfterHold;
+ __pDialNumberAfterHold = null;
+ }
+ }
+ else
+ {
+ __isDialCallPresentAfterHold = false;
+ if(__pDialNumberAfterHold != null)
+ {
+ delete __pDialNumberAfterHold;
+ __pDialNumberAfterHold = null;
+ }
+
+ }
+
+}
+
+TapiHandle*
+TelephonyManager::GetTapiHandle(void)
+{
+ return __pTapiHandle;
+}
+
+void
+TelephonyManager::SetSoundPath(void)
+{
+ if(GetCurrentCallCount() > 0 && IsIncomingorDialingCallPresent() == true)
+ {
+ __pSoundManager->SetSoundPath();
+ }
+
+}
+
+void
+TelephonyManager::OnBluetoothStateChange(keynode_t *node, void *user_data)
+{
+ AppLogDebug("Enter");
+ TelephonyManager* pTelMgr = (TelephonyManager*)user_data;
+ pTelMgr->SetSoundPath();
+}
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CallTypes.cpp
+ * @brief Common constants used in Phone application
+ */
+#include "CallTypes.h"
+
+//bitmap
+const wchar_t* IDB_BTN_OPTION_BG_ICON = L"C01-3_dialer_btn_option_bg.9.png";
+const wchar_t* IDB_BTN_OPTION_PRESS_BG_ICON = L"C01-3_dialer_btn_option_press.9.png";
+const wchar_t* IDB_BTN_MORE_ICON = L"more.png";
+const wchar_t* IDB_BTN_MORE_PRESS_ICON = L"more_press.png";
+const wchar_t* IDB_POPUP_BUBBLE_ICON = L"00_popup_bubble_tail_bottom.png";
+const wchar_t* IDB_DIALER_BTN_LINE_ICON = L"C01-3_dialer_btn_1line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_PRESS_ICON = L"C01-3_dialer_btn_press.9.png";
+const wchar_t* IDB_VOICEMAIL_BTN_ICON = L"C01-3_dialer_icon_01.png";
+const wchar_t* IDB_VOICEMAIL_BTN_PRESS_ICON = L"C01-3_dialer_icon_01_press.png";
+const wchar_t* IDB_DIALER_BTN_LINE2_ICON = L"C01-3_dialer_btn_2line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE3_ICON = L"C01-3_dialer_btn_3line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE4_ICON = L"C01-3_dialer_btn_4line_bg.9.png";
+const wchar_t* IDB_DIALER_BTN_LINE5_ICON = L"C01-3_dialer_btn_5line_bg.9.png";
+const wchar_t* IDB_DIALER_STAR_ICON = L"C01-3_dialer_icon_star.png";
+const wchar_t* IDB_DIALER_MUTE_ICON = L"00_volume_icon_Mute.png";
+const wchar_t* IDB_DIALER_VIDEOCALL_ICON = L"C01-3_icon_voicecall.png";
+const wchar_t* IDB_DIALER_CALL_ICON = L"C01-3_icon_call.png";
+const wchar_t* IDB_DIALER_CLEAR_ICON = L"C01-3_icon_clear.png";
+const wchar_t* IDB_DIALER_CALL_BG_ICON = L"C01-3_dialer_btn_call_bg.9.png";
+const wchar_t* IDB_HIDE_KEYPAD_ICON = L"C01-1_icon_Hide.png";
+const wchar_t* IDB_HIDE_KEYPAD_PRESS_ICON = L"C01-1_icon_Hide_press_wh.png";
+const wchar_t* IDB_HIDE_KEYPAD_DIM_ICON = L"C01-1_icon_Hide_dim.png";
+const wchar_t* IDB_CLOSE_KEYPAD_ICON = L"C01-1_icon_keypad.png";
+const wchar_t* IDB_CLOSE_KEYPAD_PRESS_ICON = L"C01-1_icon_keypad_press_wh.png";
+const wchar_t* IDB_CLOSE_KEYPAD_DIM_ICON = L"C01-1_icon_keypad_dim.png";
+const wchar_t* IDB_SPEAKER_ON_ICON = L"C01-1_icon_speaker_on.png";
+const wchar_t* IDB_SPEAKER_ON_PRESS_ICON = L"C01-1_icon_speaker_on_press.png";
+const wchar_t* IDB_SPEAKER_ON_DIM_ICON = L"C01-1_icon_speaker_on_dim.png";
+const wchar_t* IDB_SPEAKER_OFF_ICON = L"C01-1_icon_speaker.png";
+const wchar_t* IDB_SPEAKER_OFF_PRESS_ICON = L"C01-1_icon_speaker_press_wh.png";
+const wchar_t* IDB_SPEAKER_OFF_DIM_ICON = L"C01-1_icon_speaker_dim.png";
+const wchar_t* IDB_MUTE_ON_ICON = L"C01-1_icon_mute_on.png";
+const wchar_t* IDB_MUTE_ON_PRESS_ICON = L"C01-1_icon_mute_on_press.png";
+const wchar_t* IDB_MUTE_ON_DIM_ICON = L"C01-1_icon_mute_on_dim.png";
+const wchar_t* IDB_MUTE_OFF_ICON = L"C01-1_icon_mute.png";
+const wchar_t* IDB_MUTE_OFF_PRESS_ICON = L"C01-1_icon_mute_press_wh.png";
+const wchar_t* IDB_MUTE_OFF_DIM_ICON = L"C01-1_icon_mute_dim.png";
+const wchar_t* IDB_BACKGROUND_BITMAP = L"C01-1_call_bg.png";
+const wchar_t* IDB_VOICE_CALL_ICON = L"C01-1_icon_voice call.png";
+const wchar_t* IDB_VOICE_CALL_PRESS_ICON = L"C01-1_icon_voice call_press.png";
+const wchar_t* IDB_VOICE_CALL_DIM_ICON = L"C01-1_icon_voice call_dim.png";
+const wchar_t* IDB_VIDEO_CALL_ICON = L"C01-1_icon_video call.png";
+const wchar_t* IDB_VIDEO_CALL_PRESS_ICON = L"C01-1_icon_video call_press.png";
+const wchar_t* IDB_VIDEO_CALL_DIM_ICON = L"C01-1_icon_video call_dim.png";
+const wchar_t* IDB_MESSAGE_ICON = L"C01-1_icon_message.png";
+const wchar_t* IDB_MESSAGE_PRESS_ICON = L"C01-1_icon_message_press.png";
+const wchar_t* IDB_MESSAGE_DIM_ICON = L"C01-1_icon_message_dim.png";
+const wchar_t* IDB_END_CALL_ICON = L"C01-1_icon_end_call.png";
+const wchar_t* IDB_END_CALL_PRESS_ICON = L"C01-1_icon_end_call_press_wh.png";
+const wchar_t* IDB_END_CALL_DIM_ICON = L"C01-1_icon_end_call_dim.png";
+const wchar_t* IDB_ADD_CALL_ICON = L"C01-1_icon_add.png";
+const wchar_t* IDB_ADD_CALL_PRESS_ICON = L"C01-1_icon_add_press_wh.png";
+const wchar_t* IDB_ADD_CALL_DIM_ICON = L"C01-1_icon_add_dim.png";
+const wchar_t* IDB_JOIN_CALL_ICON = L"C01-1_icon_join.png";
+const wchar_t* IDB_JOIN_CALL_PRESS_ICON = L"C01-1_icon_join_press_wh.png";
+const wchar_t* IDB_JOIN_CALL_DIM_ICON = L"C01-1_icon_join_dim.png";
+const wchar_t* IDB_CONTACT_ICON = L"C01-1_icon_contacts.png";
+const wchar_t* IDB_CONTACT_PRESS_ICON = L"C01-1_icon_contacts_press_wh.png";
+const wchar_t* IDB_CONTACT_DIM_ICON = L"C01-1_icon_contacts_dim.png";
+const wchar_t* IDB_SWAP_ICON_NORMAL = L"C01-1_icon_swap.png";
+const wchar_t* IDB_SWAP_ICON_PRESS = L"C01-1_icon_swap_press.png";
+const wchar_t* IDB_UNHOLD_NORMAL_BUTTON_ICON = L"C01-1_icon_unhold_74x74.png";
+const wchar_t* IDB_UNHOLD_PRESS_BUTTON_ICON = L"C01-1_icon_unhold_74x74_press.png";
+const wchar_t* IDB_HOLD_NORMAL_BUTTON_ICON = L"C01-1_icon_hold_74x74.png";
+const wchar_t* IDB_HOLD_PRESS_BUTTON_ICON = L"C01-1_icon_hold_74x74_press.png";
+const wchar_t* IDB_POPUP_ARROW_ICON = L"C01-1_popup_arrow.png";
+const wchar_t* IDB_POPUP_BG_ICON = L"C01-1_popup_bg.png";
+const wchar_t* IDB_MORE_MANAGE_CONFERENCE_ICON = L"C01-1_icon_more_Manage conference call.png";
+const wchar_t* IDB_CONFERENCE_BG_ICON = L"C01-1_call_group_caller ID_720x720.png";
+const wchar_t* IDB_CONFERENCE_BIG_BG_ICON = L"C01-1_call_group_caller ID_720x720.png";
+const wchar_t* IDB_ACTIVE_CALL_DEFAULT_ICON = L"C01-1_call_default_caller ID_720x720.png";
+const wchar_t* IDB_MULTIPLE_CALL_DEFAULT_ICON = L"C01-1_call_default_caller ID_720x720.png";
+const wchar_t* IDB_CALL_THUMBNAIL_BACKGROUND = L"C01-1_call_thumbnail_bg.png";
+const wchar_t* IDB_CALL_THUMBNAIL_SHADOW = L"C01-1_call_ID_thumbnail_shadow_388x388.png";
+//Bitmaps for DTMF Keypad
+const wchar_t* IDB_KEYPAD_BG = L"C01-1_keypad_btn_normal.png";
+const wchar_t* IDB_KEYPAD_BUTTON_PRESS = L"C01-1_keypad_btn_press.png";
+const wchar_t* IDB_KEYPAD_NUM1_ICON = L"C01-1_keypad_btn_icon.png";
+const wchar_t* IDB_CALLOG_LIST_BG = L"00_index list_bg.png";
+const wchar_t* IDB_LOG_RECEIVEDCALL_ICON = L"C01-4_icon_dialed.png";
+const wchar_t* IDB_LOG_DIALEDCALL_ICON = L"C01-4_icon_received.png";
+const wchar_t* IDB_LOG_MISSEDCALL_ICON = L"C01-4_icon_missed-call.png";
+const wchar_t* IDB_LOG_BLOCKEDCALL_ICON = L"C01-4_icon_Blocked(Auto-rejected).png";
+const wchar_t* IDB_LOG_DETAIL_CALL_ICON = L"C01-4_btn_icon_call.png";
+const wchar_t* IDB_LOG_DETAIL_MSG_ICON = L"C01-1_icon_Reject_with_Message.png";
+const wchar_t* IDB_LOG_NO_CONTENT = L"00_Nocontents_text.png";
+const wchar_t* IDB_VIEW_CONTACT_ICON = L"C01-1_contact_btn_icon.png";
+const wchar_t* IDB_VIEW_CONTACT_PRESS_ICON = L"C01-1_contact_btn_icon_press.png";
+//const wchar_t* IDB_VIEW_CONTACT_BG_ICON = L"C01-1_contact_btn.png";
+//const wchar_t* IDB_VIEW_CONTACT_BG_PRESS_ICON = L"C01-1_contact_btn_press.png";
+const wchar_t* IDB_VIEW_CONTACT_BG_ICON = L"C01-1_keypad_btn_normal.png";
+const wchar_t* IDB_VIEW_CONTACT_BG_PRESS_ICON = L"C01-1_keypad_btn_normal.png";
+
+//String messages
+const wchar_t* IDS_DIALER_MOBILE_STR = L"IDS_DIALER_MOBILE_STR";
+const wchar_t* IDS_DIALER_SPEEDDIAL_POPUP_MSG = L"IDS_DIALER_SPEEDDIAL_POPUP_MSG";
+const wchar_t* IDS_SPEEDDIAL_POP_YES_BTN_STRING = L"IDS_SPEEDDIAL_POP_YES_BTN_STRING";
+const wchar_t* IDS_SPEEDDIAL_POP_NO_BTN_STRING = L"IDS_SPEEDDIAL_POP_NO_BTN_STRING";
+const wchar_t* IDS_DIALER_MENU_ITEM_SEND_MSG = L"IDS_DIALER_MENU_ITEM_SEND_MSG";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_CONTACT = L"IDS_DIALER_MENU_ITEM_ADD_CONTACT";
+const wchar_t* IDS_DIALER_MENU_ITEM_SPEED_DIAL = L"IDS_DIALER_MENU_ITEM_SPEED_DIAL";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_PAUSE = L"IDS_DIALER_MENU_ITEM_ADD_PAUSE";
+const wchar_t* IDS_DIALER_MENU_ITEM_ADD_WAIT = L"IDS_DIALER_MENU_ITEM_ADD_WAIT";
+const wchar_t* IDS_DIALER_MENU_ITEM_EXIT = L"IDS_DIALER_MENU_ITEM_EXIT";
+const wchar_t* IDS_SPEED_DIAL_SEARCH_KEY = L"SPEED_DIAL";
+const wchar_t* IDS_KEYPAD_BTN_NAME = L"IDS_KEYPAD_BTN_NAME";
+const wchar_t* IDS_SPEAKER_BTN_NAME = L"IDS_SPEAKER_BTN_NAME";
+const wchar_t* IDS_MUTE_BTN_NAME = L"IDS_MUTE_BTN_NAME";
+const wchar_t* IDS_VOICE_CALL_BTN_NAME = L"IDS_VOICE_CALL_BTN_NAME";
+const wchar_t* IDS_VIDEO_CALL_BTN_NAME = L"IDS_VIDEO_CALL_BTN_NAME";
+const wchar_t* IDS_MSG_BTN_NAME = L"IDS_MSG_BTN_NAME";
+const wchar_t* IDS_ENDCALL_BTN_NAME = L"IDS_ENDCALL_BTN_NAME";
+const wchar_t* IDS_ADDCALL_BTN_NAME = L"IDS_ADDCALL_BTN_NAME";
+const wchar_t* IDS_JOINCALL_BTN_NAME = L"IDS_JOINCALL_BTN_NAME";
+const wchar_t* IDS_CONTACT_BTN_NAME = L"IDS_CONTACT_BTN_NAME";
+const wchar_t* IDS_HOLD_BTN_NAME = L"IDS_HOLD_BTN_NAME";
+const wchar_t* IDS_UNHOLD_BTN_NAME = L"IDS_UNHOLD_BTN_NAME";
+const wchar_t* IDS_PEOPLE_STR = L"IDS_PEOPLE_STR";
+const wchar_t* IDS_MGR_CONF_CALL_LIST_STR = L"IDS_MGR_CONF_CALL_LIST_STR";
+const wchar_t* IDS_LOG_CONTEXT_CALL = L"IDS_LOG_CONTEXT_CALL";
+const wchar_t* IDS_LOG_CONTEXT_MESSAGE = L"IDS_LOG_CONTEXT_MESSAGE";
+const wchar_t* IDS_LOG_CONTEXT_VIDEOCALL = L"IDS_LOG_CONTEXT_VIDEOCALL";
+const wchar_t* IDS_LOG_CONTEXT_DELETE = L"IDS_LOG_CONTEXT_DELETE";
+const wchar_t* IDS_AM_TIME = L"IDS_AM_TIME" ;
+const wchar_t* IDS_PM_TIME = L"IDS_PM_TIME";
+const wchar_t* IDS_CALLLOG_NO_NUMBER = L"IDS_CALLLOG_NO_NUMBER";
+const wchar_t* IDS_CALLLOG_NO_NAME = L"IDS_CALLLOG_NO_NAME";
+const wchar_t* IDS_CALLLOG_RECEIVED = L"IDS_CALLLOG_RECEIVED";
+const wchar_t* IDS_CALLLOG_MISSED = L"IDS_CALLLOG_MISSED";
+const wchar_t* IDS_CALLLOG_OUTGOING = L"IDS_CALLLOG_OUTGOING";
+const wchar_t* IDS_CALLLOG_RECEIVED_MSG = L"IDS_CALLLOG_RECEIVED_MSG";
+const wchar_t* IDS_CALLLOG_SENT_MSG = L"IDS_CALLLOG_SENT_MSG";
+const wchar_t* IDS_CALLLOG_REJECTED = L"IDS_CALLLOG_REJECTED";
+const wchar_t* IDS_CALLLOG_DELETE_FOOTER = L"IDS_CALLLOG_DELETE_FOOTER";
+const wchar_t* IDS_CALLLOG_CANCEL_FOOTER = L"IDS_CALLLOG_CANCEL_FOOTER";
+const wchar_t* IDS_EMERGENCY_CALL = L"IDS_EMERGENCY_CALL";
+const wchar_t* IDS_SELECT_CALL_LOG = L"IDS_SELECT_CALL_LOG";
+const wchar_t* IDS_SELECTED_ITEMS_STRING = L"IDS_SELECTED_ITEMS_STRING";
+const wchar_t* IDS_SELECTED_ITEM_STRING = L"IDS_SELECTED_ITEM_STRING";
+const wchar_t* IDS_SELECT_NUMBER = L"IDS_SELECT_NUMBER";
+const wchar_t* IDS_NUMBER_SELECTED = L"IDS_NUMBER_SELECTED";
+const wchar_t* IDS_NUMBERS_SELECTED = L"IDS_NUMBERS_SELECTED";
+const wchar_t* IDS_SELECT_MESSAGE = L"IDS_SELECT_MESSAGE";
+const wchar_t* IDS_MESSAGE_SELECTED = L"IDS_MESSAGE_SELECTED";
+const wchar_t* IDS_MESSAGES_SELECTED = L"IDS_MESSAGES_SELECTED";
+const wchar_t* IDS_NO_LOGS = L"IDS_NO_LOGS";
+const wchar_t* IDS_FLIGHT_MODE_ON = L"IDS_FLIGHT_MODE_ON";
+const wchar_t* IDS_ADD_TO_CONTACTS = L"IDS_ADD_TO_CONTACTS";
+const wchar_t* IDS_TIMER_ON_HOLD = L"IDS_TIMER_ON_HOLD";
+const wchar_t* IDS_CANCEL = L"IDS_CANCEL";
+const wchar_t* IDS_LOGS_TODAY = L"IDS_LOGS_TODAY";
+const wchar_t* IDS_LOGS_YESTERDAY = L"IDS_LOGS_YESTERDAY";
+const wchar_t* IDS_REJECT_MESSAGE_CREATE = L"IDS_REJECT_MESSAGE_CREATE";
+const wchar_t* IDS_VIEW_CONTACT = L"IDS_VIEW_CONTACT";
+const wchar_t* IDS_INVALID_NUMBER = L"IDS_INVALID_NUMBER";
+const wchar_t* IDS_NUMBER_UNKNOWN = L"IDS_NUMBER_UNKNOWN";
+const wchar_t* IDS_USSD_NUMBER = L"IDS_USSD_NUMBER";
+const wchar_t* IDS_CONFERENCE_CALL_STRING = L"IDS_CONFERENCE_CALL_STRING";
+const wchar_t* IDS_CALL_REJECT_FROM_STRING = L"IDS_CALL_REJECT_FROM_STRING";
+const wchar_t* IDS_CALL_REJECTED_TITLE_STRING = L"IDS_CALL_REJECTED_TITLE_STRING";
+const wchar_t* IDS_MESSAGE_SENDING_FAILED = L"IDS_MESSAGE_SENDING_FAILED";
+const wchar_t* IDS_LOW_MEMORY_MSG = L"IDS_LOW_MEMORY_MSG";
+const wchar_t* IDS_LOW_MEMORY_MSG_TITLE = L"IDS_LOW_MEMORY_MSG_TITLE";
+const wchar_t* IDS_SERVICE_UNAVAILABLE = L"IDS_SERVICE_UNAVAILABLE";
+const wchar_t* IDS_CALL_BARRED = L"IDS_CALL_BARRED";
+//Panel
+const wchar_t* PANEL_DIALER = L"PanelDialer";
+const wchar_t* PANEL_LOGS = L"PanelLogs";
+
+//Corresponding Call form name
+const wchar_t* IDL_FORM_OUTCALL = L"OutgoingCallForm";
+const wchar_t* IDL_FORM_OUT_EMERGENCYCALL = L"OutgoingEmergencyCallForm";
+const wchar_t* IDL_FORM_INCOMINGCALL = L"IncomingCallForm";
+const wchar_t* IDL_FORM_ACTIVECALL = L"ActiveCallForm";
+const wchar_t* IDL_FORM_ACTIVE_EMERGENCYCALL = L"ActiveEmergencyCallForm";
+const wchar_t* IDL_FORM_CONFCALL = L"ActiveConfCallForm";
+const wchar_t* IDL_FORM_CONFCALLLIST = L"ConfCallListForm ";
+const wchar_t* IDL_FORM_ENDCALL = L"EndCallForm";
+const wchar_t* IDL_FORM_MULTIPLEACTIVECALL = L"MultipleActiveCallForm";
+//Corresponding Settings form name
+const wchar_t* IDL_FORM_SETTINGS_PREFIX = L"SettingsForm";
+const wchar_t* IDL_FORM_MAIN_SETTING_MENU = L"SettingsFormMainMenu";
+const wchar_t* IDL_FORM_CALL_REJECTLIST_MENU = L"SettingsFormCallRejectList";
+const wchar_t* IDL_FORM_CALL_REJECTMSGS_MENU = L"SettingsFormCallRejectMsgs";
+const wchar_t* IDL_FORM_SPEED_DIAL = L"SettingsFormSpeedDial";
+const wchar_t* IDL_FORM_MORE_OPTIONS = L"SettingsFormMoreOptions";
+const wchar_t* IDL_FORM_CALL_STATUSTONES = L"SettingsFormCallStatusTones";
+const wchar_t* IDL_FORM_CALLTYPE_FORWARD = L"SettingsFormCallTypeForward";
+const wchar_t* IDL_FORM_CALL_FORWARD_OPTIONS = L"SettingsFormCallForwardMenu";
+const wchar_t* IDL_FORM_CALLTYPE_BARRING = L"SettingsFormCallTypeBarring";
+const wchar_t* IDL_FORM_CALL_BARRING_OPTIONS = L"SettingsFormCallBarringMenu";
+const wchar_t* IDL_FORM_CALL_WAITING_OPTIONS = L"SettingsFormCallWaitingMenu";
+const wchar_t* IDL_FORM_ADD_REJECT_NUMBER = L"SettingsFormAddRejectNumber";
+const wchar_t* IDL_FORM_AUTO_AREA_CODE = L"SettingsFormAutoAreaCode";
+const wchar_t* IDL_FORM_ADD_REJECT_MSG = L"SettingsFormAddRejectMsg";
+const wchar_t* IDL_FORM_EDIT_REJECT_MSG = L"SettingsFormEditRejectMsg";
+const wchar_t* IDL_FORM_FORWARD_TO_NUMBER = L"SettingsFormForwardToNumber";
+const wchar_t* IDL_FORM_NOREPLY_FORWARD_TO_NUMBER = L"SettingsFormNoReplyForwardToNumber";
+const wchar_t* IDL_FORM_SCENE_SET_BARRING_PWD = L"SettingsFormSetBarringPwd";
+const wchar_t* IDL_FORM_DEL_NUMBER = L"SettingsFormDeleteNumbers";
+const wchar_t* IDL_FORM_DEL_MESSAGE = L"SettingsFormDeleteMessages";
+//Dialer & Call Log Form names
+const wchar_t* IDL_FORM_DIAL_APP = L"DialAppForm";
+const wchar_t* IDL_FORM_CALL_LOG_DETAIL = L"CallLogDetailForm";
+const wchar_t* IDL_CALL_PANEL = L"IDL_KEYS_PANEL";
+const wchar_t* IDL_END_CALL_PANEL = L"IDL_ENDCALLKEYS_PANEL";
+const wchar_t* IDL_OUTCALL_FORM = L"IDL_OUTCALL_FORM";
+const wchar_t* IDL_OUT_EMERGENCYCALL_FORM = L"IDL_OUT_EMERGENCYCALL_FORM";
+const wchar_t* IDL_CALL_FORM = L"IDL_CALL_FORM";
+const wchar_t* IDL_EMERGENCY_CALL_FORM = L"IDL_EMERGENCY_CALL_FORM";
+const wchar_t* IDL_MULTIPLE_CALL_FORM = L"IDL_MULTIPLE_CALL_FORM";
+const wchar_t* IDL_CONFCALL_FORM = L"IDL_CONFCALL_FORM";
+const wchar_t* IDL_DTMF_PANEL = L"IDL_DTMF_KEYPAD_PANEL";
+const wchar_t* IDL_DTMF_KEYS_PANEL = L"IDL_DTMF_KEYS_PANEL";
+const wchar_t* IDL_DIALER_KEYPAD_PANEL = L"IDL_DIALER_KEYPAD_PANEL";
+const wchar_t* IDL_FORM_EMERGENCY_DIAL = L"IDL_FORM_EMERGENCY_DIAL";
+
+//Constants - Call Scene name
+const wchar_t* IDSCN_SCENE_OUTCALL = L"OutgoingCallScene";
+const wchar_t* IDSCN_SCENE_OUT_EMERGENCYCALL = L"OutgoingEmergencyCallScene";
+const wchar_t* IDSCN_SCENE_INCOMINGCALL = L"IncomingCallScene";
+const wchar_t* IDSCN_SCENE_ACTIVECALL = L"ActiveCallScene";
+const wchar_t* IDSCN_SCENE_ACTIVE_EMERGENCYCALL = L"ActiveEmergencyCallScene";
+const wchar_t* IDSCN_SCENE_CONFCALL = L"ActiveConfCallScene";
+const wchar_t* IDSCN_SCENE_CONFCALLLIST = L"ConfCallListScene";
+const wchar_t* IDSCN_SCENE_ENDCALL = L"EndCallScene";
+const wchar_t* IDSCN_SCENE_MULTIPLEACTIVECALL = L"MultipleActiveCallScene";
+//Constants - Settings Scene name
+const wchar_t* IDSCN_SCENE_MAIN_SETTING_MENU = L"CallMainSettingScene";
+const wchar_t* IDSCN_SCENE_CALL_REJECTLIST_MENU = L"CallRejectListScene";
+const wchar_t* IDSCN_SCENE_CALL_REJECTMSGS_MENU = L"CallRejectMsgsScene";
+const wchar_t* IDSCN_SCENE_SPEED_DIAL = L"SpeedDialScene";
+const wchar_t* IDSCN_SCENE_MORE_OPTIONS = L"MoreOptionsScene";
+const wchar_t* IDSCN_SCENE_CALL_STATUSTONES = L"CallStatusTonesScene";
+const wchar_t* IDSCN_SCENE_CALLTYPE_FORWARD = L"CallTypeForwardScene";
+const wchar_t* IDSCN_SCENE_CALL_FORWARD_OPTIONS = L"CallForwardMenuScene";
+const wchar_t* IDSCN_SCENE_CALLTYPE_BARRING = L"CallTypeBarringScene";
+const wchar_t* IDSCN_SCENE_CALL_BARRING_OPTIONS = L"CallBarringMenuScene";
+const wchar_t* IDSCN_SCENE_CALL_WAITING_OPTIONS = L"CallWaitingMenuScene";
+const wchar_t* IDSCN_SCENE_ADD_REJECT_NUMBER = L"AddRejectNumberScene";
+const wchar_t* IDSCN_SCENE_AUTO_AREA_CODE = L"AutoAreaCodeScene";
+const wchar_t* IDSCN_SCENE_ADD_REJECT_MSG = L"AddRejectMsgScene";
+const wchar_t* IDSCN_SCENE_EDIT_REJECT_MSG = L"EditRejectMsgScene";
+const wchar_t* IDSCN_SCENE_FORWARD_TO_NUMBER = L"ForwardToNumberScene";
+const wchar_t* IDSCN_SCENE_NOREPLY_FORWARD_TO_NUMBER = L"NoReplyForwardToNumberScene";
+const wchar_t* IDSCN_SCENE_SET_BARRING_PWD = L"SetBarringPwdScene";
+const wchar_t* IDSCN_SCENE_DEL_NUMBER = L"DeleteNumbersScene";
+const wchar_t* IDSCN_SCENE_DEL_MESSAGE = L"DeleteMessagesScene";
+//Dialer & Call Log Scene names
+const wchar_t* IDSCN_DIALER = L"SceneDialer";
+const wchar_t* IDSCN_CALL_LOG = L"SceneCallLog";
+const wchar_t* IDSCN_CALL_LOG_DETAILS = L"SceneCallLogDetails";
+const wchar_t* IDSCN_EMERGENCY_DIAL = L"SceneEmergencyDial";
+
+const wchar_t* TYPE_VIDEO = L"type:video";
+const wchar_t* TYPE_VOICE = L"type:voice";
+const wchar_t* TYPE_SMS = L"type:SMS";
+const wchar_t* TEL = L"tel:";
+const wchar_t* TO = L"to:";
+
+const wchar_t* OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/social/pick";
+const wchar_t* OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/social/view";
+const wchar_t* OPERATION_ID_ADD = L"http://tizen.org/appcontrol/operation/social/add";
+const wchar_t* OPERATION_ID_EDIT = L"http://tizen.org/appcontrol/operation/social/edit";
+const wchar_t* OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
+const wchar_t* OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture";
+const wchar_t* OPERATION_ID_CALL = L"http://tizen.org/appcontrol/operation/call";
+const wchar_t* OPERATION_ID_COMPOSE = L"http://tizen.org/appcontrol/operation/compose";
+const wchar_t* OPERATION_ID_DIAL = L"http://tizen.org/appcontrol/operation/dial";
+
+const wchar_t* PROVIDER_ID_CAMERA = L"http://tizen.org/appcontrol/provider/camera";
+const wchar_t* PROVIDER_ID_GALLERY = L"http://tizen.org/appcontrol/provider/gallery";
+//const wchar_t* PROVIDER_ID_CALL = L"http://tizen.org/appcontrol/provider/call";
+const wchar_t* PROVIDER_ID_MESSAGE = L"tizen.messages";
+const wchar_t* PROVIDER_ID_EMAIL = L"http://tizen.org/appcontrol/provider/email";
+const wchar_t* PROVIDER_ID_MEDIA = L"http://tizen.org/appcontrol/provider/media";
+const wchar_t* PROVIDER_ID_CONTACTS = L"f9uev8hsyo.Contacts";
+const wchar_t* PROVIDER_ID_CALL = L"nI2PLNdTwi.Call";
+const wchar_t* PROVIDER_ID_PHONE = L"tizen.phone";
+
+const wchar_t* RETURN_TYPE_PHONE = L"phone";
+const wchar_t* RETURN_TYPE_EMAIL = L"Email";
+const wchar_t* RETURN_TYPE_CONTACT_ID = L"contactId";
+
+//Constants used in AppControl requests
+const wchar_t* DELIMITER = L":";
+const wchar_t* LAUNCHTYPE = L"launch-type";
+const wchar_t* PARAM_ORIGIN_MT = L"MT";
+const wchar_t* CALL_HANDLE = L"handle";
+const wchar_t* CONTACT_NUMBER = L"number";
+const wchar_t* PARAM_CALL_VALUE_VOICE = L"voice";
+const wchar_t* PARAM_CALL_TYPE = L"http://tizen.org/appcontrol/data/call/type";
+const wchar_t* PARAM_PHONE_NUMBER = L"tel";
+const wchar_t* INPUT_TYPE_PHONE = L"http://tizen.org/appcontrol/data/social/phone";
+const wchar_t* MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";
+const wchar_t* MESSAGE_SMS_TYPE = L"SMS";
+const wchar_t* MESSAGE_TEXT = L"http://tizen.org/appcontrol/data/text";
+const wchar_t* MESSAGE_TO = L"http://tizen.org/appcontrol/data/to";
+//Contacts app control parameters
+const wchar_t* CONTACTS_VIEW_TYPE = L"viewType";
+const wchar_t* CONTACTS_VIEW_TYPE_CONTACT = L"contact";
+const wchar_t* ITEM_TYPE_CONTACT = L"contact";
+const wchar_t* CONTACTS_ID_KEY = L"contactId";
+const wchar_t* ITEM_TYPE_PERSON = L"person";
+const wchar_t* CONTACT_KEY_ITEM_TYPE = L"http://tizen.org/appcontrol/data/social/item_type";
+const wchar_t* CONTACT_KEY_ITEM_ID = L"http://tizen.org/appcontrol/data/social/item_id";
+
+
+const wchar_t* SELECTION_MODE = L"selectionMode";
+const wchar_t* RETURN_TYPE = L"returnType";
+const wchar_t* SELECTION_MODE_SINGLE = L"single";
+const wchar_t* RETURN_KEY_VALUE = L"value";
+
+//Settings Strings
+const wchar_t* SETTINGS_FLIGHT_MODE_STR = L"http://tizen.org/setting/network.flight_mode";
+//Dimensions for Small photo of caller/callee.
+const int W_SMALL_PHOTO = 366;
+const int H_SMALL_PHOTO = 366;
+const int W_CALL_THUMBNAIL = 720;
+const int H_CALL_THUMBNAIL = 720;
+const int W_CALL_THUMBNAIL_SHADOW = 388;
+const int H_CALL_THUMBNAIL_SHADOW = 388;
+const int W_CONFERENCE_PHOTO = 720;
+const int H_CONFERENCE_PHOTO = 370;
+//Maximum number of calls
+const int IDI_MAX_ACTIVE_CALLS = 2;
+const int IDI_MAX_CONF_CALL_PARTICIPANTS = 5;
+//Constants used for custom list item in message panel in Incoming call screen
+const int IDA_FORMAT_SENDTEXT = 500;
+//Constants
+const wchar_t* IDI_KEY2_TXT = L"ABC";
+const wchar_t* IDI_KEY3_TXT = L"DEF";
+const wchar_t* IDI_KEY4_TXT = L"GHI";
+const wchar_t* IDI_KEY5_TXT = L"JKL";
+const wchar_t* IDI_KEY6_TXT = L"MNO";
+const wchar_t* IDI_KEY7_TXT = L"PQRS";
+const wchar_t* IDI_KEY8_TXT = L"TUV";
+const wchar_t* IDI_KEY9_TXT = L"WXYZ";
--- /dev/null
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.1 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file CalllogManager.cpp
+ * @brief This class provides call log APIs
+ */
+#include <FLocales.h>
+#include "CallApp.h"
+#include "CalllogManager.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Utility;
+using namespace Tizen::System;
+using namespace Tizen::Locales;
+
+CallLogManager* CallLogManager::__pCallogManager = null;
+
+CallLogManager::CallLogManager(void)
+{
+
+ pAddressBook = AddressbookManager::GetInstance()->GetAddressbookN();
+}
+
+CallLogManager::~CallLogManager(void)
+{
+ __pCallogManager = null;
+}
+
+CallLogManager*
+CallLogManager::GetInstance(void)
+{
+ if(__pCallogManager == null)
+ {
+ CreateInstance();
+ }
+ return __pCallogManager;
+}
+
+void
+CallLogManager::CreateInstance(void)
+{
+ __pCallogManager = new CallLogManager();
+ result r = __pCallogManager->Construct();
+ if(IsFailed(r))
+ {
+ delete __pCallogManager;
+ __pCallogManager = null;
+ return;
+ }
+ std::atexit(DestroyInstance);
+}
+
+result
+CallLogManager::Construct(void)
+{
+ int ret = contacts_connect2();
+ if(ret != 0)
+ {
+ return E_FAILURE;
+ }
+ return E_SUCCESS;
+
+}
+
+void
+CallLogManager::DestroyInstance(void)
+{
+ contacts_disconnect2();
+ delete __pCallogManager;
+}
+
+result
+CallLogManager::AddCallogInfoToDatabase(AppCallInfo* calllogInfo)
+{
+ AppLog(" AddVoiceCallInfo Entry");
+ int duration = 0;
+ long long startTime;
+
+ if(calllogInfo != null)
+ {
+ CallLogType callLogType = calllogInfo->GetCalllogType();
+ contacts_phone_log_type_e logType = CONTACTS_PLOG_TYPE_NONE;
+ switch (callLogType)
+ {
+ case CALL_LOG_TYPE_VOICE_INCOMING:
+ logType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING;
+ break;
+ case CALL_LOG_TYPE_VOICE_OUTGOING:
+ logType = CONTACTS_PLOG_TYPE_VOICE_OUTGOING;
+ break;
+ case CALL_LOG_TYPE_VOICE_MISSED_UNSEEN:
+ logType = CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN;
+ break;
+ case CALL_LOG_TYPE_VOICE_REJECTED:
+ logType = CONTACTS_PLOG_TYPE_VOICE_REJECT;
+ break;
+ case CALL_LOG_TYPE_VOICE_BLOCKED:
+ logType = CONTACTS_PLOG_TYPE_VOICE_BLOCKED;
+ break;
+ default:
+ break;
+ }
+ startTime = calllogInfo->GetCallNotificationTime();
+ if ((logType == CONTACTS_PLOG_TYPE_VOICE_INCOMMING_UNSEEN)
+ || (logType == CONTACTS_PLOG_TYPE_VOICE_REJECT)
+ || (logType == CONTACTS_PLOG_TYPE_VOICE_BLOCKED))
+ {
+ duration = 0;
+ }
+ else
+ {
+ //start time is in miliseconds . so convert to seconds and set it to time_t format.
+ long long connectTime = calllogInfo->GetDurationTime();
+ if(connectTime == 0 || connectTime < 0)
+ {
+ //connectTime = time(null);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ connectTime = pPhoneApp->GetCallAppTicks();
+ connectTime /=1000;
+ }
+ else
+ {
+ connectTime = calllogInfo->GetDurationTime()/ 1000;
+ }
+ duration = (int)GetDuration(connectTime);
+ }
+
+ String PhNumber(L"");
+ ByteBuffer* pByteBuffer = null;
+
+ if(calllogInfo->GetContactNumber().IsEmpty() == false)
+ {
+ PhNumber.Append(calllogInfo->GetContactNumber());
+ pByteBuffer = StringUtil::StringToUtf8N(PhNumber);
+ }
+
+
+ contacts_record_h hContactLog=0;
+ int ret = contacts_record_create(_contacts_phone_log._uri,&hContactLog);
+ if (ret != 0)
+ {
+ return E_FAILURE;
+ }
+ int id;
+
+ int personid = GetPersonId(PhNumber);
+ if (personid != -1)
+ {
+ if(contacts_record_set_int(hContactLog,_contacts_phone_log.person_id,personid) != CONTACTS_ERROR_NONE)
+ {
+ AppLog(" calllog_set_type personid failed");
+ }
+ }
+
+ if (contacts_record_set_int(hContactLog,_contacts_phone_log.log_type,logType) != CONTACTS_ERROR_NONE)
+ {
+ AppLog(" calllog_set_type is failed");
+ }
+ else if (contacts_record_set_int(hContactLog,_contacts_phone_log.log_time,startTime/1000) != CONTACTS_ERROR_NONE)
+ {
+ AppLog(" calllog_set_time is failed");
+ }
+ else if (contacts_record_set_int(hContactLog,_contacts_phone_log.extra_data1,duration) != CONTACTS_ERROR_NONE)
+ {
+ AppLog(" calllog_set_duration is failed");
+ }
+ else if ((pByteBuffer != null) && (contacts_record_set_str(hContactLog,_contacts_phone_log.address,(const char*) pByteBuffer->GetPointer()) != CONTACTS_ERROR_NONE))
+ {
+ AppLog(" calllog_set_number is failed");
+ }
+ else if (contacts_db_insert_record(hContactLog,&id) != CONTACTS_ERROR_NONE)
+ {
+ AppLog(" calllog_insert_to_db is failed");
+ }
+ else
+ {
+ AppLog(" Call log is added successfully");
+ }
+
+ }
+ AppLog(" AddVoiceCallInfo Exit");
+ return E_SUCCESS;
+}
+
+unsigned long
+CallLogManager::GetDuration(long long start_time)
+{
+ long long curr_time;
+ unsigned long call_duration_in_sec = 50;
+// curr_time = time(0);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ curr_time = pPhoneApp->GetCallAppTicks();
+ curr_time /=1000;
+ /*if(start_time != 0)
+ {
+ start_time /= 1000;
+ }*/
+ call_duration_in_sec = curr_time - start_time;
+ return call_duration_in_sec;
+}
+int
+CallLogManager::GetPersonId(Tizen::Base::String& phoneNumber)
+{
+ AppLogDebug("Enter");
+ int personId = -1;
+ bool bContactFound = false;
+ if (pAddressBook != null)
+ {
+ IList* pNumberContactsList = pAddressBook->SearchContactsByPhoneNumberN(phoneNumber);
+ if (pNumberContactsList == null || IsFailed(GetLastResult()))
+ {
+ return -1;
+ }
+
+ //Fetch the contact's info to be displayed
+ IEnumerator* pContactEnum = pNumberContactsList->GetEnumeratorN();
+ if(pNumberContactsList != null)
+ {
+ while (E_SUCCESS == pContactEnum->MoveNext())
+ {
+ Contact* pContact = static_cast<Contact*>(pContactEnum->GetCurrent());
+
+ IList* pPhoneNumberList = pContact->GetValuesN(CONTACT_MPROPERTY_ID_PHONE_NUMBERS);
+ if (pPhoneNumberList != null)
+ {
+ IEnumerator* pPhoneEnum = pPhoneNumberList->GetEnumeratorN();
+ while (E_SUCCESS == pPhoneEnum->MoveNext())
+ {
+ PhoneNumber* pPhoneNumber = (PhoneNumber*) pPhoneEnum->GetCurrent();
+ //Check if this is the correct contact
+ if (pPhoneNumber->GetPhoneNumber().Equals(phoneNumber))
+ {
+ //save newly fetched contact info.
+ bContactFound = true;
+ personId = pContact->GetPersonId();
+ break;
+ }
+ }
+ delete pPhoneEnum;
+ pPhoneNumberList->RemoveAll(true);
+ delete pPhoneNumberList;
+ }
+ if(bContactFound == true)
+ {
+ break;
+ }
+ }
+ }
+ delete pContactEnum;
+ pNumberContactsList->RemoveAll(true);
+ delete pNumberContactsList;
+ }
+ return personId;
+}
+