--- a/build/Makefile.comp Tue Jul 06 20:36:19 2010 +0300
+++ b/build/Makefile.comp Fri Jul 09 16:35:45 2010 +0300
@@ -119,7 +119,7 @@
# Symbian ----------------------------------
ifeq ($(BUILDENV),symbian)
-all: qmake java native
+all: qmake java native codescanner
# Extract basename of current component
BASENAME = $(basename $(PRO_FILE))
@@ -151,11 +151,11 @@
echo #include "exports.inf" >> bld.inf
endif
+# Quick java releasables target
+RELEASABLE_PATH = $(EPOCROOT)epoc32/release/$(PLATFORM)/$(CFG)/z/resource/java/jvm/lib/jrt
javareleasables:
ifneq ($(ANT_FILE),)
- $(ANT) -q -Dtarget.platform=$(PLATFORM) -Dtarget.cfg=$(VARIANT) $(ANT_PROJECT_DEFINES) releasables > $(DEVNULL)
- $(call CATCOMMAND,java_releasables_$(PLATFORM)_$(VARIANT).tmp)
- $(call RMFILE,java_releasables_$(PLATFORM)_$(VARIANT).tmp)
+ echo $(RELEASABLE_PATH)/$(BASENAME).odc
endif
# Remove all generated build files
@@ -170,6 +170,12 @@
clean_qmake:
-$(call RMFILES,abld.bat bld.inf* Makefile* $(BASENAME).mmp $(BASENAME)_*.mmp $(BASENAME)_*.pkg $(BASENAME)_reg.rss eabi_stl4/*)
+# Use Carbide CodeScanner to list high-level issues
+codescanner:
+ifneq ($(call PATHSEARCH,codescanner.exe),)
+ $(call CODESCANNER,..)
+endif
+
# Symbian SBS ------------------------------
ifdef USESBS
--- a/build/Makefile.defs Tue Jul 06 20:36:19 2010 +0300
+++ b/build/Makefile.defs Fri Jul 09 16:35:45 2010 +0300
@@ -57,6 +57,7 @@
MKDIR = if [ ! -d $(1)]; then mkdir $(1); fi
RMDIR = if [ -d $(1)]; then rmdir $(1); fi
DELTREE = if [ -d $(1)]; then rm -fr $(1); fi
+ PATHSEARCH = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(PATH)))))
else
# CMD.exe definitions
@@ -74,6 +75,7 @@
MKDIR = if not exist $(1) mkdir $(1)
RMDIR = if exist $(1) rmdir $(1)
DELTREE = if exist $(1) rmdir /S/Q $(1)
+ PATHSEARCH = $(firstword $(wildcard $(addsuffix /$(1),$(subst ;, ,$(PATH)))))
endif
@@ -103,6 +105,7 @@
export ANT_OPTS=
BLDMAKE = perl -S bldmake.pl
ABLDMAKE = set MAKELEVEL=&&set MAKEFLAGS=&&set MFLAGS=&&make -r
+ CODESCANNER = codescanner -c $(JAVA_SRC_ROOT)/build/codescanner_high.xml -o std $(1) | perl -ne "print if /error:/;"
ifdef NODEP
# Makmake does not make dependency checks with this flag
@@ -259,10 +262,9 @@
endif
generatereleasefile:
-ifeq ($(origin RD_JAVA_S60_RELEASE),command line)
@echo Writing $(RD_JAVA_S60_RELEASE_FILE) ... \
+ $(shell $(call CATCOMMAND,$(JAVA_SRC_ROOT)/build/templates/generated_header_hash.txt) > $(RD_JAVA_S60_RELEASE_FILE)) \
$(shell echo RD_JAVA_S60_RELEASE=$(RD_JAVA_S60_RELEASE)>$(RD_JAVA_S60_RELEASE_FILE))
-endif
# Clean file on clean_generated
clean_configure: clean_conffiles
--- a/build/Makefile.nonqt Tue Jul 06 20:36:19 2010 +0300
+++ b/build/Makefile.nonqt Fri Jul 09 16:35:45 2010 +0300
@@ -43,19 +43,24 @@
# Symbian ----------------------------------
ifeq ($(BUILDENV),symbian)
-all: native
+all: native codescanner
javareleasables:
makestubs:
+codescanner:
+ifneq ($(call PATHSEARCH,codescanner.exe),)
+ $(call CODESCANNER,..)
+endif
+
# Symbian SBS ------------------------------
ifdef USESBS
# BUILD combines commands EXPORT MAKEFILE BITMAP RESOURCE LIBRARY TARGET FINAL
native:
$(PHASEINFO)
- $(SBS) -c $(PLATFORM)_$(CFG) BUILD
+ $(SBS) -c $(PLATFORM)_$(CFG)
clean_java:
--- a/build/bld.inf Tue Jul 06 20:36:19 2010 +0300
+++ b/build/bld.inf Fri Jul 09 16:35:45 2010 +0300
@@ -50,7 +50,7 @@
#else // RD_JAVA_UI_QT
-../rom/java_2_1.iby CORE_APP_LAYER_IBY_EXPORT_PATH(java.iby)
+../rom/java_2_2.iby CORE_APP_LAYER_IBY_EXPORT_PATH(java.iby)
// Export ODC list files
../rom/midpodclist /epoc32/release/winscw/udeb/z/resource/java/midpodclist
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/codescanner_high.xml Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,61 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Configuration file for the Carbine CodeScanner, to
+# scan only high-priority issues.
+#
+-->
+<codescannerConfig>
+ <sources>
+ <!-- source files matching any of the exclude patterns below will not be scanned -->
+
+ <!-- binary files -->
+ <exclude>.*\.au</exclude>
+ <exclude>.*\.avi</exclude>
+ <exclude>.*\.bmp</exclude>
+ <exclude>.*\.dll</exclude>
+ <exclude>.*\.doc</exclude>
+ <exclude>.*\.exe</exclude>
+ <exclude>.*\.gif</exclude>
+ <exclude>.*\.jpg</exclude>
+ <exclude>.*\.mbm</exclude>
+ <exclude>.*\.mp3</exclude>
+ <exclude>.*\.mpg</exclude>
+ <exclude>.*\.png</exclude>
+ <exclude>.*\.raw</exclude>
+ <exclude>.*\.rtf</exclude>
+ <exclude>.*\.tif</exclude>
+ <exclude>.*\.wav</exclude>
+ <exclude>.*\.wbmp</exclude>
+ <exclude>.*\.wmf</exclude>
+ <exclude>.*\.xls</exclude>
+ <!-- typical test directory names -->
+ <exclude>.*\\ts_.*</exclude>
+ <exclude>.*\\tsrc\\.*</exclude>
+ <exclude>.*\\tsrc.s60\\.*</exclude>
+ <exclude>.*\\test\\.*</exclude>
+ <exclude>.*\\internal\\.*</exclude>
+ <exclude>.*\\Internal\\.*</exclude>
+ <exclude>.*\\.svn\\.*</exclude>
+ <exclude>\\tools\\.*</exclude>
+ </sources>
+ <severities>
+ <!-- Group scripts based on severity level: -->
+ <!-- enable="true" or "false" -->
+
+ <high enable="true"/>
+ <medium enable="false"/>
+ <low enable="false"/>
+ </severities>
+</codescannerConfig>
--- a/build/exports.inf Tue Jul 06 20:36:19 2010 +0300
+++ b/build/exports.inf Fri Jul 09 16:35:45 2010 +0300
@@ -48,7 +48,7 @@
#else // RD_JAVA_UI_QT
-../rom/java_2_1.iby CORE_APP_LAYER_IBY_EXPORT_PATH(java.iby)
+../rom/java_2_2.iby CORE_APP_LAYER_IBY_EXPORT_PATH(java.iby)
// Export ODC list files
../rom/midpodclist /epoc32/release/winscw/udeb/z/resource/java/midpodclist
Binary file build/loc/resources.jar has changed
--- a/build/makefile Tue Jul 06 20:36:19 2010 +0300
+++ b/build/makefile Fri Jul 09 16:35:45 2010 +0300
@@ -61,6 +61,9 @@
javatools \
javaextensions
+# Set order explicitly to get Java building as first
+SUBTARGETS = $(COMPONENTS) $(NONQTSUBSYSTEMS) $(SUBSYSTEMS)
+
# -------------------------------------------------------
include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
--- a/build/makefile.javaversion Tue Jul 06 20:36:19 2010 +0300
+++ b/build/makefile.javaversion Fri Jul 09 16:35:45 2010 +0300
@@ -1,2 +1,2 @@
# Set Java version (must be dot separated, without spaces)
-JAVA_VERSION = 2.2.3
+JAVA_VERSION = 2.2.4
--- a/build/nativejava.flm Tue Jul 06 20:36:19 2010 +0300
+++ b/build/nativejava.flm Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
@@ -23,23 +23,67 @@
# therefore the jrt-directory is found from finding first directory having
# subsystem.mk, going up to max. three directory levels)
-JAVABUILDDIR = $(dir $(firstword $(wildcard $(TO_BLDINF)/subsystem.mk $(TO_BLDINF)/../subsystem.mk $(TO_BLDINF)/../../subsystem.mk)))
+JAVABUILDDIR:= $(dir $(firstword $(wildcard $(TO_BLDINF)/subsystem.mk $(TO_BLDINF)/../subsystem.mk $(TO_BLDINF)/../../subsystem.mk)))
-JAVABUILDCMD = make -C $(JAVABUILDDIR) -f subsystem.mk EPOCROOT=$(EPOCROOT)/ \
+# General Java makefile command
+JAVACMD:= make -C $(JAVABUILDDIR) -f subsystem.mk EPOCROOT=$(EPOCROOT)/ \
PLATFORM=$(PLATFORM) CFG=$(CFG) BLD_INF_JAVA=1
-define java_build
-RESOURCE::
+# General build command, targetting armv5 urel files
+JAVABUILDCMD:= make -C $(JAVABUILDDIR) -f subsystem.mk EPOCROOT=$(EPOCROOT)/ \
+ PLATFORM=armv5 CFG=urel BLD_INF_JAVA=1 java finalactions
+
+# Marker file to prevent multiple Java compilations of the
+# same platform/cfg, when building e.g. device variants.
+NATIVEJAVAMARKER := $(EPOCBLD)/nativejavamarker_$(PLATFORM)_$(CFG).done
+
+# Java build artifact file source and target
+JAVABUILD_ARTIFACT_SRC := $(EPOCROOT)/epoc32/release/armv5/urel
+JAVABUILD_ARTIFACT_DST := $(EPOCROOT)/epoc32/release/$(PLATFORM)/$(CFG)
+
+define compilenativejava
+
+# This is the general Java compilation, done once for the component
+ifeq ($(GUARD_nativejavatarget),)
+GUARD_nativejavatarget:=1
+.PHONY:: nativejavatarget
+nativejavatarget:
$(call startrule,compilenativejava,,javasources) \
- $(JAVABUILDCMD) java finalactions\
+ $(JAVABUILDCMD) \
$(call endrule,compilenativejava)
+endif
+
+# Actual resource target, one for each platform/cfg variant
+ifeq ($(GUARD_$(call sanitise,$(NATIVEJAVAMARKER))),)
+GUARD_$(call sanitise,$(NATIVEJAVAMARKER)):=1
+
+RESOURCE:: $(NATIVEJAVAMARKER)
+
+# Copy the build artifacts to target
+$(NATIVEJAVAMARKER): nativejavatarget
+ifeq ($(filter armv5_urel ARMV5_urel ARMV5_UREL,$(PLATFORM)_$(CFG)),)
+ $(call makepath,$(JAVABUILD_ARTIFACT_DST)/z/resource/java/jvm/lib/jrt)
+ $(call makepath,$(JAVABUILD_ARTIFACT_DST)/z/resource/java/security)
+ $(call startrule,copynativejavaresults) \
+ $(foreach f,java_impl_cdc.jar java_impl_cldc.jar java_platform_api.jar java_public_api.jar java_signature_test.jar, $(GNUCP) -v $(JAVABUILD_ARTIFACT_SRC)/$f $(JAVABUILD_ARTIFACT_DST) &&) \
+ $(GNUCP) -Rv $(JAVABUILD_ARTIFACT_SRC)/z/resource/java/jvm/lib/jrt $(JAVABUILD_ARTIFACT_DST)/z/resource/java/jvm/lib && \
+ $(GNUCP) -Rv $(JAVABUILD_ARTIFACT_SRC)/z/resource/java/security $(JAVABUILD_ARTIFACT_DST)/z/resource/java \
+ $(call endrule,copynativejavaresults)
+endif
+endif
+
+# Use normal clean for all variants
CLEAN::
$(call startrule,cleannativejava,,javasources) \
- $(JAVABUILDCMD) clean_java \
+ $(JAVACMD) clean_java \
$(call endrule,cleannativejava)
endef
-$(eval $(java_build))
+$(eval $(compilenativejava))
-RELEASABLES = $(shell $(JAVABUILDCMD) -s javareleasables)
+RELEASABLES:= $(shell $(JAVACMD) -s javareleasables)
$(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))
+
+$(eval $(call GenerateStandardCleanTarget,$(NATIVEJAVAMARKER)))
+
+
--- a/build/properties.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/build/properties.xml Fri Jul 09 16:35:45 2010 +0300
@@ -41,12 +41,23 @@
for reason why this property is defined"/> -->
<property name="platform.utilities.xml.file" value="utilities.fake.xml"/>
- <!--The cldc/cdc class file locations -->
- <property name="bootclasspath.cldc" location="${java.src.root}/inc/classes.cldc.zip"/>
- <property name="bootclasspath.cdc" location="${java.src.root}/inc/classes.cdc.zip"/>
- <property name="bootclasspath.fp" location="${java.src.root}/inc/classes.fp.zip"/>
-
-
+ <!-- Set internal epoc root -->
+ <condition property="epocroot" value="${env.EPOCROOT}" else="">
+ <isset property="env.EPOCROOT"/>
+ </condition>
+
+ <!--The cldc/cdc class file locations, within the sources -->
+ <available file="${java.src.root}/inc/classes.cldc.zip" property="bootclasspath.cldc"
+ value="${java.src.root}/inc/classes.cldc.zip" />
+ <available file="${java.src.root}/inc/classes.cdc.zip" property="bootclasspath.cdc"
+ value="${java.src.root}/inc/classes.cdc.zip" />
+ <available file="${java.src.root}/inc/classes.fp.zip" property="bootclasspath.fp"
+ value="${java.src.root}/inc/classes.fp.zip" />
+
+ <!--The cldc/cdc class file locations, external if not found in default places -->
+ <property name="bootclasspath.cldc" location="${epocroot}epoc32/jrt/classes.cldc.zip"/>
+ <property name="bootclasspath.cdc" location="${epocroot}epoc32/jrt/classes.cdc.zip"/>
+ <property name="bootclasspath.fp" location="${epocroot}epoc32/jrt/classes.fp.zip"/>
<!--NOTE!!! Properties defined below can be used only inside a target-->
@@ -60,13 +71,6 @@
<equals arg1="${target.cfg}" arg2="debug"/>
</condition>
- <!-- Set internal epoc root -->
- <condition property="epocroot"
- value="${env.EPOCROOT}"
- else="">
- <isset property="env.EPOCROOT"/>
- </condition>
-
<!--Location of eswt.jar. This is not needed in S60 Avkon,
but needed in S60 Qt. -->
<property name="eswt.jar" value=":${java.src.root}/javauis/bin/eswt.jar"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/sis/incompatible_openc.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,3 @@
+OpenC version 1.5 or later is not found. Some Java applications may not work properly. Make sure that latest device firmware is used.
+
+Continue installation?
\ No newline at end of file
--- a/build/sis/incompatible_platform.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/build/sis/incompatible_platform.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,1 +1,1 @@
-Unfortunately Java Runtime 2.0 Alpha is not compatible with your device. Java Runtime 2.0 Alpha works only on S60 5.0 devices.
+Java Runtime is not compatible with your device. Java Runtime requires S60 5th Edition device.
\ No newline at end of file
--- a/build/sis/java_2_0.pkg Tue Jul 06 20:36:19 2010 +0300
+++ b/build/sis/java_2_0.pkg Fri Jul 09 16:35:45 2010 +0300
@@ -488,6 +488,7 @@
"\epoc32\release\armv5\urel\jvmnativeport.dll"-"c:\sys\bin\jvmnativeport.dll"
"\epoc32\release\armv5\urel\midp2backupplugin.dll"-"c:\sys\bin\midp2backupplugin.dll"
"\epoc32\release\armv5\urel\javadebugapi.dll"-"c:\sys\bin\javadebugapi.dll"
+"\epoc32\release\armv5\urel\javastarter.dll"-"c:\sys\bin\javastarter.dll"
#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
"\epoc32\release\armv5\urel\midp2cenrep.dll"-"c:\sys\bin\midp2cenrep.dll"
@@ -826,3 +827,9 @@
; javaappbackconverter is ran after uninstallation
"\epoc32\release\armv5\urel\javaappbackconverter.exe"-"c:\sys\bin\javaappbackconverter.exe", FR, RR, RW
#endif // RD_JAVA_S60_RELEASE_5_0_IAD
+
+
+#ifndef RD_JAVA_S60_RELEASE_5_0_IAD
+"\epoc32\release\armv5\urel\javaiconsizenotifplugin.dll"-"c:\sys\bin\javaiconsizenotifplugin.dll"
+"\epoc32\data\z\resource\plugins\javaiconsizenotifplugin.rsc"-"c:\resource\plugins\javaiconsizenotifplugin.rsc"
+#endif // RD_JAVA_S60_RELEASE_5_0_IAD
--- a/build/sis/java_3_1.pkg Tue Jul 06 20:36:19 2010 +0300
+++ b/build/sis/java_3_1.pkg Fri Jul 09 16:35:45 2010 +0300
@@ -190,7 +190,9 @@
"\epoc32\release\armv5\urel\javadebugapi.dll"-"c:\sys\bin\javadebugapi.dll"
#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
"\epoc32\release\armv5\urel\javasifplugin.dll"-"c:\sys\bin\javasifplugin.dll"
+"\epoc32\release\armv5\urel\javainstallcopier.exe"-"c:\sys\bin\javainstallcopier.exe"
#endif
+"\epoc32\release\armv5\urel\javastarter.dll"-"c:\sys\bin\javastarter.dll"
; to enable JVM argument modifier - comment 1st line below and uncomment 2nd line below
"\epoc32\release\armv5\urel\javajvmargsmodifier.dll"-"c:\sys\bin\javajvmargsmodifier.dll"
@@ -350,3 +352,5 @@
"\epoc32\release\armv5\urel\z\resource\java\jvm\lib\jrt\openlcdui.odc"-"c:\resource\java\jvm\lib\jrt\openlcdui.odc"
"\epoc32\release\armv5\urel\z\resource\java\jvm\lib\jrt\javanokiaui.odc"-"c:\resource\java\jvm\lib\jrt\javanokiaui.odc"
+"\epoc32\release\armv5\urel\javaapplicationsettingsview.dll"-"c:\sys\bin\javaapplicationsettingsview.dll"
+"\epoc32\data\z\resource\qt\plugins\appsettings\javaapplicationsettingsview.qtplugin"-"c:\resource\qt\plugins\appsettings\javaapplicationsettingsview.qtplugin"
--- a/build/templates/10.1.layers.sysdef.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/build/templates/10.1.layers.sysdef.xml Fri Jul 09 16:35:45 2010 +0300
@@ -12,26 +12,12 @@
qmakeArgs="-r"
filter="!sf_build" />
</module>
-
-<!-- When releasing to SF, change the sf_build to this.
<module name="jrt_sf">
<unit name="jrt_sf" unitID="jrt.jrt_sf" mrp=""
bldFile="&layer_real_source_path;" proFile="jrt.pro"
qmakeArgs="-r RD_JAVA_SF_BUILD=1"
filter="sf_build" />
</module>
--->
- <module name="jrt">
- <unit name="jrt_jrt_plat" unitID="jrt.jrt.jrt_plat" mrp=""
- bldFile="&layer_real_source_path;/jrt_plat/group"
- filter="sf_build" />
- </module>
- <module name="jrt">
- <unit name="jrt_jrt_stubs" unitID="jrt.jrt.java_stubs" mrp=""
- bldFile="&layer_real_source_path;/java_stubs/group"
- filter="sf_build" />
- </module>
-
</layer>
</systemModel>
</SystemDefinition>
--- a/build/templates/9.2.layers.sysdef.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/build/templates/9.2.layers.sysdef.xml Fri Jul 09 16:35:45 2010 +0300
@@ -10,22 +10,10 @@
<unit unitID="jrt.jrt" mrp="" bldFile="&layer_real_source_path;/group"
filter="!sf_build" name="jrt" />
</module>
-
-<!-- When releasing to SF, change the sf_build to this.
<module name="jrt_sf">
<unit unitID="jrt.jrt_sf" mrp="" bldFile="&layer_real_source_path;/group/sf"
filter="sf_build" name="jrt_sf" />
</module>
--->
- <module name="jrt">
- <unit unitID="jrt.jrt.jrt_plat" mrp="" bldFile="&layer_real_source_path;/jrt_plat/group"
- filter="sf_build" name="jrt_jrt_plat" />
- </module>
- <module name="jrt">
- <unit unitID="jrt.jrt.java_stubs" mrp="" bldFile="&layer_real_source_path;/java_stubs/group"
- filter="sf_build" name="jrt_jrt_stubs" />
- </module>
-
</layer>
</systemModel>
</SystemDefinition>
--- a/inc/build_defines.hrh Tue Jul 06 20:36:19 2010 +0300
+++ b/inc/build_defines.hrh Fri Jul 09 16:35:45 2010 +0300
@@ -15,7 +15,7 @@
*
*/
-#define RD_JAVA_VERSION 2,2,1
+#define RD_JAVA_VERSION 2,2,4
#define RD_JAVA_SYMBIAN_TARGET
#define RD_JAVA_S60_RELEASE_10_1
#define RD_JAVA_S60_RELEASE_10_1_ONWARDS
@@ -27,9 +27,6 @@
#define RD_JAVA_HTTP_EMC_ENABLED
#define RD_JAVA_NGA_ENABLED
#define SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-#define RD_JAVA_USIF_APP_REG
-#define RD_JAVA_USIF_NOTIFY_APP_ARC
-#define RD_JAVA_USIF_NOTIFY_PROGRESS
#define RD_JAVA_PROXIMITY_LISTENER_ENABLED
#define RD_JAVA_OPENC_BETA_PATCH
#define OPENLCDUI_ENABLED
--- a/inc/build_defines.pri Tue Jul 06 20:36:19 2010 +0300
+++ b/inc/build_defines.pri Fri Jul 09 16:35:45 2010 +0300
@@ -13,4 +13,4 @@
#
# Description: Generated file - do not edit manually
#
-PROJECT_DEFINES *= RD_JAVA_SYMBIAN_TARGET RD_JAVA_S60_RELEASE_10_1 RD_JAVA_S60_RELEASE_10_1_ONWARDS RD_JAVA_S60_RELEASE_9_2_ONWARDS RD_JAVA_S60_RELEASE_5_0_ONWARDS RD_JAVA_UI_QT RD_JAVA_STDCPPV5 RD_JAVA_EPOCALLOWDLLDATA_FIX RD_JAVA_HTTP_EMC_ENABLED RD_JAVA_NGA_ENABLED SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK RD_JAVA_USIF_APP_REG RD_JAVA_USIF_NOTIFY_APP_ARC RD_JAVA_USIF_NOTIFY_PROGRESS RD_JAVA_PROXIMITY_LISTENER_ENABLED RD_JAVA_OPENC_BETA_PATCH OPENLCDUI_ENABLED RD_JAVA_OPENLCDUI_ENABLED RD_JAVA_INSTALLERUI_ENABLED RD_JAVA_PREWARM RD_JAVA_ADVANCED_TACTILE_FEEDBACK RD_JAVA_APPLICATION_SETTINGS_QT RD_JAVA_MIDPRMS_DB
+PROJECT_DEFINES *= RD_JAVA_SYMBIAN_TARGET RD_JAVA_S60_RELEASE_10_1 RD_JAVA_S60_RELEASE_10_1_ONWARDS RD_JAVA_S60_RELEASE_9_2_ONWARDS RD_JAVA_S60_RELEASE_5_0_ONWARDS RD_JAVA_UI_QT RD_JAVA_STDCPPV5 RD_JAVA_EPOCALLOWDLLDATA_FIX RD_JAVA_HTTP_EMC_ENABLED RD_JAVA_NGA_ENABLED SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK RD_JAVA_PROXIMITY_LISTENER_ENABLED RD_JAVA_OPENC_BETA_PATCH OPENLCDUI_ENABLED RD_JAVA_OPENLCDUI_ENABLED RD_JAVA_INSTALLERUI_ENABLED RD_JAVA_PREWARM RD_JAVA_ADVANCED_TACTILE_FEEDBACK RD_JAVA_APPLICATION_SETTINGS_QT RD_JAVA_MIDPRMS_DB
--- a/inc/java.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/inc/java.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,1 +1,1 @@
-2.2.3
+2.2.4
--- a/inc/project_defines.hrh Tue Jul 06 20:36:19 2010 +0300
+++ b/inc/project_defines.hrh Fri Jul 09 16:35:45 2010 +0300
@@ -26,9 +26,6 @@
MACRO RD_JAVA_HTTP_EMC_ENABLED
MACRO RD_JAVA_NGA_ENABLED
MACRO SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
-MACRO RD_JAVA_USIF_APP_REG
-MACRO RD_JAVA_USIF_NOTIFY_APP_ARC
-MACRO RD_JAVA_USIF_NOTIFY_PROGRESS
MACRO RD_JAVA_PROXIMITY_LISTENER_ENABLED
MACRO RD_JAVA_OPENC_BETA_PATCH
MACRO OPENLCDUI_ENABLED
--- a/javacommons/comms/build/comms.pro Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE=lib
-TARGET=javacomms
-CONFIG += omj java staticdata stl
-CONFIG -= qt
-LIBS += -ljavaipc
-
-
-include(../../../build/omj.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/comms/build/javacomms.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,24 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE=lib
+TARGET=javacomms
+CONFIG += omj java staticdata stl
+CONFIG -= qt
+LIBS += -ljavaipc
+
+
+include(../../../build/omj.pri)
--- a/javacommons/comms/comms.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/comms/comms.pro Fri Jul 09 16:35:45 2010 +0300
@@ -15,6 +15,6 @@
#
TEMPLATE = subdirs
SUBDIRS += ipclib/clientserver/build/ipc.pro
-SUBDIRS += build/comms.pro
+SUBDIRS += build/javacomms.pro
BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"ipclib/build/bld.inf\""
BLD_INF_RULES.prj_extensions += "prj_extensions"
--- a/javacommons/comms/src/commsendpoint.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/comms/src/commsendpoint.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -295,12 +295,13 @@
break;
case ETIMEDOUT:
+ default:
mSendReceiveListeners.erase(messageRef);
done = 1;
- break;
-
- default:
- ELOG2(EJavaComms, "pthread_cond_timedwait failed %d - %s", rc, strerror(rc));
+ if (rc != ETIMEDOUT)
+ {
+ ELOG2(EJavaComms, "pthread_cond_timedwait failed %d - %s", rc, strerror(rc));
+ }
break;
}
}
--- a/javacommons/connectionmanager/inc.s60/connectionmanager.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/connectionmanager/inc.s60/connectionmanager.h Fri Jul 09 16:35:45 2010 +0300
@@ -163,6 +163,7 @@
static HBufC8 * PromptUserSelectNetworkAccessPointL();
static HBufC8 * CreateDescriptorL(const int aType, const int id);
+ static bool checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault);
--- a/javacommons/connectionmanager/src.s60/connectionmanager.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/connectionmanager/src.s60/connectionmanager.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -65,7 +65,21 @@
EXPORT_C bool ConnectionManager::isIapDefault(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
{
- LOG(ESOCKET,EInfo,"+ConnectionManager::getDefualtId");
+ LOG(ESOCKET,EInfo,"+ConnectionManager::isIapDefault");
+ bool retVal = false;
+ TRAPD(err,retVal = checkIapDefaultL(aMatchIapId,aDestId,aDefault));
+ if(err!=KErrNone)
+ {
+ // error occured
+ return false;
+ }
+ return retVal;
+}
+
+bool ConnectionManager::checkIapDefaultL(TUint32 aMatchIapId, TUint32 aDestId, bool aDefault)
+{
+
+ LOG(ESOCKET,EInfo,"+ConnectionManager::checkIapDefaultL");
TUint32 id = aDestId;
TUint32 tmpapId;
TCmDefConnType type;
@@ -79,7 +93,7 @@
mgr->ReadDefConnL(obj);
id = obj.iId;
type = obj.iType;
- if ((type ==ECmDefConnConnectionMethod) && (type == aMatchIapId))
+ if ((type ==ECmDefConnConnectionMethod) && (id == aMatchIapId))
{
return true;
}
@@ -104,8 +118,9 @@
return true;
}
}
- return false;
-
+ return false;
+
+
}
// ---------------------------------------------------------------------------
--- a/javacommons/fileutils/build/fileutils.pro Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TARGET=javafileutils
-TEMPLATE=lib
-CONFIG += omj java staticdata stl
-CONFIG -= qt
-
-symbian : LIBS += -lefsrv -lPlatformEnv -lcaf
-
-LIBS+= -ljavautils -ljavacomms
-
-include(../../../build/omj.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/fileutils/build/javafileutils.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TARGET=javafileutils
+TEMPLATE=lib
+CONFIG += omj java staticdata stl
+CONFIG -= qt
+
+symbian : LIBS += -lefsrv -lPlatformEnv -lcaf
+
+LIBS+= -ljavautils -ljavacomms
+
+include(../../../build/omj.pri)
--- a/javacommons/fileutils/javasrc/com/nokia/mj/impl/fileutils/FileURL.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/fileutils/javasrc/com/nokia/mj/impl/fileutils/FileURL.java Fri Jul 09 16:35:45 2010 +0300
@@ -23,7 +23,7 @@
* differences between URL and Absolute path and make it transparent to use
* from.
*/
-final class FileURL
+public final class FileURL
{
private static String FILE_PREFIX = "file://";
Binary file javacommons/fileutils/tsrc/data/HelloWorld2.jar has changed
--- a/javacommons/gcfbase/javasrc/com/nokia/mj/impl/gcf/PushRegistryPermissionImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfbase/javasrc/com/nokia/mj/impl/gcf/PushRegistryPermissionImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -115,7 +115,7 @@
*/
public String toString()
{
- return "javax.microedition.io.PushRegistryPermission";
+ return "javax.microedition.io.PushRegistry";
}
/**
--- a/javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -254,7 +254,7 @@
curUrl = curUrl.substring(0, curUrl.length() - 1);
}
String newUrl = curUrl.substring(0, curUrl.lastIndexOf('/') + 1);
- newUrl += iFileUtility.getName();
+ newUrl += FileUTF8Handler.encode(iFileUtility.getName());
iFileConnectionUrl = new FileConnectionURL(newUrl);
}
--- a/javacommons/gcfprotocols/file/tsrc/mt/filetestinit/build/javafiletestinit.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/file/tsrc/mt/filetestinit/build/javafiletestinit.pro Fri Jul 09 16:35:45 2010 +0300
@@ -21,7 +21,6 @@
symbian {
TARGET.CAPABILITY = all -tcb
- INCLUDEPATH += /epoc32/include/caf
LIBS += -lcaf -lcafutils -lefsrv -lDrmParsers -lDRMServerInterfaces
}
--- a/javacommons/gcfprotocols/http/build/javahttp.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/build/javahttp.pro Fri Jul 09 16:35:45 2010 +0300
@@ -18,15 +18,14 @@
TARGET=javahttp
TEMPLATE=lib
CONFIG += omj java stl
+CONFIG -= qt
symbian {
LIBS += -leuser -lhttp -lecom -lbafl -linetprotutil -lhttpfiltercommon -lx509 -lx500 -lcrypto -lesock -lcommdb -lcentralrepository
contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
- QT += webkit
- QT -= gui
- LIBS += -lQtWebKit -lplatformEnv -ljavaenvinfo
+
}
else {
LIBS += -lwebutils
--- a/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/HttpPermissionImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/HttpPermissionImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -45,7 +45,7 @@
public String toString()
{
- return "javax.microedition.io.HttpProtocolPermission";
+ return "javax.microedition.io.Connector.http";
}
public boolean implies(Permission p)
--- a/javacommons/gcfprotocols/http/src.s60/javauseragent.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/javauseragent.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -17,38 +17,16 @@
#include "javauseragent.h"
#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
-#include <QWebpage.h>
-#include "javaenvinfo.h"
#else
#include <cuseragent.h>
#endif
-#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
-class Page: public QWebPage
-{
-public:
- QString userAgentForUrl ( const QUrl & url ) const;
-};
-
-QString Page::userAgentForUrl ( const QUrl & url ) const
-{
- return url.toString();
-}
-#endif
HBufC* JavaUserAgent::GetUserAgentL()
{
#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
- /*QApplication app();
- QUrl uri;
- Page page;
- QString webUserAgent = page.userAgentForUrl(uri);
- HBufC* agent = HBufC::NewMaxLC(webUserAgent.length());
- agent->Des().Copy(webUserAgent.utf16());
- agent->Des().Append(*(Java::JavaEnvInfo::GetUserAgentHeaderL()));
- return agent;
- */
+
_LIT(KString,"null");
HBufC* agent = HBufC::NewLC(5);
*agent = KString;
--- a/javacommons/gcfprotocols/http/src.s60/nativehttptraansaction.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/nativehttptraansaction.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -135,7 +135,7 @@
narrowBuffer = HBufC8::NewLC(length);
TPtr8 narrowPtr = narrowBuffer->Des();
narrowPtr.Copy(rawHeader);
- rawHeaderArray.Append(narrowBuffer);
+ rawHeaderArray.AppendL(narrowBuffer);
CleanupStack::Pop(narrowBuffer);
}
aJni->DeleteLocalRef(jniString);
--- a/javacommons/gcfprotocols/https/javasrc.s60/com/nokia/mj/impl/gcf/protocol/https/HttpsPermissionImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/gcfprotocols/https/javasrc.s60/com/nokia/mj/impl/gcf/protocol/https/HttpsPermissionImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -51,7 +51,7 @@
public String toString()
{
- return "javax.microedition.io.HttpsProtocolPermission";
+ return "javax.microedition.io.Connector.https";
}
public boolean implies(Permission p)
--- a/javacommons/javacommons.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/javacommons.pro Fri Jul 09 16:35:45 2010 +0300
@@ -18,7 +18,7 @@
SUBDIRS += utils/build/javautils.pro
SUBDIRS += comms
SUBDIRS += javastorage
-SUBDIRS += fileutils/build/fileutils.pro
+SUBDIRS += fileutils/build/javafileutils.pro
SUBDIRS += security
SUBDIRS += gcfbase/build/javagcf.pro
SUBDIRS += connectionmanager/build/javaconnectionmanager.pro
--- a/javacommons/javastorage/tsrc/storageclient/build/alltests.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/javastorage/tsrc/storageclient/build/alltests.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -22,7 +22,7 @@
#include <../../../../../inc/java_stdcpp_support_for_exe.hrh>
#include <platform_paths.hrh>
-SYSTEMINCLUDE /epoc32/include
+APP_LAYER_SYSTEMINCLUDE
USERINCLUDE ../../../inc
USERINCLUDE ../../../../../tools/cpputest/include/cpputest
--- a/javacommons/security/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -9,9 +9,9 @@
disclosed to others without the prior written consent of Nokia.
-->
-<project name="javasecurity" default="deploy.generate.policies.and.certs" basedir=".">
+<project name="javasecurity" default="deploy.generate.policies" basedir=".">
<description>
- Builds OMJ security, generates the policy files in their internal format and copies the certificates and the metadata into right locations
+ Builds OMJ security and generates the policy files in their internal format
</description>
<import file="../../../build/utilities.xml"/>
@@ -32,7 +32,6 @@
<target name="init" depends="init.properties">
<property name="internal.policies.dir" location="${java.res.root}/security/policies"/>
<mkdir dir="${internal.policies.dir}"/>
- <property name="security_res_dir" location="${java.captain.datacage}/security/trustroots/device/certificates"/>
</target>
<target name="deliver.classes.to.external.tool">
@@ -48,7 +47,7 @@
</jar>
</target>
- <target name="deploy.generate.policies.and.certs" depends="init, deploy.dual, deliver.classes.to.external.tool, set.linux.certs">
+ <target name="deploy.generate.policies" depends="init, deploy.dual, deliver.classes.to.external.tool">
<java classname="com.nokia.mj.tools.security.midp.PolicyEditor"
failonerror="true">
<sysproperty key="emma.properties" value="${emma.properties}"/>
@@ -62,20 +61,10 @@
</java>
</target>
- <target name="set.linux.certs" if="target.linux">
- <copy todir="${security_res_dir}/">
- <fileset dir="../../../javatools/testcerts/" includes="*.der"/>
- </copy>
- <copy todir="${security_res_dir}/">
- <fileset dir="../../../javatools/testcerts/" includes="*.metadata"/>
- </copy>
- </target>
-
<target name="clean" depends="init">
<ant antfile="../../../build/utilities.xml" target="clean"/>
<delete dir="${internal.policies.dir}"/>
<delete file="${external.policy.editor.tool.lib}"/>
- <delete dir="${security_res_dir}"/>
</target>
--- a/javacommons/security/data/att_manufacturer.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/att_manufacturer.txt Fri Jul 09 16:35:45 2010 +0300
@@ -36,5 +36,7 @@
grant assigned {
permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
permission javax.microedition.midlet.AutoStartPermission;
}
--- a/javacommons/security/data/att_operator.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/att_operator.txt Fri Jul 09 16:35:45 2010 +0300
@@ -35,8 +35,12 @@
}
grant user "Messaging" blanket,session,oneshot,no {
- permission javax.microedition.io.Connector.sms "sms://*" "send";
- permission javax.microedition.io.Connector.mms "mms://*" "send";
+ permission javax.microedition.io.Connector.sms "sms://*" "open,send,receive";
+ permission javax.microedition.io.Connector.mms "mms://*" "open,send,receive";
+}
+
+grant user "Restricted Messaging" blanket,no {
+ permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
}
grant user "Multimedia Recording" blanket,session,oneshot,no {
@@ -52,12 +56,6 @@
permission javax.microedition.midlet.CmdLineArgsPermission;
}
-grant allowed {
- permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
- permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
- permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
-}
-
grant assigned {
permission javax.microedition.midlet.AutoStartPermission;
}
--- a/javacommons/security/data/att_trustedthirdparty.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/att_trustedthirdparty.txt Fri Jul 09 16:35:45 2010 +0300
@@ -13,8 +13,8 @@
}
grant user "Messaging" session,oneshot,no {
- permission javax.microedition.io.Connector.sms "sms://*" "send";
- permission javax.microedition.io.Connector.mms "mms://*" "send";
+ permission javax.microedition.io.Connector.sms "sms://*" "open,send,receive";
+ permission javax.microedition.io.Connector.mms "mms://*" "open,send,receive";
}
grant user "Multimedia Recording" session,oneshot,no {
@@ -25,8 +25,3 @@
grant user "Application Auto Invocation" session,oneshot,no {
permission javax.microedition.io.PushRegistryPermission "*" "staticregistration,dynamicregistration,autoinvocation";
}
-
-grant allowed {
- permission javax.microedition.io.Connector.sms "sms://*" "open,receive";
- permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
-}
--- a/javacommons/security/data/msa_trustedthirdparty.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/msa_trustedthirdparty.txt Fri Jul 09 16:35:45 2010 +0300
@@ -71,6 +71,8 @@
permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
}
-grant assigned {
+grant assigned "Location" {
permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
}
--- a/javacommons/security/data/msa_untrusted.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/msa_untrusted.txt Fri Jul 09 16:35:45 2010 +0300
@@ -60,6 +60,8 @@
permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
}
-grant assigned {
+grant assigned "Location" {
permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
}
--- a/javacommons/security/data/s60_operator.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/s60_operator.txt Fri Jul 09 16:35:45 2010 +0300
@@ -36,5 +36,7 @@
grant assigned {
permission javax.microedition.PropertyPermission "mobinfo.msisdn" "read";
permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
permission javax.microedition.midlet.AutoStartPermission;
}
--- a/javacommons/security/data/s60_trustedthirdparty.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/data/s60_trustedthirdparty.txt Fri Jul 09 16:35:45 2010 +0300
@@ -72,6 +72,9 @@
permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
}
-grant assigned {
+
+grant assigned "Location" {
permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
}
--- a/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicy.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicy.java Fri Jul 09 16:35:45 2010 +0300
@@ -132,13 +132,14 @@
int domainLength = buf[index];
index++;
protectionDomain = new String(buf, index, domainLength);
+ boolean activeSettings = true;
index+= domainLength;
int permissions = buf[index];
index++;
policyPermissions = new SecurityPolicyPermission[permissions];
for (int i=0; i<permissions; i++)
{
- policyPermissions[i] = SecurityPolicyPermission.getFromBytes(buf);
+ policyPermissions[i] = SecurityPolicyPermission.getFromBytes(buf, activeSettings);
}
}
}
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/AccessControllerImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -21,6 +21,7 @@
import java.util.Vector;
import java.security.AccessControlException;
import com.nokia.mj.impl.utils.Uid;
+import com.nokia.mj.impl.security.midp.common.PolicyBasedPermission;
import com.nokia.mj.impl.security.midp.common.PolicyBasedPermissionImpl;
import com.nokia.mj.impl.security.midp.common.UserPermission;
import com.nokia.mj.impl.security.midp.common.UserSecuritySettings;
@@ -256,7 +257,7 @@
*/
private void handleUserPermission(
Permission checkedPermission,
- UserPermission resolvedPermission,
+ PolicyBasedPermissionImpl resolvedPermission,
SecurityStorage storage)
{
UserSecuritySettings settings = resolvedPermission
@@ -300,6 +301,14 @@
new java.security.AccessControlException(
"Permission " + checkedPermission + " not allowed"));
}
+
+ // if the permission was assigned or the settings were not active,
+ // then activate the user settings
+ if (resolvedPermission.getType() != PolicyBasedPermission.USER_TYPE
+ || !settings.isActive())
+ {
+ storage.activateUserSecuritySettings(iAppUID, resolvedPermission);
+ }
// if settings have not changed, still do one check on the current
// interaction mode: if it's blanket, mark down that the prompt in
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionResolver.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/PermissionResolver.java Fri Jul 09 16:35:45 2010 +0300
@@ -203,7 +203,9 @@
// add new settings
newPermissionInstancesAndSettings.addElement(
new PermisionInstanceAndSettings(
- p.getPermissionInstance(), newSettings));
+ p.getPermissionInstance(),
+ p.getType(),
+ newSettings));
}
else
{
@@ -240,6 +242,7 @@
getResolvedPermission(
requestedPermission,
policyPermission,
+ p.getType(),
p.getSettings(),
requestedPermission.getClass().getName(),
requestedPermission.getName(),
@@ -274,6 +277,7 @@
PolicyBasedPermissionImpl permission1 =
getResolvedPermission(requestedPermission,
policyPermission,
+ p.getType(),
p.getSettings(),
requestedPermission.getClass().getName(),
requestedPermission.getName(),
@@ -307,6 +311,7 @@
// the combined actions
resolvedPermissions.setElementAt(getResolvedPermission(
permission1.getPromptDetails(),
+ p.getType(),
p.getSettings(),
requestedPermission.getClass().getName(),
requestedPermission.getName(),
@@ -358,6 +363,7 @@
(PermisionInstanceAndSettings)tmp.elementAt(0);
tmp.removeElementAt(0);
Permission permission1 = (Permission)instance1.getPermissionInstance();
+ int type = instance1.getType();
UserSecuritySettings settings1 = instance1.getSettings();
String compositeAction = "";
// put the individual actions into a vector so that the composite
@@ -423,6 +429,7 @@
getResolvedPermission(
requestedPermission,
permission1,
+ type,
settings1,
requestedPermission.getClass().getName(),
requestedPermission.getName(),
@@ -452,6 +459,7 @@
private static PolicyBasedPermissionImpl getResolvedPermission(
PermissionBase securityPromptDetails,
+ int type,
UserSecuritySettings userSettings,
String permissionName,
String targetName,
@@ -479,6 +487,7 @@
permissionName,
targetName,
actionList,
+ type,
userSettings,
securityPromptDetails2);
}
@@ -486,6 +495,7 @@
private static PolicyBasedPermissionImpl getResolvedPermission(
Permission requestedPermission,
Object policyPermission,
+ int type,
UserSecuritySettings userSettings,
String permissionName,
String targetName,
@@ -514,6 +524,7 @@
permissionName,
targetName,
actionList,
+ type,
userSettings,
securityPromptDetails);
}
@@ -545,7 +556,8 @@
policyPermissions[i].getActionList());
policyPermissionInstancesAndSettings.addElement(
new PermisionInstanceAndSettings(p,
- policyPermissions[i].getUserSecuritySettings()));
+ policyPermissions[i].getType(),
+ policyPermissions[i].getUserSecuritySettings()));
}
catch (InstantiationException e)
{
@@ -590,7 +602,8 @@
grantedPermission.getActionList());
grantedPermissionInstancesAndSettings.addElement(
new PermisionInstanceAndSettings(p,
- grantedPermission.getUserSecuritySettings()));
+ grantedPermission.getType(),
+ grantedPermission.getUserSecuritySettings()));
}
catch (InstantiationException e)
{
@@ -703,11 +716,13 @@
private static class PermisionInstanceAndSettings
{
private Object permissionObject;
+ private int type;
private UserSecuritySettings settings;
- public PermisionInstanceAndSettings(Object permissionObject, UserSecuritySettings settings)
+ public PermisionInstanceAndSettings(Object permissionObject, int type, UserSecuritySettings settings)
{
this.permissionObject = permissionObject;
+ this.type = type;
this.settings = settings;
}
@@ -720,5 +735,10 @@
{
return settings;
}
+
+ public int getType()
+ {
+ return type;
+ }
}
}
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java Fri Jul 09 16:35:45 2010 +0300
@@ -23,6 +23,7 @@
import com.nokia.mj.impl.security.midp.common.UserPermission;
import com.nokia.mj.impl.security.common.PermissionBase;
import com.nokia.mj.impl.security.utils.SecurityPromptMessage;
+import com.nokia.mj.impl.security.utils.Logger;
import com.nokia.mj.impl.rt.ui.RuntimeUiFactory;
import com.nokia.mj.impl.rt.ui.RuntimeUi;
import com.nokia.mj.impl.rt.ui.ConfirmData;
@@ -171,6 +172,12 @@
.getSecurityPromptQuestion(currentInteractionMode);
break;
}
+ if (promptText == null)
+ {
+ // no text to show -> hande it as deny
+ Logger.logWarning("User permission was denied by platform since it did not provide any security prompt question " + userPermission);
+ return handleDenyAnswer(settings);
+ }
// check if the two texts are equal
if ((mostPowerfulInteractionModeText != null
&& mostPowerfulInteractionModeText.equalsIgnoreCase(
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/NetworkRestrictionsAttribute.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/NetworkRestrictionsAttribute.java Fri Jul 09 16:35:45 2010 +0300
@@ -25,9 +25,8 @@
/**
* Specifies the allowed MCC (3 digits) and MNC (2 or 3 digits) tuples,
- * separated by a hyphen (Unicode U+002D), to limit the execution to certain
- * networks for any MIDlets within a MIDlet suite bound to the Operator
- * Protection Domain
+ * separated by a space. The tuples are used to limit the execution of
+ * Operator signed MIDlets
*/
public class NetworkRestrictionsAttribute
{
@@ -35,7 +34,7 @@
* The JAR attribute holding the network restriction info
*/
public static final String ATTRIBUTE_NAME
- = "MIDlet-Operator-Allowed";
+ = "Nokia-MIDlet-Operator-Allowed";
/* The network restrictions contained in the attribute */
private NetworkRestriction[] restrictions;
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java Fri Jul 09 16:35:45 2010 +0300
@@ -194,7 +194,6 @@
PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.Connector.vtag", new MIDPPermission(
"com.nokia.mj.impl.ccapi.utils.ContactlessCommunicationPermission", "vtag://*", "open"));
- // add name of MIDP3 class permissions
PERMISSION_MAPPING_TABLE.put(
"javax.microedition.io.SocketProtocolPermission", new MIDPPermission(
"com.nokia.mj.impl.gcf.protocol.socket.SocketPermissionImpl", "socket://*"));
@@ -229,6 +228,9 @@
"javax.microedition.midlet.AutoStartPermission", new MIDPPermission(
"com.nokia.mj.impl.installer.utils.AutoStartPermission", null));
PERMISSION_MAPPING_TABLE.put(
+ "AutoStartPermission", new MIDPPermission(
+ "com.nokia.mj.impl.installer.utils.AutoStartPermission", null));
+ PERMISSION_MAPPING_TABLE.put(
"javax.microedition.midlet.CmdLineArgsPermission", new MIDPPermission(
"com.nokia.mj.impl.rt.utils.CmdLineArgsPermission", null));
PERMISSION_MAPPING_TABLE.put(
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java Fri Jul 09 16:35:45 2010 +0300
@@ -314,12 +314,13 @@
StorageNames.NAME);
String actionList = getStorageAttributeValue(permEntries[i],
StorageNames.ACTION);
- String fgName = getStorageAttributeValue(permEntries[i],
- StorageNames.FUNCTION_GROUP);
- if (fgName != null)
+ FunctionGroup fg = decodeFunctionGroup(
+ getStorageAttributeValue(permEntries[i],
+ StorageNames.FUNCTION_GROUP));
+ if (fg != null)
{
UserSecuritySettings cachedSettings =
- (UserSecuritySettings)fGroups.get(fgName);
+ (UserSecuritySettings)fGroups.get(fg.name);
if (cachedSettings != null)
{
permissions.addElement(
@@ -327,6 +328,7 @@
className,
target,
actionList,
+ fg.type,
cachedSettings));
}
else
@@ -338,7 +340,7 @@
appUID.getStringValue()));
fgQuery.addAttribute(new StorageAttribute(
StorageNames.FUNCTION_GROUP,
- fgName));
+ fg.name));
fgQuery.addAttribute(new StorageAttribute(
StorageNames.ALLOWED_SETTINGS,
""));
@@ -364,17 +366,19 @@
String blanketPrompt = getStorageAttributeValue(fgEntries[0],
StorageNames.BLANKET_PROMPT);
UserSecuritySettings settings = new UserSecuritySettingsImpl(
- fgName,
+ fg.name,
currentSetting,
decodeAllowedSettings(allowedSettings),
- ("1".equals(blanketPrompt) ? true : false));
+ ("1".equals(blanketPrompt) ? true : false),
+ fg.isActive);
permissions.addElement(
new PolicyBasedPermissionImpl(
className,
target,
actionList,
+ fg.type,
settings));
- fGroups.put(fgName, settings);
+ fGroups.put(fg.name, settings);
}
catch (NumberFormatException e)
{
@@ -394,7 +398,10 @@
null));
}
// cleanup the query, so it can be used at the next interation
- query.removeAttribute(fgName);
+ if (fg != null)
+ {
+ query.removeAttribute(fg.name);
+ }
}
}
// add the non user permissions into the set of returned permissions
@@ -483,7 +490,33 @@
StorageAttribute fgAttribute = new StorageAttribute(
StorageNames.FUNCTION_GROUP,
fgName);
- permEntry.addAttribute(fgAttribute);
+ if (p.getType() == PolicyBasedPermission.USER_ASSIGNED_TYPE
+ || !settings.isActive())
+ {
+ // the inactive settings or the settings of assigned
+ // permissions with user settings should be activated
+ // only after the first usage of the permission.
+ // Otherwise it creates confusion for the user,
+ // like in the following use cases:
+ // 1) the installation time dialog would include the assigned
+ // permissions even though the MIDlet did not request it
+ // 2) after installing a MIDlet suite and before accessing
+ // some protected functionality (which is guarder by
+ // assigned permission with user setting) the user sees
+ // the settings of the permissions in the MIDlet settings
+ // (even though the MIDlet might never access such
+ // functionality)
+ //
+ // disabling the settings = alter the name of the function
+ // group stored in PERMISSIONS table
+ permEntry.addAttribute(new StorageAttribute(
+ StorageNames.FUNCTION_GROUP,
+ encodeFunctionGroup(p.getType(),fgName)));
+ }
+ else
+ {
+ permEntry.addAttribute(fgAttribute);
+ }
// Do we need to check if the settings which already exist
// are equal to the ones which are to be inserted?
// This won't even happen, since all the settings are read
@@ -722,6 +755,10 @@
validCerts));
}
int securityWarningsMode = data.getSecurityWarningsMode();
+ if (update)
+ {
+ securityWarningsMode = readSecurityWarningsMode(appUID);
+ }
if (securityWarningsMode == GeneralSecuritySettings.DEFAULT_SECURITY_MODE
|| securityWarningsMode == GeneralSecuritySettings.USER_SECURITY_MODE)
{
@@ -1014,6 +1051,42 @@
}
}
}
+
+ /**
+ * Activates user security settings
+ *
+ * @param appUID the UID of the application whose user
+ settings are activatesversion is read
+ * @param settingsName the name of permission whose settings
+ * which are activated
+ */
+ public void activateUserSecuritySettings(
+ Uid msUID,
+ PolicyBasedPermission permission)
+ {
+ if (permission.getUserSecuritySettings() == null)
+ {
+ return;
+ }
+ StorageEntry oldEntry = new StorageEntry();
+ oldEntry.addAttribute(new StorageAttribute(
+ StorageAttribute.ID,
+ msUID.getStringValue()));
+ oldEntry.addAttribute(new StorageAttribute(
+ StorageNames.FUNCTION_GROUP,
+ encodeFunctionGroup(permission.getType(),
+ permission.getUserSecuritySettings().getName())));
+ StorageEntry newEntry = new StorageEntry();
+ newEntry.addAttribute(new StorageAttribute(
+ StorageAttribute.ID,
+ msUID.getStringValue()));
+ newEntry.addAttribute(new StorageAttribute(
+ StorageNames.FUNCTION_GROUP,
+ permission.getUserSecuritySettings().getName()));
+ doStorageUpdate(StorageNames.MIDP_PERMISSIONS_TABLE,
+ newEntry,
+ oldEntry);
+ }
/**
* Reads the value of the suite version attribute
@@ -1083,7 +1156,7 @@
appUID.getStringValue()));
query.addAttribute(new StorageAttribute(
StorageNames.NAME,
- "MIDlet-Operator-Allowed"));
+ "Nokia-MIDlet-Operator-Allowed"));
query.addAttribute(new StorageAttribute(
StorageNames.VALUE,
""));
@@ -1213,16 +1286,24 @@
if (oldSettings != null
&& newSettings != null)
{
+ boolean activeSettings = false;
+ if (oldSettings.isActive()
+ || newSettings.isActive())
+ {
+ activeSettings = true;
+ }
newGrantedPermissions.addElement(
new PolicyBasedPermissionImpl(
p.getName(),
p.getTarget(),
p.getActionList(),
+ p.getType(),
new UserSecuritySettingsImpl(
newSettings.getName(),
oldSettings.getCurrentInteractionMode(),
newSettings.getAllowedInteractionModes(),
- oldSettings.getBlanketPrompt())));
+ oldSettings.getBlanketPrompt(),
+ activeSettings)));
}
else
{
@@ -1792,4 +1873,46 @@
}
return NOT_FOUND;
}
+
+ private String encodeFunctionGroup(int type, String name)
+ {
+ return (type + ";" + name);
+ }
+
+ private FunctionGroup decodeFunctionGroup(String fg)
+ {
+ boolean isActive = true;
+ if (fg != null)
+ {
+ int sepIndex = fg.indexOf(";");
+ int type = PolicyBasedPermission.USER_TYPE;
+ if (sepIndex != -1)
+ {
+ isActive = false;
+ try
+ {
+ type = Integer.valueOf(
+ fg.substring(0, sepIndex)).intValue();
+ }
+ catch (NumberFormatException e)
+ {
+ }
+ }
+ return new FunctionGroup(type, fg.substring(sepIndex + 1), isActive);
+ }
+ return null;
+ }
+
+ private class FunctionGroup
+ {
+ FunctionGroup(int type, String name, boolean isActive)
+ {
+ this.type = type;
+ this.name = name;
+ this.isActive = isActive;
+ }
+ private boolean isActive;
+ private int type;
+ private String name;
+ }
}
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityDetailedErrorMessage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityDetailedErrorMessage.java Fri Jul 09 16:35:45 2010 +0300
@@ -57,16 +57,32 @@
return iMessageTable;
}
Hashtable messageTable = new Hashtable();
- messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered_details");
- messageTable.put(new Integer(CERT_DISABLED), "cert_disabled");
- messageTable.put(new Integer(CERT_DELETED), "cert_deleted");
- messageTable.put(new Integer(SIM_CHANGED), "sim_changed");
- messageTable.put(new Integer(UNIDENTIFIED_APPLICATION), "unidentified_application");
- messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation_details");
- messageTable.put(new Integer(OCSP_GENERAL_ERR), "ocsp_general_details");
- messageTable.put(new Integer(OCSP_SETTINGS_ERR), "ocsp_settings");
- messageTable.put(new Integer(OCSP_REVOKED_ERR), "ocsp_revoked");
- messageTable.put(new Integer(JAR_NOT_FOUND), "jar_not_found_details");
+ if (getLocaleIdQt() == null)
+ {
+ messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered_details");
+ messageTable.put(new Integer(CERT_DISABLED), "cert_disabled");
+ messageTable.put(new Integer(CERT_DELETED), "cert_deleted");
+ messageTable.put(new Integer(SIM_CHANGED), "sim_changed");
+ messageTable.put(new Integer(UNIDENTIFIED_APPLICATION), "unidentified_application");
+ messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation_details");
+ messageTable.put(new Integer(OCSP_GENERAL_ERR), "ocsp_general_details");
+ messageTable.put(new Integer(OCSP_SETTINGS_ERR), "ocsp_settings");
+ messageTable.put(new Integer(OCSP_REVOKED_ERR), "ocsp_revoked");
+ messageTable.put(new Integer(JAR_NOT_FOUND), "jar_not_found_details");
+ }
+ else
+ {
+ messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered_details");
+ messageTable.put(new Integer(CERT_DISABLED), "cert_disabled");
+ messageTable.put(new Integer(CERT_DELETED), "cert_deleted");
+ messageTable.put(new Integer(SIM_CHANGED), "sim_changed");
+ messageTable.put(new Integer(UNIDENTIFIED_APPLICATION), "unidentified_application");
+ messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation_details");
+ messageTable.put(new Integer(OCSP_GENERAL_ERR), "error_ocsp_general_details");
+ messageTable.put(new Integer(OCSP_SETTINGS_ERR), "error_ocsp_settings");
+ messageTable.put(new Integer(OCSP_REVOKED_ERR), "error_ocsp_revoked");
+ messageTable.put(new Integer(JAR_NOT_FOUND), "jar_not_found_details");
+ }
iMessageTable = messageTable;
return iMessageTable;
}
@@ -80,11 +96,37 @@
{
if (iRes == null)
{
- iRes = ResourceLoader.getInstance("javausermessages", "qtn_java_secur_error_");
+ if (getLocaleIdQt() == null)
+ {
+ iRes = ResourceLoader.getInstance(
+ "javausermessages", "qtn_java_secur_error_");
+ }
}
return iRes;
}
+ /**
+ * Method for retrieving the ResourceLoader instance that is used
+ * to localise error message for specified error code.
+ *
+ * @param errorCode error code for which ResourceLoader is returned
+ */
+ protected ResourceLoader getResourceLoader(int errorCode)
+ {
+ String resFilename = "javaapplicationsecuritymessages";
+ String resPrefix = "txt_java_secur_info_";
+ switch (errorCode)
+ {
+ case OCSP_GENERAL_ERR:
+ case OCSP_SETTINGS_ERR:
+ case OCSP_REVOKED_ERR:
+ resFilename = "javaapplicationinstaller";
+ resPrefix = "txt_java_secur_info_";
+ break;
+ }
+ return getResourceLoader(resFilename, resPrefix);
+ }
+
/*** ----------------------------- PACKAGE ---------------------------- */
/*** ----------------------------- PRIVATE ---------------------------- */
/*** ----------------------------- NATIVE ----------------------------- */
--- a/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityErrorMessage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityErrorMessage.java Fri Jul 09 16:35:45 2010 +0300
@@ -49,12 +49,24 @@
return iMessageTable;
}
Hashtable messageTable = new Hashtable();
- messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered");
- messageTable.put(new Integer(CERT_NOT_AVAILABLE), "cert_not_available");
- messageTable.put(new Integer(UNEXPECTED_ERR), "unexpected_err");
- messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation");
- messageTable.put(new Integer(OCSP_GENERAL_ERR), "ocsp_general");
- messageTable.put(new Integer(JAR_NOT_FOUND), "jar_not_found");
+ if (getLocaleIdQt() == null)
+ {
+ messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered");
+ messageTable.put(new Integer(CERT_NOT_AVAILABLE), "cert_not_available");
+ messageTable.put(new Integer(UNEXPECTED_ERR), "unexpected_err");
+ messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation");
+ messageTable.put(new Integer(OCSP_GENERAL_ERR), "ocsp_general");
+ messageTable.put(new Integer(JAR_NOT_FOUND), "jar_not_found");
+ }
+ else
+ {
+ messageTable.put(new Integer(JAR_TAMPERED), "jar_tampered");
+ messageTable.put(new Integer(CERT_NOT_AVAILABLE), "cert_not_available");
+ messageTable.put(new Integer(UNEXPECTED_ERR), "unexpected_error");
+ messageTable.put(new Integer(NETWORK_RESTRICTION_VIOLATION), "net_restr_violation");
+ messageTable.put(new Integer(OCSP_GENERAL_ERR), "there_is_a_security_issue_with_this");
+ messageTable.put(new Integer(JAR_NOT_FOUND), "error_jar_not_found");
+ }
iMessageTable = messageTable;
return iMessageTable;
}
@@ -68,11 +80,39 @@
{
if (iRes == null)
{
- iRes = ResourceLoader.getInstance("javausermessages", "qtn_java_secur_error_");
+ // This method returns ResourceLoader only when Qt
+ // localisation is not in use. When Qt localisation
+ // is in use this method returns null and
+ // ResourceLoader is obtained with getResourceLoader(int)
+ // method variant.
+ if (getLocaleIdQt() == null)
+ {
+ iRes = ResourceLoader.getInstance("javausermessages", "qtn_java_secur_error_");
+ }
}
return iRes;
}
+ /**
+ * Method for retrieving the ResourceLoader instance that is used
+ * to localise error message for specified error code.
+ *
+ * @param errorCode error code for which ResourceLoader is returned
+ */
+ protected ResourceLoader getResourceLoader(int errorCode)
+ {
+ String resFilename = "javaapplicationsecuritymessages";
+ String resPrefix = "txt_java_secur_info_";
+ switch (errorCode)
+ {
+ case OCSP_GENERAL_ERR:
+ resFilename = "common_errors";
+ resPrefix = "txt_error_info_";
+ break;
+ }
+ return getResourceLoader(resFilename, resPrefix);
+ }
+
/*** ----------------------------- PACKAGE ---------------------------- */
/*** ----------------------------- PRIVATE ---------------------------- */
/*** ----------------------------- NATIVE ----------------------------- */
--- a/javacommons/security/javaunicertstoreplugin/src.s60/200213A3.rss Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/200213A3.rss Fri Jul 09 16:35:45 2010 +0300
@@ -18,7 +18,7 @@
// INCLUDES
-#include <registryinfov2.rh>
+#include <ecom/registryinfov2.rh>
#include <ct/interfaceuid.hrh>
// Some defines of useful values for attributes to simplify
--- a/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -175,7 +175,7 @@
case EPreDeleting:
SendDeleteMsg(status);
return;
-
+
default:
//Do nothing.
break;
@@ -250,7 +250,7 @@
User::RequestComplete(pRequestStatus,KErrArgument);
return;
}
-
+
mState = EPreDeleting;
mTempCertData = certData;
HandleDeleteDisableQuery(aStatus, false /* disableCertQuery */);
@@ -489,12 +489,13 @@
return;
}
+ TInt err = KErrNone;
if (!certData->mIsDisabled)
{
- aApplications.Append(KMidletInstallApplicabilityUid);
+ err = aApplications.Append(KMidletInstallApplicabilityUid);
}
- User::RequestComplete(pRequestStatus,KErrNone);
+ User::RequestComplete(pRequestStatus, err);
}
/**
@@ -835,7 +836,7 @@
User::RequestComplete(aRequestStatus,KErrCommsBreak);
return EFalse;
}
-
+
return ETrue;
}
@@ -971,7 +972,7 @@
//operation in the error situation.
return;
}
- aCertDataObj.mDeleted = ETrue;
+ aCertDataObj.mDeleted = ETrue;
User::RequestComplete(aRequestStatus,KErrNone);
}
--- a/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -61,9 +61,9 @@
}
-void CBlanketPermissionPolicy::Add(const CBlanketPermissionPolicyElement *aElement)
+void CBlanketPermissionPolicy::AddL(const CBlanketPermissionPolicyElement *aElement)
{
- iPolicyElements.Append(aElement);
+ iPolicyElements.AppendL(aElement);
}
--- a/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.h Fri Jul 09 16:35:45 2010 +0300
@@ -49,7 +49,7 @@
static CBlanketPermissionPolicy* NewL();
- void Add(const CBlanketPermissionPolicyElement *);
+ void AddL(const CBlanketPermissionPolicyElement *);
// MBlanketPermissionPolicy
virtual TInt GetPolicyElementCount() const ;
--- a/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/SimpleMapping.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/SimpleMapping.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -61,7 +61,7 @@
for (TInt i = 0; i < count; i++)
{
- iMapping.Append(aMapping[i]);
+ iMapping.AppendL(aMapping[i]);
}
}
--- a/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/XPFParser.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/XPFParser.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -385,8 +385,8 @@
//Add the sets and permission downgrade policy to the
//CBlanketPermissionPolicy object for this domain
+ aBlanketPermissionPolicy->AddL(pe);
CleanupStack::Pop(pe);
- aBlanketPermissionPolicy->Add(pe);
DEBUG("CXPFParser::ExclusionSetL() - Exit");
}
--- a/javacommons/security/legacysupport/midp2userpreferences/src/MIDP2UserPreferences.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/midp2userpreferences/src/MIDP2UserPreferences.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -22,8 +22,8 @@
#include "UserPreferencesIterator.h"
#include "MIDletSuiteUserPreferences.h"
#include "MIDletSuiteCustomAttributes.h"
-#include <MUserSecurityPreferencesTable.h>
-#include <MSecurityPolicyV2.h>
+#include "MUserSecurityPreferencesTable.h"
+#include "j2me/midp2/security/MSecurityPolicyV2.h"
#include "SecurityPreferences.h"
#include "javauid.h"
--- a/javacommons/security/legacysupport/tsrc/build/securitylegacysupportunittests.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/tsrc/build/securitylegacysupportunittests.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -22,11 +22,6 @@
#include <../../../../../inc/java_stdcpp_support_for_exe.hrh>
#include <platform_paths.hrh>
-SYSTEMINCLUDE /epoc32/include
-SYSTEMINCLUDE ../../../../../inc/j2me/midp2/security
-SYSTEMINCLUDE ../../../../../inc/j2me/midp2/data
-SYSTEMINCLUDE ../../../../../inc/j2me/midp2/runtime
-
USERINCLUDE ../../../../../tools/cpputest/include/cpputest
USERINCLUDE ../../../../../tools/cpputest/include/platforms/symbian
USERINCLUDE ../../../../../inc
--- a/javacommons/security/legacysupport/tsrc/src/testsecuritypolicy.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/legacysupport/tsrc/src/testsecuritypolicy.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -20,7 +20,7 @@
#include "TestHarness.h"
-#include <msecuritypolicyv2.h>
+#include "j2me/midp2/security/msecuritypolicyv2.h"
using namespace MIDP;
--- a/javacommons/security/tsrc/data/javasrc/invalidjars/ImplementProtectedInterface/myClass.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/javasrc/invalidjars/ImplementProtectedInterface/myClass.java Fri Jul 09 16:35:45 2010 +0300
@@ -32,6 +32,11 @@
return null;
}
+ public boolean isActive()
+ {
+ return true;
+ }
+
public int getCurrentInteractionMode()
{
return 0;
--- a/javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt Fri Jul 09 16:35:45 2010 +0300
@@ -72,3 +72,9 @@
permission javax.microedition.io.Connector.mms "mms://*" "open,receive";
permission javax.microedition.io.Connector.cbs "cbs://*" "open,receive";
}
+
+grant assigned "Location" {
+ permission javax.microedition.PropertyPermission "mobinfo.cellid" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.countrycode" "read";
+ permission javax.microedition.PropertyPermission "mobinfo.networkid" "read";
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/tsrc/data/validpolicies/assigned_settings_only.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,4 @@
+domain operator;
+grant assigned "Settings" oneshot {
+ permission assigned.permission.invalid.settings;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/tsrc/data/validpolicies/assigned_settings_orphaned.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,4 @@
+domain operator;
+grant assigned "Settings" {
+ permission assigned.permission.orphaned;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/tsrc/data/validpolicies/validators/assigned_and_user_settings.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,3 @@
+domain=mydomain
+user_assigned?Settings:blanket:no?assigned.user.permission
+user?Settings:blanket:no?user.permission
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/tsrc/data/validpolicies/validators/assigned_settings_only.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,2 @@
+domain=operator
+user_assigned?Settings:oneshot:no?assigned.permission.invalid.settings
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javacommons/security/tsrc/data/validpolicies/validators/assigned_settings_orphaned.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,2 @@
+domain=operator
+assigned?assigned.permission.orphaned
--- a/javacommons/security/tsrc/data/validpolicies/validators/domain_without_end_separator.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/validpolicies/validators/domain_without_end_separator.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,2 +1,2 @@
domain=operator
-allowed,javax.microedition.midlet.AutoStartPermission
+allowed?javax.microedition.midlet.AutoStartPermission
--- a/javacommons/security/tsrc/data/validpolicies/validators/ignore_interaction_modes_for_allowed_group.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/validpolicies/validators/ignore_interaction_modes_for_allowed_group.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,3 +1,3 @@
domain=Manufacturer
-allowed,javax.microedition.io.HttpProtocolPermission,http://*
+allowed?javax.microedition.io.HttpProtocolPermission,http://*
--- a/javacommons/security/tsrc/data/validpolicies/validators/manufacturer_like_policy.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/validpolicies/validators/manufacturer_like_policy.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,23 +1,23 @@
domain=Manufacturer
-allowed,javax.microedition.io.HttpProtocolPermission,http://*
-allowed,javax.microedition.io.HttpsProtocolPermission,https://*
-allowed,javax.microedition.io.DatagramProtocolPermission,datagram://*
-allowed,javax.microedition.io.DatagramProtocolPermission,datagram://
-allowed,javax.microedition.io.SocketProtocolPermission,socket://*
-allowed,javax.microedition.io.SocketProtocolPermission,socket://
-allowed,javax.microedition.io.SSLProtocolPermission,ssl://*
-allowed,javax.microedition.io.PushRegistryPermission,*
-allowed,javax.microedition.io.CommProtocolPermission,comm:*
-allowed,javax.microedition.media.PlayerPermission,*,record
-allowed,javax.microedition.media.PlayerPermission,*,snapshot
-allowed,java.util.PropertyPermission,*,read
-allowed,javax.microedition.event.EventPermission,*,read
-allowed,javax.microedition.event.EventPermission,*,register
-allowed,javax.microedition.event.EventPermission,*,post
-allowed,javax.microedition.midlet.ActionsDeniedPermission
-allowed,javax.microedition.midlet.AutoStartPermission
-assigned,java.util.PropertyPermission,microedition.*,read
-assigned,javax.microedition.event.EventPermission,*.*,read
-assigned,javax.microedition.event.EventPermission,*.*,register
-assigned,javax.microedition.event.EventPermission,*.*,post
+allowed?javax.microedition.io.HttpProtocolPermission,http://*
+allowed?javax.microedition.io.HttpsProtocolPermission,https://*
+allowed?javax.microedition.io.DatagramProtocolPermission,datagram://*
+allowed?javax.microedition.io.DatagramProtocolPermission,datagram://
+allowed?javax.microedition.io.SocketProtocolPermission,socket://*
+allowed?javax.microedition.io.SocketProtocolPermission,socket://
+allowed?javax.microedition.io.SSLProtocolPermission,ssl://*
+allowed?javax.microedition.io.PushRegistryPermission,*
+allowed?javax.microedition.io.CommProtocolPermission,comm:*
+allowed?javax.microedition.media.PlayerPermission,*,record
+allowed?javax.microedition.media.PlayerPermission,*,snapshot
+allowed?java.util.PropertyPermission,*,read
+allowed?javax.microedition.event.EventPermission,*,read
+allowed?javax.microedition.event.EventPermission,*,register
+allowed?javax.microedition.event.EventPermission,*,post
+allowed?javax.microedition.midlet.ActionsDeniedPermission
+allowed?javax.microedition.midlet.AutoStartPermission
+assigned?java.util.PropertyPermission,microedition.*,read
+assigned?javax.microedition.event.EventPermission,*.*,read
+assigned?javax.microedition.event.EventPermission,*.*,register
+assigned?javax.microedition.event.EventPermission,*.*,post
--- a/javacommons/security/tsrc/data/validpolicies/validators/permission_without_end_terminator.txt Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/data/validpolicies/validators/permission_without_end_terminator.txt Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
domain=operator
-allowed,javax.microedition.midlet.AutoStartPermission
-allowed,javax.microedition.midlet.OtherAutoStartPermission
+allowed?javax.microedition.midlet.AutoStartPermission
+allowed?javax.microedition.midlet.OtherAutoStartPermission
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/OMJSecurityTests.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/OMJSecurityTests.java Fri Jul 09 16:35:45 2010 +0300
@@ -740,7 +740,27 @@
UserSecuritySettings.SESSION_INTERACTION_MODE})),
new PolicyBasedPermissionImpl("java.util.PropertyPermission", "microedition.*", "read", null),
new PolicyBasedPermissionImpl(p4.getName(), "mobinfo.publicinfo", "read", null),
- new PolicyBasedPermissionImpl(p4.getName(), "mobinfo.cellid", "read", null),
+ new PolicyBasedPermissionImpl(p4.getName(), "mobinfo.cellid", "read",
+ new UserSecuritySettingsImpl("Location",
+ UserSecuritySettings.SESSION_INTERACTION_MODE,
+ new int[]{UserSecuritySettings.BLANKET_INTERACTION_MODE,
+ UserSecuritySettings.NO_INTERACTION_MODE,
+ UserSecuritySettings.ONESHOT_INTERACTION_MODE,
+ UserSecuritySettings.SESSION_INTERACTION_MODE})),
+ new PolicyBasedPermissionImpl(p4.getName(), "mobinfo.countrycode", "read",
+ new UserSecuritySettingsImpl("Location",
+ UserSecuritySettings.SESSION_INTERACTION_MODE,
+ new int[]{UserSecuritySettings.BLANKET_INTERACTION_MODE,
+ UserSecuritySettings.NO_INTERACTION_MODE,
+ UserSecuritySettings.ONESHOT_INTERACTION_MODE,
+ UserSecuritySettings.SESSION_INTERACTION_MODE})),
+ new PolicyBasedPermissionImpl(p4.getName(), "mobinfo.networkid", "read",
+ new UserSecuritySettingsImpl("Location",
+ UserSecuritySettings.SESSION_INTERACTION_MODE,
+ new int[]{UserSecuritySettings.BLANKET_INTERACTION_MODE,
+ UserSecuritySettings.NO_INTERACTION_MODE,
+ UserSecuritySettings.ONESHOT_INTERACTION_MODE,
+ UserSecuritySettings.SESSION_INTERACTION_MODE})),
new PolicyBasedPermissionImpl("com.nokia.ext2.internal.Ext2Perm", "ext2.target4", "ext2.action4", null),
}));
// getBlanketPermissions: while installing V1 the permissions are not put to blanket, while installing V2 there are some blanket permissions returned
@@ -779,6 +799,8 @@
StorageNames.VALUE,
"MIICWDCCAcECBEhQwOgwDQYJKoZIhvcNAQEEBQAwczELMAkGA1UEBhMCZmkxEjAQBgNVBAgTCVBpcmthbm1hYTEQMA4GA1UEBxMHVGFtcGVyZTEOMAwGA1UEChMFTm9raWExDTALBgNVBAsTBEphdmExHzAdBgNVBAMMFkpQX1RoaXJkX1BhcnR5X1RydXN0ZWQwHhcNMDgwNjEyMDYyMzM2WhcNMTgwNjEwMDYyMzM2WjBzMQswCQYDVQQGEwJmaTESMBAGA1UECBMJUGlya2FubWFhMRAwDgYDVQQHEwdUYW1wZXJlMQ4wDAYDVQQKEwVOb2tpYTENMAsGA1UECxMESmF2YTEfMB0GA1UEAwwWSlBfVGhpcmRfUGFydHlfVHJ1c3RlZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArAesh03rswICRUjexWMoIH9ZZqUtlx+tfhZhuzuYhiL6cLdhxNlU8yuIdw4f17XP3yxVIB8rz1EEagCMd0Y5ZleNFZ992ReLcf9VH13RxaZ88PRxBLLROm1jcwTknYSS6AxGMup77DMwwFSN8XPnOHWt4aLGUrecMeUyI2c5UbsCAwEAATANBgkqhkiG9w0BAQQFAAOBgQAylJ+3aSq6a7AAL7UM8V8JhGZlLneErF7A/BJGDi7Vmr5gmlGyf6RCJJIg4qCp+J3Tv3eCRNNuphQaSRdFpaulwCmtfCzSZNtvZg0VhMOVsZqTwQgmP6NzKoIbqqzlgm5U+yUJw8FmX17vgdeSEdJ/oL/WT4AKrWFJYl8MdQ9ZnQ=="));
session.write(StorageNames.APPLICATION_PACKAGE_ATTRIBUTES_TABLE, appPackageEntry);
+ permissionGranter.cleanup();
+ PermissionResolver.testClearCache();
allAttributes.clear();
allAttributes.put(MIDP_PROFILE_ATTRIBUTE_NAME,new Attribute("",MIDP2));
allAttributes.put(AuthenticationAttribute.MAIN_ATTRIBUTE_PREFIX + "1-1", new Attribute("", "MIICWDCCAcECBEhQwOgwDQYJKoZIhvcNAQEEBQAwczELMAkGA1UEBhMCZmkxEjAQBgNVBAgTCVBpcmthbm1hYTEQMA4GA1UEBxMHVGFtcGVyZTEOMAwGA1UEChMFTm9raWExDTALBgNVBAsTBEphdmExHzAdBgNVBAMMFkpQX1RoaXJkX1BhcnR5X1RydXN0ZWQwHhcNMDgwNjEyMDYyMzM2WhcNMTgwNjEwMDYyMzM2WjBzMQswCQYDVQQGEwJmaTESMBAGA1UECBMJUGlya2FubWFhMRAwDgYDVQQHEwdUYW1wZXJlMQ4wDAYDVQQKEwVOb2tpYTENMAsGA1UECxMESmF2YTEfMB0GA1UEAwwWSlBfVGhpcmRfUGFydHlfVHJ1c3RlZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArAesh03rswICRUjexWMoIH9ZZqUtlx+tfhZhuzuYhiL6cLdhxNlU8yuIdw4f17XP3yxVIB8rz1EEagCMd0Y5ZleNFZ992ReLcf9VH13RxaZ88PRxBLLROm1jcwTknYSS6AxGMup77DMwwFSN8XPnOHWt4aLGUrecMeUyI2c5UbsCAwEAATANBgkqhkiG9w0BAQQFAAOBgQAylJ+3aSq6a7AAL7UM8V8JhGZlLneErF7A/BJGDi7Vmr5gmlGyf6RCJJIg4qCp+J3Tv3eCRNNuphQaSRdFpaulwCmtfCzSZNtvZg0VhMOVsZqTwQgmP6NzKoIbqqzlgm5U+yUJw8FmX17vgdeSEdJ/oL/WT4AKrWFJYl8MdQ9ZnQ=="));
--- a/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java Fri Jul 09 16:35:45 2010 +0300
@@ -1046,8 +1046,8 @@
}
catch (RuntimeSecurityException e)
{
- assertTrue(e.getShortMessage().equals(securityErrorMessage.get(SecurityErrorMessage.JAR_TAMPERED, null))
- && e.getDetailedMessage().equals(securityDetailedErrorMessage.get(SecurityDetailedErrorMessage.JAR_TAMPERED, null)));
+ assertTrue(e.getShortMessage().equals(securityErrorMessage.get(SecurityErrorMessage.JAR_NOT_FOUND, null))
+ && e.getDetailedMessage().equals(securityDetailedErrorMessage.get(SecurityDetailedErrorMessage.JAR_NOT_FOUND, null)));
}
// root not enabled
try
@@ -1105,7 +1105,7 @@
appUID.getStringValue()));
entry.addAttribute(new StorageAttribute(
StorageNames.NAME,
- "MIDlet-Operator-Allowed"));
+ "Nokia-MIDlet-Operator-Allowed"));
entry.addAttribute(new StorageAttribute(
StorageNames.VALUE,
"123-45 456-789 000-000"));
@@ -1126,7 +1126,7 @@
appUID.getStringValue()));
entry.addAttribute(new StorageAttribute(
StorageNames.NAME,
- "MIDlet-Operator-Allowed"));
+ "Nokia-MIDlet-Operator-Allowed"));
entry.addAttribute(new StorageAttribute(
StorageNames.VALUE,
"123-45"));
@@ -1147,7 +1147,7 @@
appUID.getStringValue()));
entry.addAttribute(new StorageAttribute(
StorageNames.NAME,
- "MIDlet-Operator-Allowed"));
+ "Nokia-MIDlet-Operator-Allowed"));
entry.addAttribute(new StorageAttribute(
StorageNames.VALUE,
"123-45"));
--- a/javacommons/utils/inc/logger.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/utils/inc/logger.h Fri Jul 09 16:35:45 2010 +0300
@@ -116,6 +116,7 @@
EJavaAppMngrPlugin, // =35
EJavaBroadcast, // =36
EJavaAMMS, // =37
+ EJavaSettings, // =38
// add id of new components here
};
@@ -173,6 +174,7 @@
{"JavaAppMngrPlugin.log","[JavaAppMngrPlugin]"}, // EJavaAppMngrPlugin
{"JavaBroadcast.log", "[JavaBroadcast]"}, // EJavaBroadcast
{"JavaMMAPI.log", "[ MMAPPI ]"}, // EJavaAMMS
+ {"JavaSettings.log", "[ JavaSettings ]"}, // EJavaSettings
// add new component file name and nickname here
};
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/utils/ErrorMessageBase.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/ErrorMessageBase.java Fri Jul 09 16:35:45 2010 +0300
@@ -62,7 +62,12 @@
{
return this.getClass().getName() + ": No message found for error " + errorCode;
}
- return getResourceLoader().format(msgId, errorMessageParameters);
+ ResourceLoader rl = getResourceLoader();
+ if (rl == null)
+ {
+ rl = getResourceLoader(errorCode);
+ }
+ return rl.format(msgId, errorMessageParameters);
}
/*** ---------------------------- PROTECTED --------------------------- */
@@ -76,11 +81,64 @@
/**
* Method for retrieving the ResourceLoader instance that is used
- * to localise error messages.
+ * to localise error messages. If this method returns null,
+ * the ResourceLoader is obtained with getResourceLoader(int)
+ * method variant which then must not return null.
+ *
* This method must be overriden in inheriting class.
*/
abstract protected ResourceLoader getResourceLoader();
+ /**
+ * Method for retrieving the ResourceLoader instance that is used
+ * to localise error message for specified error code.
+ * This method must be overriden in inheriting class if
+ * the getResourceLoader() method variant returns null.
+ *
+ * @param errorCode error code for which ResourceLoader is returned
+ */
+ protected ResourceLoader getResourceLoader(int errorCode)
+ {
+ return null;
+ }
+
+ /**
+ * Method for retrieving the ResourceLoader instance.
+ * This method is called from inheriting class
+ * getResourceLoader(int) method variant.
+ *
+ * @param textFilename name for text file
+ * @param textPrefix prefix for text ids
+ */
+ private static Hashtable iResourceLoaderTable = null;
+ protected static ResourceLoader getResourceLoader(String textFilename, String textPrefix)
+ {
+ String key = textFilename + "::" + textPrefix;
+ if (iResourceLoaderTable == null)
+ {
+ iResourceLoaderTable = new Hashtable();
+ }
+ ResourceLoader rl = (ResourceLoader)iResourceLoaderTable.get(key);
+ if (rl == null)
+ {
+ rl = ResourceLoader.getInstance(textFilename, textPrefix);
+ iResourceLoaderTable.put(key, rl);
+ }
+ return rl;
+ }
+
+ /**
+ * Gets the Qt locale ID currently being used on the phone.
+ *
+ * @return Qt locale ID as provided by the platform
+ */
+ protected static String getLocaleIdQt()
+ {
+ // Change this after Qt localisation files are taken into use.
+ //return ResourceLoader.getLocaleIdQt();
+ return null;
+ }
+
/*** ----------------------------- PACKAGE ---------------------------- */
/*** ----------------------------- PRIVATE ---------------------------- */
/*** ----------------------------- NATIVE ----------------------------- */
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerDetailedErrorMessage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerDetailedErrorMessage.java Fri Jul 09 16:35:45 2010 +0300
@@ -57,9 +57,7 @@
return iMessageTable;
}
Hashtable messageTable = new Hashtable();
- // Change this after Qt localisation files are in place.
- //if (ResourceLoader.getLocaleIdQt() == null)
- if (true)
+ if (getLocaleIdQt() == null)
{
messageTable.put(new Integer(NO_MEM), "no_mem_detail");
messageTable.put(new Integer(NO_MEM_MB), "no_mem_detail_mb");
@@ -108,9 +106,7 @@
{
if (iRes == null)
{
- // Change this after Qt localisation files are in place.
- //if (ResourceLoader.getLocaleIdQt() == null)
- if (true)
+ if (getLocaleIdQt() == null)
{
iRes = ResourceLoader.getInstance("javainstallation", "qtn_java_inst_error_");
}
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerErrorMessage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerErrorMessage.java Fri Jul 09 16:35:45 2010 +0300
@@ -63,9 +63,7 @@
return iMessageTable;
}
Hashtable messageTable = new Hashtable();
- // Change this after Qt localisation files are in place.
- //if (ResourceLoader.getLocaleIdQt() == null)
- if (true)
+ if (getLocaleIdQt() == null)
{
messageTable.put(new Integer(INST_NO_MEM), "no_mem");
messageTable.put(new Integer(INST_NO_NET), "no_net");
@@ -110,9 +108,7 @@
{
if (iRes == null)
{
- // Change this after Qt localisation files are in place.
- //if (ResourceLoader.getLocaleIdQt() == null)
- if (true)
+ if (getLocaleIdQt() == null)
{
iRes = ResourceLoader.getInstance("javainstallation", "qtn_java_inst_error_");
}
--- a/javacommons/utils/javasrc/com/nokia/mj/impl/utils/Logger.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/Logger.java Fri Jul 09 16:35:45 2010 +0300
@@ -81,6 +81,7 @@
public static final int EJavaAppMngrPlugin = 35;
public static final int EJavaBroadcast = 36;
public static final int EJavaAMMS = 37;
+ public static final int EJavaSettings = 38;
// add name of new components here
@@ -138,6 +139,7 @@
false, //EJavaAppMngrPlugin = 35;
false, //EJavaBroadcast = 36;
false, //EJavaAMMS = 37;
+ false, //EJavaSettings = 38;
// add new components here
};
--- a/javaextensions/comm/javasrc/com/nokia/mj/impl/gcf/protocol/comm/CommPermissionImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/comm/javasrc/com/nokia/mj/impl/gcf/protocol/comm/CommPermissionImpl.java Fri Jul 09 16:35:45 2010 +0300
@@ -47,7 +47,7 @@
public String toString()
{
- return "javax.microedition.io.CommProtocolPermission";
+ return "javax.microedition.io.Connector.comm";
}
public boolean implies(Permission p)
--- a/javaextensions/javaextensions.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/javaextensions.pro Fri Jul 09 16:35:45 2010 +0300
@@ -15,7 +15,7 @@
#
TEMPLATE = subdirs
SUBDIRS += iapinfo/build/javaiapinfo.pro
-SUBDIRS += mobinfo/build/mobinfo.pro
+SUBDIRS += mobinfo/build/javamobinfo.pro
SUBDIRS += comm/build/javacomm.pro
SUBDIRS += globalindicators/build/javaglobalindicators.pro
SUBDIRS += webservices/build/javawebservices.pro
--- a/javaextensions/location/landmarks/src/landmark.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/location/landmarks/src/landmark.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -457,6 +457,11 @@
return error;
}
+LOCAL_C void dispose(CBase* aLandmark)
+{
+ delete aLandmark;
+}
+
/*
* Class: javax_microedition_location_Landmark
* Method: _dispose
@@ -466,14 +471,15 @@
JNICALL Java_javax_microedition_location_Landmark__1dispose(
JNIEnv* /*aJniEnv*/,
jobject /*aPeer*/,
- jint /*aEventSourceHandle*/,
+ jint aEventSourceHandle,
jint aLandmarkHandle)
{
JELOG2(EJavaLocation);
-
+ LocationFunctionServer* eventSource =
+ reinterpret_cast< LocationFunctionServer*>(aEventSourceHandle);
+
CBase* object = reinterpret_cast< CBase*>(aLandmarkHandle);
-
- delete object;
+ eventSource->ExecuteTrap(dispose,object);
}
// End of file
--- a/javaextensions/midprms_db/javasrc/com/nokia/mj/impl/rms/RmsFileInfo.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/midprms_db/javasrc/com/nokia/mj/impl/rms/RmsFileInfo.java Fri Jul 09 16:35:45 2010 +0300
@@ -71,7 +71,7 @@
private long getSize()
{
- long size = 0;
+ long size = -1;
try
{
size = iFile.fileSize();
@@ -82,6 +82,7 @@
}
if (size < 0)
{
+ Logger.WLOG(Logger.EMidpRms, "fileSize = " + size);
size = 0;
}
return size;
@@ -102,18 +103,19 @@
private long getFreeSpace()
{
- long size = 0;
+ long size = -1;
try
{
size = iFile.availableSize();
}
catch (Exception e)
{
- Logger.ELOG(Logger.EMidpRms, "availableSize()" , e);
+ Logger.ELOG(Logger.EMidpRms, "availableSize() failed" , e);
}
if (size < 0)
{
- size = 0;
+ Logger.WLOG(Logger.EMidpRms, "availableSize = " + size);
+ size = MAX_RMS_SIZE;
}
return size;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javaextensions/mobinfo/build/javamobinfo.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TARGET=javamobinfo
+TEMPLATE=lib
+CONFIG += omj java stl
+CONFIG -= qt
+
+symbian {
+ LIBS += -leuser -letel -letelmm -lesock -lconnmon -lcommdb -lcommsdat -lcmmanager -ljavaconnectionmanager
+}
+
+include(../../../build/omj.pri)
--- a/javaextensions/mobinfo/build/mobinfo.pro Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TARGET=javamobinfo
-TEMPLATE=lib
-CONFIG += omj java stl
-CONFIG -= qt
-
-symbian {
- LIBS += -leuser -letel -letelmm -lesock -lconnmon -lcommdb -lcommsdat -lcmmanager
-}
-
-include(../../../build/omj.pri)
--- a/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoPermission.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoPermission.java Fri Jul 09 16:35:45 2010 +0300
@@ -28,6 +28,8 @@
private static final String IMSI_TARGET_NAME = "mobinfo.imsi";
private static final String MSISDN_TARGET_NAME = "mobinfo.msisdn";
private static final String CELLID_TARGET_NAME = "mobinfo.cellid";
+ private static final String COUNTRYCODE_TARGET_NAME = "mobinfo.countrycode";
+ private static final String NETWORKID_TARGET_NAME = "mobinfo.networkid";
private static final String PUBLIC_INFO_TARGET_NAME = "mobinfo.publicinfo";
private String iTarget = null;
@@ -40,7 +42,9 @@
if (IMSI_TARGET_NAME.equals(aUri)
|| MSISDN_TARGET_NAME.equals(aUri)
|| CELLID_TARGET_NAME.equals(aUri)
- || PUBLIC_INFO_TARGET_NAME.equals(aUri))
+ || PUBLIC_INFO_TARGET_NAME.equals(aUri)
+ || COUNTRYCODE_TARGET_NAME.equals(aUri)
+ || NETWORKID_TARGET_NAME.equals(aUri))
{
// aUri contains a known target name -> save it as such
iTarget = aUri;
@@ -62,6 +66,14 @@
{
iTarget = CELLID_TARGET_NAME;
}
+ else if (MobileInfoProperties.COUNTRY_CODE.equals(aUri))
+ {
+ iTarget = COUNTRYCODE_TARGET_NAME;
+ }
+ else if (MobileInfoProperties.NETWORK_ID.equals(aUri))
+ {
+ iTarget = NETWORKID_TARGET_NAME;
+ }
else
{
iTarget = PUBLIC_INFO_TARGET_NAME;
@@ -78,6 +90,14 @@
*/
public String getSecurityPromptQuestion(int aInteractionMode)
{
+ if (CELLID_TARGET_NAME.equals(iTarget)
+ || COUNTRYCODE_TARGET_NAME.equals(iTarget)
+ || NETWORKID_TARGET_NAME.equals(iTarget))
+ {
+ return SecurityPromptMessage.getInstance().getText(
+ SecurityPromptMessage.QUESTION_ID_READING_LOCATION_DATA,
+ null);
+ }
return null;
}
@@ -91,6 +111,18 @@
{
return "com.nokia.mid.Mobinfo.MSISDN";
}
+ else if (CELLID_TARGET_NAME.equals(iTarget))
+ {
+ return "com.nokia.mid.Mobinfo.cellid";
+ }
+ else if (COUNTRYCODE_TARGET_NAME.equals(iTarget))
+ {
+ return "com.nokia.mid.Mobinfo.countrycode";
+ }
+ else if (NETWORKID_TARGET_NAME.equals(iTarget))
+ {
+ return "com.nokia.mid.Mobinfo.networkid";
+ }
return null;
}
--- a/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java Fri Jul 09 16:35:45 2010 +0300
@@ -51,7 +51,7 @@
private static final String BATTERY_LEVEL = "com.nokia.mid.batterylevel";
- private static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
+ static final String COUNTRY_CODE = "com.nokia.mid.countrycode";
private static final String IMEI = "com.nokia.mid.imei";
@@ -59,7 +59,7 @@
private static final String NETWORK_AVAILABILITY = "com.nokia.mid.networkavailability";
- private static final String NETWORK_ID = "com.nokia.mid.networkid";
+ static final String NETWORK_ID = "com.nokia.mid.networkid";
private static final String NETWORK_SIGNAL = "com.nokia.mid.networksignal";
@@ -140,6 +140,9 @@
int value = ((Integer)iPropertyKeys.get(aKey)).intValue();
Uid appSuiteUid;
+ int apId = APP_DEFAULT_APN_NOT_SPECIFIED; // access point id
+ int apType = APP_DEFAULT_APN_NOT_SPECIFIED; // MIDlet access point type, can be SNAP or IAP
+
ConnectionManager CmInstance = null;
String result = null;
// Only network access seems to have another way to handle it.
@@ -160,29 +163,25 @@
AccessPoint apn = CmInstance.getApplicationDefault(appSuiteUid);
if (apn != null)
{
- if (apn.getType() == AccessPoint.NAP_IAP) // IAP ID
+ apId = apn.getNapId();
+ apType = apn.getType();
+
+
+ if ((apType!=AccessPoint.NAP_SNAP) && (apType!=AccessPoint.NAP_IAP))
{
- result = _getPropertyApn(NETWORK_ACCESS_V, apn.getNapId());
+ apType = APP_DEFAULT_APN_NOT_SPECIFIED;
+ apId = APP_DEFAULT_APN_NOT_SPECIFIED;
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+
}
- else
- {
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
- }
+ result = _getPropertyApn(NETWORK_ACCESS_V, apId,apType);
}
catch (Exception e)
{
Logger.LOG(Logger.ESOCKET, Logger.EInfo,"MobilInfoProperties :: getSuiteUid exception ");
- result = _getPropertyApn(NETWORK_ACCESS_V, APP_DEFAULT_APN_NOT_SPECIFIED);
+ result = _getPropertyApn(NETWORK_ACCESS_V, apId,apType);
}
return result;
}
@@ -202,6 +201,6 @@
}
private native String _getProperty(int value);
- private static native String _getPropertyApn(int property, int aAppDefaultApn);
+ private static native String _getPropertyApn(int property, int aAppDefaultApn, int apType);
}
\ No newline at end of file
--- a/javaextensions/mobinfo/src.s60/javamobinfo.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/mobinfo/src.s60/javamobinfo.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -29,6 +29,8 @@
#include <cmpluginpacketdatadef.h>
#include <cmpluginwlandef.h>
#include <cmpluginhscsddef.h>
+#include "connectionmanager.h"
+
using namespace CMManager;
#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
@@ -75,14 +77,15 @@
// ---------------------------------------------------------------------------
// forward declarations
// ---------------------------------------------------------------------------
-HBufC* GetProperty(const TInt aProperty, const TUint32 aAppDefaultApn);
+HBufC* GetProperty(const TInt aProperty, const TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType);
HBufC* GetTelephonyPropertyL(const TInt aProperty);
HBufC* GetDateTimePropertyL(const TInt aProperty);
-HBufC* GetNetworkAccessL(const TUint32 aAppDefaultApn);
+HBufC* GetNetworkAccessL(const TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType);
TUint32 GetUsedIapL();
HBufC* GetBearerTypeL(TUint32 aIapId);
+HBufC* GetIapBearerTypeL(const TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType);
HBufC* TranslateBearerInfoToNetworkAccessL(TConnMonBearerInfo aBearerInfo);
-HBufC* GetDefIapBearerTypeL(TUint32 aMidSuiteId);
+HBufC* GetAppDefIapBearerTypeL(const TUint32 aAppDefaultApn);
/*
* Class: com_nokia_mj_impl_properties_mobinfo_MobileInfoProperties
@@ -95,16 +98,18 @@
// Each mobinfo java property implementation calls the getPropertyMsid()
// function of the MobileInfoProperties class.
// @param aProperty name of the actual property
+// @param aAppDefaultApn application default access point id
+// @param aAppDefaultApType application default access point type ( SNAP, IAP)
// @param aAppDefaultApn Application default apn
// -----------------------------------------------------------------------------
JNIEXPORT jstring JNICALL
Java_com_nokia_mj_impl_properties_mobinfo_MobileInfoProperties__1getPropertyApn
-(JNIEnv* aJni, jclass, jint aProperty, jint aAppDefaultApn)
+(JNIEnv* aJni, jclass, jint aProperty, jint aAppDefaultApn, jint aAppDefaultApType)
{
LOG1(ESOCKET, EInfo, "MOBINFO + getPropertyMsid(), msid: %D", aAppDefaultApn);
HBufC* property = NULL;
jstring str = NULL;
- property = GetProperty(aProperty, aAppDefaultApn);
+ property = GetProperty(aProperty, aAppDefaultApn,aAppDefaultApType);
if (NULL != property)
{
LOG(ESOCKET,EInfo,"_getPropertyApn, property is not null");
@@ -124,7 +129,7 @@
HBufC* property = NULL;
jstring str = NULL;
- property = GetProperty(aKey,NULL);
+ property = GetProperty(aKey,NULL,0);
if (NULL != property)
{
TPtrC data(property->Des());
@@ -134,7 +139,7 @@
return str;
}
-HBufC* GetProperty(const TInt aProperty, const TUint32 aAppDefaultApn)
+HBufC* GetProperty(const TInt aProperty, const TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType)
{
JELOG2(ESOCKET);
LOG(ESOCKET, EInfo, "MOBINFO + GetProperty()");
@@ -148,7 +153,7 @@
TRAP(err, property = GetDateTimePropertyL(aProperty));
break;
case NETWORK_ACCESS:
- TRAP(err, property = GetNetworkAccessL(aAppDefaultApn));
+ TRAP(err, property = GetNetworkAccessL(aAppDefaultApn,aAppDefaultApType));
LOG(ESOCKET, EInfo,"after GetNetworkAccessL");
break;
@@ -785,21 +790,178 @@
// Get type network access of currently used active connection
// @return network access, ownership hand over
// ---------------------------------------------------------------------------
-HBufC* GetNetworkAccessL(TUint32 aAppDefaultApn)
+HBufC* GetNetworkAccessL(TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType)
{
LOG(ESOCKET, EInfo, "MOBINFO + GetNetworkAccessL");
HBufC* bearerType = NULL;
TUint32 iapId = GetUsedIapL();
- if (iapId == 0)
+ if (iapId != 0)
+ {
+ // active connection present, opened by MIDlet.
+ bearerType = GetBearerTypeL(iapId);
+
+ }
+ else
{
- bearerType = GetDefIapBearerTypeL(aAppDefaultApn);
+ // if there is no active connection by the application, return the app default bearer type.
+ if (aAppDefaultApType == 3)
+ {
+ // app default is IAP
+ bearerType = GetAppDefIapBearerTypeL(aAppDefaultApn);
+
+ }
+ else
+ {
+ bearerType = GetIapBearerTypeL(aAppDefaultApn,aAppDefaultApType);
+ }
+
+ }
+ LOG(ESOCKET, EInfo, "MOBINFO - GetNetworkAccessL");
+ return bearerType;
+}
+
+
+//// ---------------------------------------------------------------------------
+//// Check if device default is set (SNAP or IAP)
+//// @return true if device default defined, else false
+//// ---------------------------------------------------------------------------
+
+bool isDeviceDefaultPresentL()
+{
+ TCmDefConnType type;
+ RCmManager * mgr = new(ELeave) RCmManager();
+ mgr->OpenL();
+
+ TCmDefConnValue obj;
+ mgr->ReadDefConnL(obj);
+ type = obj.iType;
+
+ if ((type!=ECmDefConnConnectionMethod) && (type!=ECmDefConnDestination))
+ {
+ // device default is other than SNAP or IAP
+ return false;
}
else
{
- bearerType = GetBearerTypeL(iapId);
+ return true;
+
}
- LOG(ESOCKET, EInfo, "MOBINFO - GetNetworkAccessL");
+
+
+
+}
+
+//// ---------------------------------------------------------------------------
+//// Get bearer type of Access point ID
+//// @return bearer type Acess point ID
+//// ---------------------------------------------------------------------------
+
+HBufC* GetIapBearerTypeL(const TUint32 aAppDefaultApn, const TUint32 aAppDefaultApType)
+{
+
+ LOG(ESOCKET, EInfo, "MOBINFO + GetIapBearerTypeL()");
+ RConnectionMonitor monitor;
+ TUint connectionCount(0);
+ TUint iapId(0);
+ TRequestStatus status(KErrNone);
+ HBufC* bearerType(NULL);
+ TUint connectionId(0);
+ TUint subConnectionCount(0);
+ TConnMonBearerInfo bearerInfo(EBearerInfoUnknown);
+ bool flag = false;
+ TUint connIdx = 1;
+
+ User::LeaveIfError(monitor.ConnectL());
+ CleanupClosePushL(monitor);
+
+ status = KRequestPending;
+ monitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+ User::LeaveIfError(status.Int());
+ LOG1(ESOCKET, EInfo, "MOBINFO: GetIapBearerTypeL: Count of active connections: %D", connectionCount);
+
+ // Go through all connections
+ for (connIdx = 1; connIdx <= connectionCount; ++connIdx)
+ {
+
+ connectionId = 0;
+ subConnectionCount = 0;
+ flag = false;
+
+ // Get connection ID
+ monitor.GetConnectionInfo(connIdx, connectionId, subConnectionCount);
+ User::LeaveIfError(connectionId);
+ // Get connection IAP ID
+ status = KRequestPending;
+ monitor.GetUintAttribute(connectionId, 0, KIAPId, iapId, status);
+ User::WaitForRequest(status);
+ User::LeaveIfError(status.Int());
+ LOG1(ESOCKET, EInfo, "MOBINFO: GetIapBearerTypeL Connection 's IAP ID found: %D", iapId);
+ if (aAppDefaultApType == 2)
+ {
+ LOG(ESOCKET, EInfo, "MOBINFO: Matching MIDlet defined SNAP to active IAP ID ");
+ // Midlet has a SNAP defined, so check if the active IAP is under this SNAP.
+ flag = ConnectionManager::isIapDefault(iapId, aAppDefaultApn,false);
+ if (!flag)
+ {
+ continue; // active access point doesn't belong to MIDlet SNAP, check the next active access point.
+ }
+ else
+ {
+ break;
+ }
+ }
+ else
+ {
+ // No SNAP defined for the MIDlet, check for system default SNAP/IAP.
+ if (isDeviceDefaultPresentL())
+ {
+ LOG(ESOCKET, EInfo, "MOBINFO: Matching device default to active IAP ID ");
+ flag = ConnectionManager::isIapDefault(iapId, 0, true);
+ if (!flag)
+ {
+ continue; // active access point doesn't belong to MIDlet SNAP, check the next active access point.
+ }
+ else
+ {
+ break;
+ }
+ }
+ else
+ {
+ LOG(ESOCKET, EInfo, "MOBINFO: Returning the bearer type of first active IAP ");
+ flag = true;
+ break; // no MIDlet SNAP, no device default, select this access point and return the bearer type
+
+ }
+ }
+
+ } // end of for loop
+
+ if (flag)
+ {
+ // we did not reach end of active connections, one of the conditions matched , find the bearer type
+ status = KRequestPending;
+ monitor.GetIntAttribute(connectionId,
+ 0,
+ KBearerInfo,
+ (TInt&)bearerInfo,
+ status);
+ User::WaitForRequest(status);
+ User::LeaveIfError(status.Int());
+
+ // Translate bearer type to type of network access
+ bearerType = TranslateBearerInfoToNetworkAccessL(bearerInfo);
+ }
+ CleanupStack::PopAndDestroy(&monitor);
+ if (bearerType == NULL)
+ {
+ // No active connection (or) active IAP didn't match the conditions
+ bearerType = KNetworkAccessNa().AllocL();
+ }
return bearerType;
+
+
}
//// ---------------------------------------------------------------------------
@@ -1047,26 +1209,24 @@
// --------------------------------------------------------------------
// Get network access type of default access point set in MIDlet settings
-// @param aAppDefaultApn MIDlet suite ID
+// @param aAppDefaultApn MIDlet default IAP
// @return network access type, ownership hand over
-HBufC* GetDefIapBearerTypeL(TUint32 aAppDefaultApn)
+HBufC* GetAppDefIapBearerTypeL(const TUint32 aAppDefaultApn)
{
- LOG(ESOCKET, EInfo, "MOBINFO + GetDefIapBearerTypeL");
- ELOG1(ESOCKET, "GetDefIapBearerTypeL %d", aAppDefaultApn);
+ LOG1(ESOCKET, EInfo, "MOBINFO + GetAppDefIapBearerTypeL aId = %d ", aAppDefaultApn);
HBufC* bearerType(NULL);
- // MAPNSettings* apnTable = GetAPNSettingsLC(KAPNSettingsVersion);
- //TUint32 apn = apnTable->GetAPNIdL( aMidSuiteId );
- //CleanupStack::PopAndDestroy(); //apnTable
- LOG1(ESOCKET, EInfo, "MIDlet specific IAP ID gotten: %D", aAppDefaultApn);
+
if (aAppDefaultApn == 0 || aAppDefaultApn == (TUint32)-1)
{
bearerType = KNetworkAccessNa().AllocL();
}
else
{
+
RCmManager localCmManager;
localCmManager.OpenL();
- TUint32 tmpval = localCmManager.GetConnectionMethodInfoIntL(aAppDefaultApn,ECmBearerType);
+ TUint32 iap = aAppDefaultApn;
+ TUint32 tmpval = localCmManager.GetConnectionMethodInfoIntL(iap,ECmBearerType);
ELOG1(ESOCKET, "GetConnectionMethodInfoIntL: %d", tmpval);
switch (tmpval)
{
@@ -1084,11 +1244,8 @@
default :
bearerType = KNetworkAccessNa().AllocL();
break;
-
-
}
-
}
- LOG(ESOCKET, EInfo, "MOBINFO - GetDefIapBearerTypeL");
+ LOG(ESOCKET, EInfo, "MOBINFO - GetAppDefIapBearerTypeL");
return bearerType;
}
--- a/javaextensions/satsa/build/javasatsa.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/satsa/build/javasatsa.pro Fri Jul 09 16:35:45 2010 +0300
@@ -16,8 +16,8 @@
TARGET=javasatsa
TEMPLATE=lib
-CONFIG += omj java stl
-CONFIG -= qt
+CONFIG += hb omj java stl
+# CONFIG -= qt
symbian {
INCLUDEPATH += ../framework/inc \
@@ -35,6 +35,8 @@
LIBS += -ljavastorage \
+ -lHbCore \
+ -lHbWidgets \
-lCommonUI \
-lrandom \
-lx509 \
@@ -62,6 +64,7 @@
-lWimClient \
-lestlib \
-lcryptography \
+
}
--- a/javaextensions/satsa/pki/src.s60/cstscredentialmanager.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/satsa/pki/src.s60/cstscredentialmanager.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -36,7 +36,6 @@
#include <securityerr.h>
-
// CONSTANTS
_LIT(KSTSSymbianKeyStoreLabel, "Software key store");
_LIT(KSTSSymbianCertificateStoreLabel, "Software certificate store");
@@ -67,10 +66,7 @@
{
delete iEncodedCert;
delete iIssuerAndSerialNumber;
- if (iPKIDialog)
- {
- iPKIDialog->Release();
- }
+
delete iDistinguishedName;
delete iDisplayName;
delete iRequestEncoded;
@@ -533,8 +529,7 @@
//
void CSTSCredentialManager::ConstructL()
{
- iPKIDialog = PKIDialogFactory::CreateNoteL();
-
+
User::LeaveIfError(iFileServer.Connect());
iWait = new(ELeave) CActiveSchedulerWait;
iStore = CUnifiedCertStore::NewL(iFileServer, ETrue);
@@ -619,8 +614,7 @@
{
// not found, ok to add
iState = EAddDialog;
- iPKIDialog->SaveCertificate(EX509Certificate, EUserCertificate,
- iSubject, iStatus);
+
SetActive();
return;
}
@@ -720,7 +714,8 @@
CCTCertInfo* certInfo = (*iCertInfoArray)[ 0 ];
iState = ERemoveDialog;
iHandle = certInfo->Handle();
- iPKIDialog->DeleteCertificate(iHandle, iStatus);
+
+
SetActive();
}
@@ -783,7 +778,7 @@
iState = ECSRDialog;
iHandle = iKeyInfo->Handle();
- iPKIDialog->CreateCSR(*iDisplayName, iHandle, iStatus);
+
SetActive();
}
--- a/javaextensions/satsa/pki/src.s60/cstscredentialmanager.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/satsa/pki/src.s60/cstscredentialmanager.h Fri Jul 09 16:35:45 2010 +0300
@@ -31,7 +31,7 @@
// FORWARD DECLARATIONS
class CCTKeyInfo;
-class MPKIDialog;
+
class CUnifiedCertStore;
class CUnifiedKeyStore;
class CX500DistinguishedName;
@@ -349,8 +349,6 @@
// internal error variable
TInt iError;
- // PKI Dialog, owned
- MPKIDialog* iPKIDialog;
// The actual store, owned
CUnifiedCertStore* iStore;
--- a/javaextensions/satsa/pki/src.s60/cstssignatureservice.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/satsa/pki/src.s60/cstssignatureservice.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -15,8 +15,6 @@
*
*/
-
-// INCLUDE FILES
#include "cstssignatureservice.h"
#include "tstsdistinguishednameconverter.h"
#include "secdlg.h"
@@ -32,7 +30,7 @@
#include <CCMSSignerInfo.h>
#include <CCMSEncapsulatedContentInfo.h>
#include <CCMSSignedData.h>
-#include <PKIDlg.h>
+
#include "cstsseprompt.h"
#include <hash.h>
@@ -42,7 +40,10 @@
#include "logger.h"
#include "jstringutils.h"
-// CONSTANTS
+#include <hbdevicemessageboxsymbian.h>
+#include <hbpopup.h>
+
+
const TInt KDefaultGranularity = 1;
const TInt KOptionIncludeContent = 1;
@@ -80,10 +81,7 @@
{
iDialog->Release(); // Release deletes the object
}
- if (iPKIDialog)
- {
- iPKIDialog->Release();
- }
+
iCertificateArray.Close();
iCertInfos.Close();
delete iFilter;
@@ -126,14 +124,12 @@
TInt aOptions, const CDesCArray& aCaNames,
const TDesC& asecurityElementPrompt, TBool aShowData)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::AuthenticateL");
if (iState != EReady)
{
ELOG(ESATSA, "CSTSSignatureService::AuthenticateL: Not Ready");
User::Leave(KErrNotReady);
}
- LOG(ESATSA, EInfo, "CSTSSignatureService::AuthenticateL:After convertions");
// First we need to convert the data to unicode, if we have to display it
HBufC* textToDisplay = NULL;
if (aShowData)
@@ -155,14 +151,9 @@
iOptions = aOptions;
iShowNotes = EFalse;
-
- LOG(ESATSA, EInfo, "CSTSSignatureService::AuthenticateL:Going to call CreateSignatureL");
// get handles to applicable certificates
HBufC8* retVal = CreateSignatureL(aCaNames, EX509UsageDigitalSignature,
asecurityElementPrompt);
- LOG(ESATSA, EInfo, "CSTSSignatureService::AuthenticateL:After call to CreateSignatureL");
-
- LOG(ESATSA, EInfo, "-- CSTSSignatureService::AuthenticateL");
return retVal;
}
@@ -171,7 +162,6 @@
jint aOptions, jobjectArray aCaNames, jstring aSecurityElementPrompt,
jboolean aShowData, HBufC8** aRetVal)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::StaticAuthenticateL");
const TInt byteArrayLength = aJniEnv->GetArrayLength(
aByteArrayToAuthenticate);
jbyte* bytesToAuthenticate = aJniEnv->GetByteArrayElements(
@@ -189,20 +179,15 @@
CDesCArrayFlat* nativeCaNames = STSCreateNativeStringArrayL(aJniEnv,
aCaNames);
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticAuthenticateL: prepare se prompt");
const JStringUtils securityElementPrompt(*aJniEnv, aSecurityElementPrompt);
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticAuthenticateL: start convertions to TInt");
TBool ShowData = static_cast<TBool>(aShowData);
const TDesC* sec = static_cast<const TDesC*>(&securityElementPrompt);
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticAuthenticateL: After convertions,going to call CallMethodL");
TRAPD(err, CallMethodL(*aRetVal, service,
&CSTSSignatureService::AuthenticateL, desToAuthenticate, aOptions,
*nativeCaNames, *sec, ShowData, service));
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::StaticAuthenticateL:After CallmethodL");
- LOG(ESATSA, EInfo, "-- return CSTSSignatureService::StaticAuthenticateL");
return err;
}
@@ -216,15 +201,12 @@
HBufC8* CSTSSignatureService::SignL(const TDesC8& aBytesToSign, TInt aOptions,
const CDesCArray& aCaNames, const TDesC& aSecurityElementPrompt)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::SignL");
if (iState != EReady)
{
ELOG(ESATSA, "CSTSSignatureService::SignL: Not Ready");
User::Leave(KErrNotReady);
}
- LOG(ESATSA, EInfo, "CSTSSignatureService::SignL: start convertions!");
- LOG(ESATSA, EInfo, "CSTSSignatureService::SignL: After convertions");
// convert text from UTF8
HBufC* textToDisplay = ConvertUTF8ToUnicodeL(aBytesToSign);
delete iTextToDisplay;
@@ -238,12 +220,10 @@
iShowNotes = ETrue;
- LOG(ESATSA, EInfo, "CSTSSignatureService::SignL: Before call to CreateSignatureL");
// get handles to applicable certificates
HBufC8* retVal = CreateSignatureL(aCaNames, EX509UsageNonRepudiation,
aSecurityElementPrompt);
- LOG(ESATSA, EInfo, "-- return CSTSSignatureService::SignL");
return retVal;
}
@@ -256,13 +236,12 @@
CSTSSignatureService* service, jbyteArray aBytesToSign, jint aOptions,
jobjectArray aCaNames, jstring aSecurityElementPrompt, HBufC8** aRetVal)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::StaticSignL");
const TInt byteArrayLength = aJniEnv->GetArrayLength(aBytesToSign);
jbyte* bytesToSign = aJniEnv->GetByteArrayElements(aBytesToSign, NULL);
if (!bytesToSign)
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticSignL: No memory");
+ ELOG(ESATSA, "CSTSSignatureService::StaticSignL: No memory");
return NULL;
}
@@ -273,15 +252,12 @@
const JStringUtils securityElementPrompt(*aJniEnv, aSecurityElementPrompt);
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticSignL: Start convertions");
- LOG(ESATSA, EInfo, "CSTSSignatureService::StaticSignL: Before callmethodl");
-
+
const TDesC* sec = static_cast<const TDesC*>(&securityElementPrompt);
TRAPD(err, CallMethodL(*aRetVal, service, &CSTSSignatureService::SignL,
desToSign, aOptions, *nativeCaNames, *sec, service));
- LOG(ESATSA, EInfo, "-- ret CSTSSignatureService::StaticSignL");
return err;
}
@@ -292,28 +268,50 @@
//
void CSTSSignatureService::RunL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::RunL");
if (iStatus == KErrCancel)
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: KErrCancel");
if (iShowNotes)
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: ShowNote");
iState = EFinalNote;
iStatus = KErrNone;
- iPKIDialog->Note(MPKIDialog::ESigningCancelled, iStatus);
+
+ // Using Orbit API
+ CHbDeviceMessageBoxSymbian* messageBox
+ = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
+ CleanupStack::PushL(messageBox);
+
+ _LIT(KQuestion, "Do you want to sign the data?");
+ messageBox->SetTextL(KQuestion);
+ messageBox->SetTimeout(HbPopup::NoTimeout);
+
+ // Read localised versions instead of hard coded values.
+ _LIT(KAllowButtonText, "Allow");
+ _LIT(KDenyButtonText, "Deny");
+
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
+
+ // by default the answer is Allow
+ if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
+ {
+
+ }
+
+ messageBox->Close();
+ CleanupStack::PopAndDestroy(messageBox);
+
SetActive();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: Done ShowNote");
- }
+ }
else
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: Complete");
- Complete(KErrNone);
+ Complete(KErrNone);
}
}
else if (iStatus != KErrNone)
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: Error occured");
+ ELOG(ESATSA, "CSTSSignatureService::RunL: Error occured");
// Error has occured; inform java
Complete(iStatus.Int());
}
@@ -323,29 +321,23 @@
{
case EInitialising:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EInitialising");
iState = EKeyStoreInit;
iKeyStore->Initialize(iStatus);
SetActive();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case EInitialising");
break;
}
case EKeyStoreInit:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EKeyStoreInit");
Complete(KErrNone);
break;
}
case EListing:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EListing");
HandlesFromCertInfosL();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case EListing");
break;
}
case EDialog:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EDialog");
iState = EGetCert;
if (iCertificate)
{
@@ -360,12 +352,10 @@
iCertStore->GetCert(iCertificate, iCertificateHandle, iStatus);
SetActive();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case EDialog");
break;
}
case EGetCert:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EGetCert");
if (iX509Certificate)
{
delete iX509Certificate;
@@ -374,44 +364,35 @@
iState = ERetrieveCert;
iCertStore->Retrieve(*iCertificate, iX509Certificate, iStatus);
SetActive();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case EGetCert");
break;
}
case ERetrieveCert:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case ERetrieveCert");
FindKeyL();
break;
}
case EFindKey:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EFindKey");
OpenSignerL();
break;
}
case EOpenSigner:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EOpenSigner");
SignL();
break;
}
case ESign:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case ESign");
CreateSignedDataL();
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case ESign");
break;
}
case EFinalNote:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case EFinalNote");
Complete(KErrNone);
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: over case EFinalNote");
break;
}
default:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::RunL: case default");
Complete(KErrGeneral);
}
}
@@ -425,7 +406,6 @@
//
TInt CSTSSignatureService::RunError(TInt aError)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::RunError");
Complete(aError);
return KErrNone;
}
@@ -524,8 +504,7 @@
{
User::LeaveIfError(iFileServer.Connect());
iDialog = SecurityDialogFactory::CreateL();
- iPKIDialog = PKIDialogFactory::CreateNoteL();
-
+
iFilter = CCertAttributeFilter::NewL();
iWait = new(ELeave) CActiveSchedulerWait;
@@ -542,7 +521,6 @@
//
void CSTSSignatureService::Complete(TInt aError)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::Complete");
if (KErrNone == aError)
{
iState = EReady;
@@ -553,7 +531,7 @@
iError = aError;
}
iWait->AsyncStop();
- LOG(ESATSA, EInfo, "-- ret CSTSSignatureService::Complete");
+
}
// -----------------------------------------------------------------------------
@@ -563,17 +541,14 @@
//
void CSTSSignatureService::WaitForCompletionL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::WaitForCompletionL");
SetActive();
iWait->Start();
if (iState != EReady)
{
// we need to be ready for the next request
iState = EReady;
-
User::Leave(iError);
}
- LOG(ESATSA, EInfo, "- ret CSTSSignatureService::WaitForCompletionL");
}
// -----------------------------------------------------------------------------
@@ -584,7 +559,6 @@
HBufC8* CSTSSignatureService::CreateSignatureL(const CDesCArray& aCaNames,
const TKeyUsageX509 aUsage, const TDesC& aSecurityElementPrompt)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::CreateSignatureL");
HBufC* sePrompt = NULL;
if (aSecurityElementPrompt != KNullDesC())
{
@@ -592,14 +566,10 @@
}
delete iSecurityElementPrompt;
iSecurityElementPrompt = sePrompt;
- LOG(ESATSA, EInfo, "CSTSSignatureService::CreateSignatureL: call findcertificates");
FindCertificatesL(aCaNames, aUsage);
- LOG(ESATSA, EInfo, "CSTSSignatureService::CreateSignatureL: After call to findcertificates");
WaitForCompletionL();
- LOG(ESATSA, EInfo, "CSTSSignatureService::CreateSignatureL: call WaitForCompletion");
HBufC8* retVal = iSignature;
iSignature = NULL;
- LOG(ESATSA, EInfo, "-- ret CSTSSignatureService::CreateSignatureL");
return retVal;
}
// -----------------------------------------------------------------------------
@@ -611,7 +581,6 @@
const TKeyUsageX509 aUsage)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::FindCertificatesL");
iFilter->SetKeyUsage(aUsage);
iFilter->SetOwnerType(EUserCertificate);
iFilter->SetFormat(EX509Certificate);
@@ -654,7 +623,7 @@
iState = EListing;
iCertStore->List(iCertInfos, *iFilter, iDERNames, iStatus);
}
- LOG(ESATSA, EInfo, "-- ret CSTSSignatureService::FindCertificatesL");
+
}
// -----------------------------------------------------------------------------
@@ -664,7 +633,6 @@
//
void CSTSSignatureService::HandlesFromCertInfosL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::HandlesFromCertInfosL");
TInt certificateCount = iCertInfos.Count();
if (certificateCount == 0)
{
@@ -675,7 +643,6 @@
iCertificateArray.Reset();
for (TInt i = 0; i < certificateCount; i++)
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::HandlesFromCertInfosL: No Certificates");
User::LeaveIfError(iCertificateArray.Append(iCertInfos[i]->Handle()));
}
@@ -684,18 +651,60 @@
{
case EAuthWithoutText:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::HandlesFromCertInfosL: case EAuthWithoutText");
- iPKIDialog->UserAuthentication(iCertificateArray, iCertificateHandle,
- iStatus);
- LOG(ESATSA, EInfo, "CSTSSignatureService::HandlesFromCertInfosL: over case EAuthWithoutText");
+ // Use Orbit API
+ CHbDeviceMessageBoxSymbian* messageBox
+ = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
+ CleanupStack::PushL(messageBox);
+
+ _LIT(KQuestion, "Do you want to sign the data?");
+ messageBox->SetTextL(KQuestion);
+ messageBox->SetTimeout(HbPopup::NoTimeout);
+
+ // Read localised versions instead of hard coded values.
+ _LIT(KAllowButtonText, "Allow");
+ _LIT(KDenyButtonText, "Deny");
+
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
+
+ // by default the answer is Allow
+ if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
+ {
+
+ }
+ messageBox->Close();
+ CleanupStack::PopAndDestroy(messageBox);
break;
}
case EAuthWithText:
{
- LOG(ESATSA, EInfo, "CSTSSignatureService::HandlesFromCertInfosL: case EAuthWithText");
- iPKIDialog->UserAuthenticationText(*iTextToDisplay, iCertificateArray,
- iCertificateHandle, iStatus);
- LOG(ESATSA, EInfo, "CSTSSignatureService::HandlesFromCertInfosL: over case EAuthWithText");
+ // Use Orbit API
+ CHbDeviceMessageBoxSymbian* messageBox
+ = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
+ CleanupStack::PushL(messageBox);
+
+ _LIT(KQuestion, "Do you want to sign the data?");
+ messageBox->SetTextL(KQuestion);
+ messageBox->SetTimeout(HbPopup::NoTimeout);
+
+ // Read localised versions instead of hard coded values.
+ _LIT(KAllowButtonText, "Allow");
+ _LIT(KDenyButtonText, "Deny");
+
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
+
+ // by default the answer is Allow
+ if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
+ {
+
+ }
+ messageBox->Close();
+ CleanupStack::PopAndDestroy(messageBox);
break;
}
case ESignWithText:
@@ -721,7 +730,6 @@
//
void CSTSSignatureService::FindKeyL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::FindKeyL");
iKeyFilter.iKeyAlgorithm = CKeyInfoBase::EInvalidAlgorithm;
iKeyFilter.iKeyId = iCertificate->SubjectKeyId();
@@ -740,7 +748,6 @@
//
void CSTSSignatureService::OpenSignerL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::OpenSignerL");
// if key is not found, display security element prompt and search again
if (iKeys.Count() == 0)
{
@@ -803,8 +810,6 @@
//
void CSTSSignatureService::SignL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::SignL");
-
// first we create a digest of the message
CSHA1* sha = CSHA1::NewL();
@@ -892,7 +897,6 @@
//
void CSTSSignatureService::CreateSignedDataL()
{
- LOG(ESATSA, EInfo, "+ CSTSSignatureService::CreateSignedDataL");
CCTKeyInfo* keyInfo = iKeys[0];
HBufC8* signature = NULL;
@@ -987,14 +991,39 @@
if (iShowNotes)
{
iState = EFinalNote;
- iPKIDialog->Note(MPKIDialog::ESignatureDone, iStatus);
+
+ //proper string for user prompt
+ CHbDeviceMessageBoxSymbian* messageBox
+ = CHbDeviceMessageBoxSymbian::NewL(CHbDeviceMessageBoxSymbian::EWarning);
+ CleanupStack::PushL(messageBox);
+
+ _LIT(KQuestion, "Do you want to sign the data?");
+ messageBox->SetTextL(KQuestion);
+ messageBox->SetTimeout(HbPopup::NoTimeout);
+
+ // Read localised versions instead of hard coded values.
+ _LIT(KAllowButtonText, "Allow");
+ _LIT(KDenyButtonText, "Deny");
+
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::EAcceptButton, KAllowButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::EAcceptButton, ETrue);
+ messageBox->SetButtonTextL(CHbDeviceMessageBoxSymbian::ERejectButton, KDenyButtonText);
+ messageBox->SetButton(CHbDeviceMessageBoxSymbian::ERejectButton, ETrue);
+
+ // by default the answer is Allow
+ if (messageBox->ExecL() == CHbDeviceMessageBoxSymbian::ERejectButton)
+ {
+
+ }
+ messageBox->Close();
+ CleanupStack::PopAndDestroy(messageBox);
SetActive();
}
else
{
Complete(KErrNone);
}
- LOG(ESATSA, EInfo, "-- ret CSTSSignatureService::CreateSignedDataL");
+
}
// -----------------------------------------------------------------------------
--- a/javaextensions/satsa/pki/src.s60/cstssignatureservice.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/satsa/pki/src.s60/cstssignatureservice.h Fri Jul 09 16:35:45 2010 +0300
@@ -19,19 +19,17 @@
#ifndef CSTSSIGNATURESERVICE_H
#define CSTSSIGNATURESERVICE_H
-// INCLUDES
+
+#include "javaosheaders.h"
+#include <vector>
+
#include <e32base.h>
#include <badesca.h>
#include <mctkeystore.h>
#include "functionserver.h"
-// CONSTANTS
-
-
-
// FORWARD DECLARATIONS
class MSecurityDialog;
-class MPKIDialog;
class CUnifiedCertStore;
class CUnifiedKeyStore;
class CCTCertInfo;
@@ -266,9 +264,6 @@
// security dialog, owned
MSecurityDialog* iDialog;
- // PKI Dialog, owned
- MPKIDialog* iPKIDialog;
-
// certificate store, owned
CUnifiedCertStore* iCertStore;
--- a/javaextensions/sensor/src.s60/csensorbase.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/sensor/src.s60/csensorbase.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -139,7 +139,14 @@
void CSensorBase::AsyncCallback(TMethod aMethod)
{
JELOG2(ESensor);
- iMethodArray.Append(aMethod);
+ TInt err = iMethodArray.Append(aMethod);
+ // if there was error when adding the method to array then just return
+ if ( err )
+ {
+ ELOG2(ESensor, "CSensorBase::AsyncCallback - Error (code = %d) when "
+ "adding method (type = %d) to method buffer.", err, aMethod.iMethodType);
+ return;
+ }
// If there is old request ongoing, wait it for completion
if (iMethodArray.Count() > 1)
--- a/javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -524,7 +524,7 @@
}
// Store the received page number, such that the message can
// be reconstructed in the correct order later
- mCbsMessagePagesRef.Append(currentPage);
+ mCbsMessagePagesRef.AppendL(currentPage);
// Store the actual content of the message
mCbsMessagePagesData->AppendL(messageData);
--- a/javaextensions/wma/sms_cbs/pushplugin/sms/src.s60/smsserverconnection.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaextensions/wma/sms_cbs/pushplugin/sms/src.s60/smsserverconnection.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -211,6 +211,7 @@
mIoctlBuf() = KSockSelectRead;
mSocket.Ioctl(KIOctlSelect, iStatus, &mIoctlBuf, KSOLSocket);
SetActive();
+ pthread_mutex_unlock(&mMutex);
return;
}
switch (mState)
@@ -276,6 +277,7 @@
pthread_cond_signal(&mCondVar);
mIsRunning = EFalse;
CActiveScheduler::Stop();
+ break;
}
default:
{
--- a/javamanager/javabackup/javabackupcore/build/javabackup.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javabackup/javabackupcore/build/javabackup.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -43,12 +43,14 @@
SOURCE jsbcactive.cpp
SOURCE jsbcdataowner.cpp
+#ifdef RD_JAVA_S60_RELEASE_5_0
+SYSTEMINCLUDE /epoc32/include/connect // Due to abclient.h in S60 5.0
+#endif
+
USERINCLUDE ../src.s60
USERINCLUDE ../../inc.s60
USERINCLUDE ../../../../inc
-SYSTEMINCLUDE /epoc32/include/connect
-
LIBRARY ecom.lib
LIBRARY abclient.lib
LIBRARY javastorage.lib
--- a/javamanager/javabackup/javabackupcore/src.s60/jsbcdataowner.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javabackup/javabackupcore/src.s60/jsbcdataowner.h Fri Jul 09 16:35:45 2010 +0300
@@ -19,7 +19,7 @@
#ifndef JSBCDATAOWNER_H
#define JSBCDATAOWNER_H
-#include <abclient.h>
+#include <connect/abclient.h>
namespace java
{
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -59,7 +59,7 @@
NextState(Initialize());
break;
case EListTokenTypes:
- NextState(ListTokenTypes());
+ NextState(ListTokenTypesL());
break;
case EOpenTokenType:
NextState(OpenTokenType());
@@ -132,11 +132,11 @@
return true;
}
-bool SmartCardCryptoTokenReader::ListTokenTypes()
+bool SmartCardCryptoTokenReader::ListTokenTypesL()
{
TCTTokenTypeAttribute att = { KCTRemovable , 1 };
- iSmartCardTokensAttributes.Append(att);
- iSmartCardTokensInterfaces.Append(TUid::Uid(KInterfaceCertStore));
+ iSmartCardTokensAttributes.AppendL(att);
+ iSmartCardTokensInterfaces.AppendL(TUid::Uid(KInterfaceCertStore));
TCTFindTokenTypesByInterfaceAndAttribute findByIAndA(
iSmartCardTokensInterfaces.Array(), iSmartCardTokensAttributes.Array());
CCTTokenTypeInfo::ListL(iSmartCardTokenTypes, findByIAndA);
--- a/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.h Fri Jul 09 16:35:45 2010 +0300
@@ -61,7 +61,7 @@
SmartCardCryptoTokenReader();
void ConstructL();
bool Initialize();
- bool ListTokenTypes();
+ bool ListTokenTypesL();
bool OpenTokenType();
bool OpenToken();
bool GetTokenInterface();
--- a/javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/build/testsmartcardtokenplugin.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/build/testsmartcardtokenplugin.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -29,9 +29,6 @@
CAPABILITY CAP_ECOM_PLUGIN
VENDORID VID_DEFAULT
-systeminclude /epoc32/include
-systeminclude /epoc32/include/ecom
-
sourcepath ../src
source testsmartcardtokenplugin.cpp
--- a/javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/src/101F5B72.rss Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/src/101F5B72.rss Fri Jul 09 16:35:45 2010 +0300
@@ -14,7 +14,7 @@
* Description:
*
*/
-#include <RegistryInfoV2.rh>
+#include <ecom/RegistryInfoV2.rh>
#include <ct/InterfaceUID.hrh>
// True
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstarter.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstarter.h Fri Jul 09 16:35:45 2010 +0300
@@ -59,7 +59,9 @@
private:
void startPreinstaller(TBool aIadBoot);
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
void registerMidletApplicationTypeHandler();
+#endif
CoreInterface* mCore;
RProcess* mPreinstaller;
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/src.s60/preinstallerstarter.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/src.s60/preinstallerstarter.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -19,7 +19,9 @@
#include <e32base.h>
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
#include <apgcli.h> // for RApaLsSession
+#endif
#include <hal_data.h>
#include <hal.h>
#include <sysutil.h>
@@ -320,6 +322,7 @@
* Register 'javalauncher.exe' as the midlet application type handler
* in AppArc. If necessary unregister old handler first.
*/
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
void PreinstallerStarter::registerMidletApplicationTypeHandler()
{
_LIT(KMidpAppArcPlugin, "javalauncher.exe");
@@ -381,6 +384,7 @@
err);
}
}
+#endif
void PreinstallerStarter::RunL()
{
--- a/javamanager/javacaptain/extensionplugins/settingslistener/build/exports.inf Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/build/exports.inf Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -16,4 +16,4 @@
*/
PRJ_EXPORTS
-../inc/settingschangeeventsprovidermessages.h |../../../inc/settingschangeeventsprovidermessages.h
+../inc/settingschangeeventsprovidermessages.h |../../../inc/settingschangeeventsprovidermessages.h
--- a/javamanager/javacaptain/extensionplugins/settingslistener/build/javacaptain_ext_settingslistener.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/build/javacaptain_ext_settingslistener.pro Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
@@ -20,16 +20,10 @@
CONFIG -= qt
symbian {
- SOURCES += ../src/*.cpp ../src.s60/*.cpp
LIBS += -lcommonengine \
-lcentralrepository \
-lcenrepnotifhandler \
-ljavacomms
}
-!symbian {
- SOURCES += ../src/*.cpp ../src.linux/*.cpp
-}
-
-
include(../../../../../build/omj.pri)
--- a/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingschangeeventsprovidermessages.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingschangeeventsprovidermessages.h Fri Jul 09 16:35:45 2010 +0300
@@ -11,7 +11,8 @@
*
* Contributors:
*
-* Description: BootEventProviderMessages
+* Description: Definition of comms messages used for reporting chages in system
+* settings.
*
*/
@@ -35,21 +36,21 @@
typedef enum
{
- UNDEFINED_CHANGE = 0x00,
- MIDP_CLASS_PATH_CHANGE = 0x01,
+ UNDEFINED_CHANGE = 0x00,
+ MIDP_CLASS_PATH_CHANGE = 0x01,
} SettingsChangeEventType_t;
inline void setSettingsChangeEventMessageParams(CommsMessage& aMessage,
- const int& aChangeEventType)
+ const int& aChangeEventType)
{
aMessage.setMessageId(SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
aMessage << aChangeEventType;
}
inline void getSettingsChangeEventMessageParams(CommsMessage& aMessage,
- int& aChangeEventType)
+ int& aChangeEventType)
{
if (aMessage.getMessageId() == SETTINGS_CHANGE_EVENT_MESSAGE_ID_C)
{
@@ -59,7 +60,7 @@
{
ELOG2(EJavaCaptain, "Received Settings Change Event with wrong MessageId!: %d should be %d",
aMessage.getMessageId(), SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
- aChangeEventType = 0;
+ aChangeEventType = UNDEFINED_CHANGE;
}
}
--- a/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerextension.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerextension.h Fri Jul 09 16:35:45 2010 +0300
@@ -11,7 +11,8 @@
*
* Contributors:
*
-* Description: Sample
+* Description: Extension plugin which is used for monitoring changes in various
+* system settings.
*
*/
@@ -23,8 +24,6 @@
#include "extensionplugininterface.h"
#include "settingslistenerinterface.h"
-using namespace java::comms;
-
namespace java
{
namespace captain
--- a/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerinterface.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerinterface.h Fri Jul 09 16:35:45 2010 +0300
@@ -11,7 +11,8 @@
*
* Contributors:
*
-* Description: ExtensionPluginInterface
+* Description: Definition of interface, which is used for listening changes in
+* in system settings.
*
*/
@@ -24,15 +25,13 @@
namespace captain
{
-class CoreInterface;
-
class SettingsListenerInterface
{
public:
virtual ~SettingsListenerInterface() {}
- virtual void StartListening() = 0;
- virtual void StopListening() = 0;
+ virtual void startListening() = 0;
+ virtual void stopListening() = 0;
};
--- a/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -15,6 +15,9 @@
*
*/
+#include <e32base.h>
+#include <centralrepository.h>
+
#include "coreinterface.h"
#include "eventconsumerinterface.h"
@@ -22,160 +25,91 @@
#include "cenreplistener.h"
#include "settingschangeeventsprovidermessages.h"
-#include <e32base.h>
-#include <centralrepository.h>
-
namespace java
{
namespace captain
{
- // General listener used as a base value indicating that whole repository is being
- // listened instead of individual key.
- CenRepListener::CenRepListener() : mKeyType(CenRepListener::GENERAL_LISTENER)
- {
- JELOG2(EJavaCaptain);
- }
+// General listener used as a base value indicating that whole repository is being
+// listened instead of individual key.
+CenRepListener::CenRepListener() : mKeyType(CenRepListener::GENERAL_LISTENER)
+{
+}
- CenRepListener::~CenRepListener()
- {
- JELOG2(EJavaCaptain);
- Close();
- }
+CenRepListener::~CenRepListener()
+{
+ close();
+}
- void CenRepListener::Close()
+void CenRepListener::close()
+{
+ if (mNotifyHandler)
{
- JELOG2(EJavaCaptain);
- if (mNotifyHandler ) {
- mNotifyHandler->StopListening();
- delete mNotifyHandler;
- mNotifyHandler = 0;
- }
- if ( mCenRepSession ) {
- delete mCenRepSession;
- mCenRepSession = 0;
- }
+ mNotifyHandler->StopListening();
+ delete mNotifyHandler;
+ mNotifyHandler = 0;
}
-
- CenRepListener* CenRepListener::NewLC(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType)
+ if (mCenRepSession)
{
- JELOG2(EJavaCaptain);
- CenRepListener* crListener = new (ELeave) CenRepListener();
- CleanupStack::PushL(crListener);
- crListener->ConstructL(aCore, aRepoId, aKeyId, aKeyType);
- return (crListener);
- }
-
- CenRepListener* CenRepListener::NewL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType)
- {
- JELOG2(EJavaCaptain);
- CenRepListener* crListener = CenRepListener::NewLC(aCore, aRepoId, aKeyId, aKeyType);
- CleanupStack::Pop(crListener);
- return (crListener);
+ delete mCenRepSession;
+ mCenRepSession = 0;
}
+}
- CenRepListener* CenRepListener::NewLC(CoreInterface* aCore, TUid aRepoId)
- {
- JELOG2(EJavaCaptain);
- CenRepListener* crListener = new (ELeave) CenRepListener();
- CleanupStack::PushL(crListener);
- crListener->ConstructL(aCore, aRepoId);
- return (crListener);
- }
+CenRepListener* CenRepListener::NewL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
+ CCenRepNotifyHandler::TCenRepKeyType aKeyType)
+{
+ CenRepListener* crListener = new(ELeave) CenRepListener();
+ CleanupStack::PushL(crListener);
+ crListener->ConstructL(aCore, aRepoId, aKeyId, aKeyType);
+ CleanupStack::Pop(crListener);
+ return (crListener);
+}
- CenRepListener* CenRepListener::NewL(CoreInterface* aCore, TUid aRepoId)
- {
- JELOG2(EJavaCaptain);
- CenRepListener* crListener = CenRepListener::NewLC(aCore, aRepoId);
- CleanupStack::Pop(crListener);
- return (crListener);
- }
+void CenRepListener::ConstructL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
+ CCenRepNotifyHandler::TCenRepKeyType aKeyType)
+{
+ mCore = aCore;
+ mRepoId = aRepoId;
+ mKeyType = aKeyType;
+ mCenRepSession = CRepository::NewL(mRepoId);
+ mNotifyHandler = CCenRepNotifyHandler::NewL(*this, *mCenRepSession,
+ aKeyType, aKeyId);
+ mNotifyHandler->StartListeningL();
+}
- void CenRepListener::ConstructL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType)
+void CenRepListener::HandleNotifyString(TUint32 aKeyId, const TDesC16& /*aNewValue*/)
+{
+ if (KCRUidJavaRuntime == mRepoId && KJavaRuntimeMIDPClasspath == aKeyId)
{
- JELOG2(EJavaCaptain);
- mCore = aCore;
- mRepoId = aRepoId;
- mKeyType = aKeyType;
- mCenRepSession = CRepository::NewL(mRepoId);
- mNotifyHandler = CCenRepNotifyHandler::NewL(*this, *mCenRepSession,
- aKeyType, aKeyId);
- mNotifyHandler->StartListeningL();
+ ILOG(EJavaCaptain, "CenRepListener::HandleNotifyString: change notified "
+ "in key KJavaRuntimeMIDPClasspath");
+ dispatchEvent(SETTINGS_CHANGE_EVENT_PROVIDER,
+ MIDP_CLASS_PATH_CHANGE);
}
-
- void CenRepListener::ConstructL(CoreInterface* aCore, TUid aRepoId)
+ else
{
- JELOG2(EJavaCaptain);
- mCore = aCore;
- mRepoId = aRepoId;
- mCenRepSession = CRepository::NewL(mRepoId);
- mNotifyHandler = CCenRepNotifyHandler::NewL(*this, *mCenRepSession);
- mNotifyHandler->StartListeningL();
- }
-
- void CenRepListener::HandleNotifyInt(TUint32 aKeyId, TInt /*aNewValue*/)
- {
- JELOG2(EJavaCaptain);
- WLOG1(EJavaCaptain, "Change in Unrecognised cenrep TInt key noticed! "
+ WLOG1(EJavaCaptain, "Change in Unrecognised cenrep string key noticed! "
"CR Key= %0x", aKeyId);
}
-
- void CenRepListener::HandleNotifyReal( TUint32 aKeyId, TReal /*aNewValue*/ )
- {
- JELOG2(EJavaCaptain);
- WLOG1(EJavaCaptain, "Change in Unrecognised cenrep TReal key noticed! "
- "CR Key= %0x", aKeyId);
- }
+}
- void CenRepListener::HandleNotifyBinary( TUint32 aKeyId, const TDesC8& /*aNewValue*/ )
- {
- JELOG2(EJavaCaptain);
- WLOG1(EJavaCaptain, "Change in Unrecognised cenrep Binary key noticed! "
- "CR Key= %0x", aKeyId);
- }
-
- void CenRepListener::HandleNotifyGeneric(TUint32 aKeyId)
- {
- JELOG2(EJavaCaptain);
- WLOG1(EJavaCaptain, "Change in Unrecognised cenrep key noticed! "
- "CR Key= %0x", aKeyId);
- }
+void CenRepListener::HandleNotifyError(TUint32 aKeyId, TInt aError, CCenRepNotifyHandler* /* aHandler */)
+{
+ ELOG2(EJavaCaptain, "Error (code: %d) occured when listening changes on "
+ "Cenrep key (Key ID: %0x). Listening stopped!", aError, aKeyId);
+ close();
+}
- void CenRepListener::HandleNotifyString( TUint32 aKeyId, const TDesC16& /*aNewValue*/ )
- {
- JELOG2(EJavaCaptain);
- if ( KCRUidJavaRuntime == mRepoId && KJavaRuntimeMIDPClasspath == aKeyId ) {
- ILOG(EJavaCaptain, "CenRepListener::HandleNotifyString: change notified "
- "in key KJavaRuntimeMIDPClasspath");
- dispatchEvent(SETTINGS_CHANGE_EVENT_PROVIDER,
- MIDP_CLASS_PATH_CHANGE);
- } else {
- WLOG1(EJavaCaptain, "Change in Unrecognised cenrep string key noticed! "
- "CR Key= %0x", aKeyId);
- }
- }
-
- void CenRepListener::HandleNotifyError(TUint32 aKeyId, TInt error, CCenRepNotifyHandler* /* aHandler */)
- {
- JELOG2(EJavaCaptain);
- ELOG2(EJavaCaptain, "Error (code: %d) occured when listening changes on "
- "Cenrep key (Key ID: %0x). Listening stopped!", error, aKeyId);
- Close();
- }
-
- void CenRepListener::dispatchEvent(const std::string& aEvent,
- const SettingsChangeEventType_t& aType) const
- {
- JELOG2(EJavaCaptain);
- ILOG2(EJavaCaptain, "CenRepListener::dispatchEvent: dispatching event=%s "
- "type=%d", aEvent.c_str(), aType);
- CommsMessage eventMsg;
- setSettingsChangeEventMessageParams(eventMsg, aType);
- mCore->getEventDispatcher()->event(aEvent, eventMsg);
- }
+void CenRepListener::dispatchEvent(const std::string& aEvent,
+ const SettingsChangeEventType_t& aType) const
+{
+ ILOG2(EJavaCaptain, "CenRepListener::dispatchEvent: dispatching event=%s "
+ "type=%d", aEvent.c_str(), aType);
+ CommsMessage eventMsg;
+ setSettingsChangeEventMessageParams(eventMsg, aType);
+ mCore->getEventDispatcher()->event(aEvent, eventMsg);
+}
} // namespace captain
} // namespace java
--- a/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.h Fri Jul 09 16:35:45 2010 +0300
@@ -16,58 +16,39 @@
*
*/
-#ifndef CENREP_LISTENER_H
-#define CENREP_LISTENER_H
+#ifndef CENREPLISTENER_H
+#define CENREPLISTENER_H
+
+#include <e32std.h>
+#include <cenrepnotifyhandler.h>
#include "javaosheaders.h"
#include "settingschangeeventsprovidermessages.h"
-
-#include <e32std.h>
-#include <cenrepnotifyhandler.h>
+#include "javaruntimeprivatecrkeys.h"
namespace java
{
namespace captain
{
-/**
- * Java Runtime environment Central Repository UID
- */
-const TUid KCRUidJavaRuntime = { 0x10282DFD };
-
-/**
- * Indicates classpath for MIDP runtimes. This key value is generated
- * from the values defined by extension libraries.
- */
-const TUint32 KJavaRuntimeMIDPClasspath = 0x00000001;
-
-
class CoreInterface;
OS_NONSHARABLE_CLASS(CenRepListener) :
-public CBase, public MCenRepNotifyHandlerCallback
+ public CBase, public MCenRepNotifyHandlerCallback
{
public:
enum TListenerType {GENERAL_LISTENER = -1};
- static CenRepListener* NewLC(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType);
static CenRepListener* NewL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType);
- static CenRepListener* NewLC(CoreInterface* aCore, TUid aRepoId);
- static CenRepListener* NewL(CoreInterface* aCore, TUid aRepoId);
+ CCenRepNotifyHandler::TCenRepKeyType aKeyType);
virtual ~CenRepListener();
- // MCenRepNotifyHandlerCallback
+ // MCenRepNotifyHandlerCallback (only partial implementation needed here for now)
// These handler methods must know what to do in each case, i.e
// how to handle the change in each particular key.
- virtual void HandleNotifyString( TUint32 aKeyId, const TDesC16& aNewValue );
- virtual void HandleNotifyInt(TUint32 aKeyId, TInt aNewValue);
- virtual void HandleNotifyReal( TUint32 aId, TReal aNewValue );
- virtual void HandleNotifyBinary( TUint32 aId, const TDesC8& aNewValue );
- virtual void HandleNotifyGeneric(TUint32 aKeyId);
- virtual void HandleNotifyError(TUint32 aKeyId, TInt error,
+ virtual void HandleNotifyString(TUint32 aKeyId, const TDesC16& aNewValue);
+ virtual void HandleNotifyError(TUint32 aKeyId, TInt aError,
CCenRepNotifyHandler* aHandler);
protected:
CenRepListener();
@@ -76,10 +57,9 @@
const SettingsChangeEventType_t& aType) const;
private:
- void ConstructL(CoreInterface* aCore, TUid aRepoId);
void ConstructL(CoreInterface* aCore, TUid aRepoId, TUint32 aKeyId,
CCenRepNotifyHandler::TCenRepKeyType aKeyType);
- void Close();
+ void close();
TInt mKeyType;
CoreInterface* mCore;
TUid mRepoId;
@@ -90,5 +70,5 @@
} // namespace captain
} // namespace java
-#endif // CENREP_LISTENER_H
+#endif // CENREPLISTENER_H
--- a/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -24,74 +24,62 @@
namespace captain
{
- SettingsListenerImpl::SettingsListenerImpl(CoreInterface* aCore) :
+SettingsListenerImpl::SettingsListenerImpl(CoreInterface* aCore) :
mCore(aCore)
- {
- JELOG2(EJavaCaptain);
-
- }
-
- SettingsListenerImpl::~SettingsListenerImpl()
- {
- JELOG2(EJavaCaptain);
- cleanUp();
- }
+{
+}
- void SettingsListenerImpl::StartListening()
- {
- JELOG2(EJavaCaptain);
- // All "listeners" must be created&started here.
+SettingsListenerImpl::~SettingsListenerImpl()
+{
+ cleanUp();
+}
- // Currently there is just this one CenRep key to be listened
- std::auto_ptr<CenRepListener> cRMidpClassPathChangeListener;
- int error = createCenRepKeyListener(KCRUidJavaRuntime, KJavaRuntimeMIDPClasspath,
- CCenRepNotifyHandler::EStringKey,
- cRMidpClassPathChangeListener);
- if ( KErrNone == error ) {
- mCenRepListeners.push_back(cRMidpClassPathChangeListener.release());
- } else {
- ELOG4(EJavaCaptain, "Error (code: %d) occured when starting "
- "CenRepListener (repo=%0x, key=%0x, keytype=%d)",
- error, KCRUidJavaRuntime.iUid, KJavaRuntimeMIDPClasspath,
- CCenRepNotifyHandler::EStringKey);
- }
- }
+void SettingsListenerImpl::startListening()
+{
+ // All "listeners" must be created&started here.
- void SettingsListenerImpl::StopListening()
+ // Currently there is just this one CenRep key to be listened
+ TInt error = KErrNone;
+ CenRepListener* crMidpClassPathChangeListener =
+ createCenRepKeyListener(KCRUidJavaRuntime, KJavaRuntimeMIDPClasspath,
+ CCenRepNotifyHandler::EStringKey, error);
+ if (crMidpClassPathChangeListener)
{
- JELOG2(EJavaCaptain);
- cleanUp();
+ mCenRepListeners.push_back(crMidpClassPathChangeListener);
}
-
- int SettingsListenerImpl::createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType,
- std::auto_ptr<CenRepListener>& aListener)
- {
- JELOG2(EJavaCaptain);
- TRAPD( error, aListener.reset(CenRepListener::NewL(mCore, aRepoId, aKeyId, aKeyType)) );
- return error;
- }
-
- int SettingsListenerImpl::createCenRepListener(TUid aRepoId, CenRepListener*& aListener)
+ else
{
- JELOG2(EJavaCaptain);
- TRAPD( error, aListener = CenRepListener::NewL(mCore, aRepoId));
- return error;
+ ELOG4(EJavaCaptain, "Error (code: %d) occured when starting "
+ "CenRepListener (repo=%0x, key=%0x, keytype=%d)",
+ error, KCRUidJavaRuntime.iUid, KJavaRuntimeMIDPClasspath,
+ CCenRepNotifyHandler::EStringKey);
}
+}
- // Clean up owned resources
- void SettingsListenerImpl::cleanUp()
+void SettingsListenerImpl::stopListening()
+{
+ cleanUp();
+}
+
+CenRepListener* SettingsListenerImpl::createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId,
+ CCenRepNotifyHandler::TCenRepKeyType aKeyType, TInt& aErrorCode)
+{
+ CenRepListener* listener = NULL;
+ TRAP(aErrorCode, listener = CenRepListener::NewL(mCore, aRepoId, aKeyId, aKeyType));
+ return listener; // Possible error propagated as a function parameter
+}
+
+// Clean up owned resources
+void SettingsListenerImpl::cleanUp()
+{
+ for (crListeners_t::iterator listenersIter = mCenRepListeners.begin();
+ listenersIter != mCenRepListeners.end(); ++listenersIter)
{
- JELOG2(EJavaCaptain);
-
- for ( crListeners_t::iterator listenersIter = mCenRepListeners.begin();
- listenersIter != mCenRepListeners.end(); ++listenersIter )
- {
- delete *listenersIter;
- *listenersIter = 0;
- }
- mCenRepListeners.clear();
+ delete *listenersIter;
+ *listenersIter = 0;
}
+ mCenRepListeners.clear();
+}
} // namespace captain
} // namespace java
--- a/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.h Fri Jul 09 16:35:45 2010 +0300
@@ -20,14 +20,13 @@
#ifndef SETTINGSLISTENERIMPL_H
#define SETTINGSLISTENERIMPL_H
-#include "javaosheaders.h"
-
-#include "settingslistenerinterface.h"
-
#include <vector>
#include <memory>
#include <cenrepnotifyhandler.h>
+#include "javaosheaders.h"
+#include "settingslistenerinterface.h"
+
namespace java
{
namespace captain
@@ -43,15 +42,14 @@
virtual ~SettingsListenerImpl();
// SystemSettingsChangeListenerInterface
- virtual void StartListening();
- virtual void StopListening();
+ virtual void startListening();
+ virtual void stopListening();
private:
void cleanUp();
- int createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId,
- CCenRepNotifyHandler::TCenRepKeyType aKeyType,
- std::auto_ptr<CenRepListener>& aListener);
- int createCenRepListener(TUid aRepoId, CenRepListener*& aListener);
+ CenRepListener* createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId,
+ CCenRepNotifyHandler::TCenRepKeyType aKeyType,
+ TInt& aErrorCode);
CoreInterface* mCore; // resource not owned
typedef std::vector<CenRepListener*> crListeners_t;
--- a/javamanager/javacaptain/extensionplugins/settingslistener/src/settingslistenerextension.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/settingslistener/src/settingslistenerextension.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -11,12 +11,11 @@
*
* Contributors:
*
-* Description: Sample
+* Description: Implementation for creating system settings listener plugin
*
*/
#include "logger.h"
-
#include "settingslistenerextension.h"
#include "settingslistenerimpl.h"
@@ -35,40 +34,32 @@
namespace captain
{
- SettingsListenerExtension::SettingsListenerExtension() : mCore(0), mSettingsListenerImpl(0)
+SettingsListenerExtension::SettingsListenerExtension() : mCore(0), mSettingsListenerImpl(0)
{
- JELOG2(EJavaCaptain);
- ILOG(EJavaCaptain, "SettingsListenerExtension::SettingsListenerExtension()");
}
SettingsListenerExtension::~SettingsListenerExtension()
{
- JELOG2(EJavaCaptain);
- ILOG(EJavaCaptain, "SettingsListenerExtension::~SettingsListenerExtension()");
}
void SettingsListenerExtension::startPlugin(CoreInterface* core)
{
- JELOG2(EJavaCaptain);
- ILOG(EJavaCaptain, "SettingsListenerExtension::startPlugin()");
- if ( mSettingsListenerImpl || mCore )
+ if (mSettingsListenerImpl || mCore)
{
WLOG(EJavaCaptain, "Settingslistener plugin already running, terminating previous instance first!");
stopPlugin();
}
mCore = core;
mSettingsListenerImpl = new SettingsListenerImpl(mCore);
- mSettingsListenerImpl->StartListening();
+ mSettingsListenerImpl->startListening();
}
void SettingsListenerExtension::stopPlugin()
{
- JELOG2(EJavaCaptain);
- ILOG(EJavaCaptain, "SettingsListenerExtension::stopPlugin()");
mCore = 0;
- if ( mSettingsListenerImpl )
+ if (mSettingsListenerImpl)
{
- mSettingsListenerImpl->StopListening();
+ mSettingsListenerImpl->stopListening();
delete mSettingsListenerImpl;
mSettingsListenerImpl = 0;
}
--- a/javamanager/javacaptain/inc.s60/tickerprovider.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/inc.s60/tickerprovider.h Fri Jul 09 16:35:45 2010 +0300
@@ -43,7 +43,7 @@
virtual void cancel();
// Helpers
-// virtual long long getCurrentJavaTime();
+ virtual long long getPlatformCurrentJavaTime();
protected:
// CActive
--- a/javamanager/javacaptain/inc/settingschangeeventsprovidermessages.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: BootEventProviderMessages
-*
-*/
-
-#ifndef SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
-#define SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
-
-#include "commsmessage.h"
-#include "logger.h"
-
-namespace java
-{
-namespace captain
-{
-
-using namespace java::util;
-using namespace java::comms;
-
-const int SETTINGS_CHANGE_EVENT_MESSAGE_ID_C = 1;
-
-const char* const SETTINGS_CHANGE_EVENT_PROVIDER = "settingslistener";
-
-typedef enum
-{
- UNDEFINED_CHANGE = 0x00,
- MIDP_CLASS_PATH_CHANGE = 0x01,
-
-} SettingsChangeEventType_t;
-
-
-inline void setSettingsChangeEventMessageParams(CommsMessage& aMessage,
- const int& aChangeEventType)
-{
- aMessage.setMessageId(SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
- aMessage << aChangeEventType;
-}
-
-inline void getSettingsChangeEventMessageParams(CommsMessage& aMessage,
- int& aChangeEventType)
-{
- if (aMessage.getMessageId() == SETTINGS_CHANGE_EVENT_MESSAGE_ID_C)
- {
- aMessage >> aChangeEventType;
- }
- else
- {
- ELOG2(EJavaCaptain, "Received Settings Change Event with wrong MessageId!: %d should be %d",
- aMessage.getMessageId(), SETTINGS_CHANGE_EVENT_MESSAGE_ID_C);
- aChangeEventType = 0;
- }
-}
-
-} // namespace captain
-} // namespace java
-
-#endif // SETTINGSCHANGEEVENTSPROVIDERMESSAGES_H
--- a/javamanager/javacaptain/src.s60/tickerprovider.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/src.s60/tickerprovider.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -91,8 +91,8 @@
}
mNextTickAt = 0LL;
}
-/*
-long long TickerProvider::getCurrentJavaTime()
+
+long long TickerProvider::getPlatformCurrentJavaTime()
{
JELOG2(EJavaCaptain);
TTime currentTime;
@@ -101,7 +101,7 @@
// Current time - javaEpoc && uSeconds -> mSeconds
return (currentTime.Int64()- TTime(TDateTime(1970,EJanuary,0,0,0,0,0)).Int64()) / 1000LL;
}
-*/
+
void TickerProvider::RunL()
{
JELOG2(EJavaCaptain);
--- a/javamanager/javacaptain/src/tickerproviderinterface.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/src/tickerproviderinterface.h Fri Jul 09 16:35:45 2010 +0300
@@ -64,6 +64,19 @@
// Helpers
/**
* Returns milliseconds from EPOCH.
+ * This can be overridden with the platform specific implementation. Use case for
+ * overriding is that in some platforms gettimeofday implementation can't handle
+ * correctly times after 2038.
+ * @param[in] -
+ * @return - milliseconds from EPOCH in success, -1 if fails
+ */
+ virtual long long getPlatformCurrentJavaTime()
+ {
+ return -1LL;
+ }
+
+ /**
+ * Returns milliseconds from EPOCH.
* @param[in] -
* @return - milliseconds from EPOCH in success, -1 if fails
*/
@@ -73,7 +86,8 @@
int err = gettimeofday(&tim, NULL);
if (-1 == err)
{
- return -1LL;
+ WLOG(EJavaCaptain, "getCurrentJavaTime: gettimeofday returned -1");
+ return getPlatformCurrentJavaTime();
}
return (tim.tv_sec * 1000LL) +
--- a/javamanager/javacaptain/systemams/src/certificatesmanager.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javacaptain/systemams/src/certificatesmanager.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -231,7 +231,7 @@
LazyInit();
iCurrentCertInfo = getTrustRootL(aId);
RArray<TUid> applications;
- applications.Append(KMidletInstallApplicabilityUid);
+ applications.AppendL(KMidletInstallApplicabilityUid);
iCertStore->SetApplicability(*iCurrentCertInfo, applications, iStatus);
User::WaitForRequest(iStatus);
if (iStatus.Int() == KErrNone)
--- a/javamanager/javainstaller/appinstuiplugin/src/javainstalllauncher.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/appinstuiplugin/src/javainstalllauncher.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -228,7 +228,7 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- iHandlesToClose.Append(rJavaInstaller);
+ iHandlesToClose.AppendL(rJavaInstaller);
}
void CJavaInstallLauncher::SilentInstallL(RFile& aFile,
@@ -410,7 +410,7 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- iHandlesToClose.Append(rJavaInstaller);
+ iHandlesToClose.AppendL(rJavaInstaller);
}
void CJavaInstallLauncher::UninstallL(const TUid& aUid, const TDesC8&, /*aMIME*/
@@ -451,7 +451,7 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- iHandlesToClose.Append(rJavaInstaller);
+ iHandlesToClose.AppendL(rJavaInstaller);
}
void CJavaInstallLauncher::SilentUninstallL(const TUid& aUid, const TDesC8&, /*aMIME*/
@@ -539,7 +539,7 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- iHandlesToClose.Append(rJavaInstaller);
+ iHandlesToClose.AppendL(rJavaInstaller);
}
TBool CJavaInstallLauncher::IsAppShellUpdate()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/build/bld.inf Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information file for Java Icon Size Notifier Plugin
+*
+*/
+
+PRJ_MMPFILES
+javaiconsizenotifplugin.mmp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/build/javaiconsizenotifplugin.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Java notifier ecom plugin used to access the UI env
+* from non UI context.
+*/
+
+
+#include <platform_paths.hrh>
+
+
+TARGET javaiconsizenotifplugin.dll
+TARGETTYPE PLUGIN
+UID 0x10009D8D 0x101FD689
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+
+PAGED
+
+APP_LAYER_SYSTEMINCLUDE
+
+START RESOURCE ../data/javaiconsizenotifplugin.rss
+TARGET javaiconsizenotifplugin.rsc
+END
+
+SOURCEPATH ../src
+SOURCE iconsizenotifier.cpp
+
+USERINCLUDE .
+USERINCLUDE ../inc
+USERINCLUDE ../../../../inc
+
+LIBRARY euser.lib
+LIBRARY eiksrv.lib // MEikSrvNotifierBase2
+LIBRARY cdlengine.lib // AknLayoutScalable_Avkon
+LIBRARY aknlayout2scalable.lib // TAknWindowComponentLayout
+LIBRARY avkon.lib // TAknLayoutRect
+LIBRARY eikcore.lib // TAknLayoutRect
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/data/javaiconsizenotifplugin.rss Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: ECOM resource definition
+*
+*/
+
+#include <ecom/registryinfov2.rh>
+#include <uikon.hrh>
+
+RESOURCE REGISTRY_INFO r_registry
+ {
+ resource_format_version = RESOURCE_FORMAT_VERSION_2;
+ dll_uid = 0x101FD689;
+ interfaces =
+ {
+ INTERFACE_INFO
+ {
+ interface_uid = KUikonUidPluginInterfaceNotifiers;
+ implementations =
+ {
+ IMPLEMENTATION_INFO
+ {
+ implementation_uid = 0x101FD68A;
+ version_no = 1;
+ display_name = "JavaIconSizeNotifPlugin";
+ default_data = "";
+ opaque_data = "0";
+ rom_only = 0; // This is not a ROM only plugin
+ }
+ };
+ }
+ };
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/inc/iconsizenotifier.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,55 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef ICONSIZENOTIFIER_H
+#define ICONSIZENOTIFIER_H
+
+
+#include <eiknotapi.h> // MEikSrvNotifierBase2
+
+
+const TInt KIdIconSizeNotifPlugin = 0x101FD68B;
+const TUid KUidIconSizeNotifPlugin = {KIdIconSizeNotifPlugin};
+
+
+class CIconSizeNotifier : public CBase, public MEikSrvNotifierBase2
+{
+public:
+ static CIconSizeNotifier* NewLC();
+ ~CIconSizeNotifier();
+
+private:
+ CIconSizeNotifier();
+ void ConstructL();
+
+// From MEikSrvNotifierBase2
+public:
+ void Release();
+ TNotifierInfo RegisterL();
+ TNotifierInfo Info() const;
+ void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ TPtrC8 StartL(const TDesC8& aBuffer);
+ void Cancel();
+ TPtrC8 UpdateL(const TDesC8& aBuffer);
+ void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage);
+ TInt NotifierCapabilites();
+private:
+ TNotifierInfo iInfo;
+};
+
+#endif // ICONSIZENOTIFIER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/inc/iconsizeutils.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef ICONSIZEUTILS_H
+#define ICONSIZEUTILS_H
+
+#include <aknlayoutscalable_avkon.cdl.h>
+#include <AknUtils.h>
+
+/**
+ * Fallback value of expected size of raster icons in Menu & Home Screen.
+ * Copy of KJavaIconWidth in Menu's mcsmenuiconutility.cpp.
+ */
+const TInt KIconInMenuFallbackSize = 88;
+
+/**
+ * Fallback value of expected size of raster icons in App Mgr.
+ */
+const TInt KIconInAppMgrFallbackSize = 46;
+
+/**
+ * Utility class packing all Java icon sizes needed troughout the system.
+ */
+class TIconSizes
+{
+public:
+ TSize iMenuIconSize;
+ TSize iAppMgrIconSize;
+};
+
+/**
+ * Utility class dealing with Java icon sizes.
+ */
+class IconSizeUtils
+{
+public:
+ /**
+ * Helper for getting the ideal sizes for Java raster icons.
+ * Accesses Akn layouts, therefore a Ui context is required
+ * (CEikonEnv present in the calling thread).
+ * This function has been inlined so that the Java App Mgr plugin
+ * does not have to statically link against the ecom plugin dll.
+ */
+ static TIconSizes GetIconSizes()
+ {
+ TIconSizes res;
+
+ // Menu & Home Screen icons size.
+ // No api to get it so just use the fallback value for now.
+ res.iMenuIconSize = TSize(KIconInMenuFallbackSize, KIconInMenuFallbackSize);
+
+ // App manager icon size.
+ // list_double_large_graphic_pane_vc_g1 = the icon of the app mgr list in landscape
+ TAknLayoutRect layoutRect;
+ layoutRect.LayoutRect(TRect(),
+ AknLayoutScalable_Avkon::list_double_large_graphic_pane_vc_g1(0).LayoutLine());
+ TRect rect(layoutRect.Rect());
+ TInt w(rect.Width());
+ TInt h(rect.Height());
+ if (w < 0 || h < 0)
+ {
+ w = KIconInAppMgrFallbackSize;
+ h = KIconInAppMgrFallbackSize;
+ }
+ res.iAppMgrIconSize = TSize(w, h);
+
+ return res;
+ }
+};
+
+#endif // ICONSIZEUTILS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/iconsizenotifplugin/src/iconsizenotifier.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <e32cmn.h>
+#include <eikenv.h>
+#include <bautils.h>
+#include <ecom/implementationproxy.h>
+
+#include "iconsizenotifier.h"
+#include "iconsizeutils.h"
+
+const TUid KUidScreenOutput = { 0x10009D48 };
+
+CIconSizeNotifier* CIconSizeNotifier::NewLC()
+{
+ CIconSizeNotifier* self = new(ELeave) CIconSizeNotifier();
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ return self;
+}
+
+CIconSizeNotifier::~CIconSizeNotifier()
+{
+}
+
+CIconSizeNotifier::CIconSizeNotifier()
+{
+}
+
+void CIconSizeNotifier::ConstructL()
+{
+}
+
+void CIconSizeNotifier::Release()
+{
+ delete this;
+}
+
+CIconSizeNotifier::TNotifierInfo CIconSizeNotifier::RegisterL()
+{
+ iInfo.iUid = KUidIconSizeNotifPlugin;
+ iInfo.iChannel = KUidScreenOutput;
+ iInfo.iPriority = ENotifierPriorityHigh;
+ return iInfo;
+}
+
+CIconSizeNotifier::TNotifierInfo CIconSizeNotifier::Info() const
+{
+ return iInfo;
+}
+
+void CIconSizeNotifier::StartL(const TDesC8& /*aBuffer*/, TInt aReplySlot, const RMessagePtr2& aMessage)
+{
+ TPckgBuf<TIconSizes> res(IconSizeUtils::GetIconSizes());
+ aMessage.WriteL(aReplySlot, res);
+ aMessage.Complete(KErrNone);
+}
+
+TPtrC8 CIconSizeNotifier::StartL(const TDesC8& /*aBuffer*/)
+{
+ return KNullDesC8();
+}
+
+void CIconSizeNotifier::Cancel()
+{
+}
+
+TPtrC8 CIconSizeNotifier::UpdateL(const TDesC8& /*aBuffer*/)
+{
+ return KNullDesC8();
+}
+
+void CIconSizeNotifier::UpdateL(const TDesC8& /*aBuffer*/, TInt /*aReplySlot*/, const RMessagePtr2& aMessage)
+{
+ aMessage.Complete(KErrNotSupported);
+}
+
+void CreateNotifiersL(CArrayPtrFlat<MEikSrvNotifierBase2>& aNotifiers)
+{
+ CIconSizeNotifier* notifier1 = CIconSizeNotifier::NewLC();
+ aNotifiers.AppendL(notifier1);
+ CleanupStack::Pop(notifier1);
+}
+
+CArrayPtr<MEikSrvNotifierBase2>* NotifierArray()
+{
+ CArrayPtrFlat<MEikSrvNotifierBase2>* notifiers = new CArrayPtrFlat<MEikSrvNotifierBase2>(1);
+ if (notifiers)
+ {
+ TRAPD(err, CreateNotifiersL(*notifiers));
+ if (err)
+ {
+ TInt count = notifiers->Count();
+ while (count--)
+ {
+ (*notifiers)[count]->Release();
+ }
+ delete notifiers;
+ notifiers = NULL;
+ }
+ }
+ return notifiers;
+}
+
+TInt CIconSizeNotifier::NotifierCapabilites()
+{
+ return ENoSpecialCapabilities;
+}
+
+// ECom plugin entry point
+const TImplementationProxy ImplementationTable[] =
+{
+ IMPLEMENTATION_PROXY_ENTRY(0x101FD68A, NotifierArray)
+};
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+{
+ aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+ return ImplementationTable;
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installcopier/build/javainstallcopier.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=javainstallcopier
+CONFIG += omj no_icon stl
+CONFIG -= qt
+
+symbian {
+ TARGET.UID2 = 0x20031612
+ TARGET.UID3 = 0x20031612
+
+ TARGET.CAPABILITY = AllFiles
+
+ LIBS += -lefsrv -lcharconv
+}
+
+include(../../../../build/omj.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installcopier/src/javainstallcopier.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+* JavaInstallCopier.exe is a utility for copying Java installation
+* files from other processes private data cages to JavaInstaller's
+* private data cage. JavaSifPlugin calls JavaInstallCopier if
+* installation is started from a file which resides in a private
+* data cage which JavaInstaller cannot access.
+*
+*/
+
+
+#ifdef __SYMBIAN32__
+#include <f32file.h>
+#include <utf.h>
+#endif // __SYMBIAN32__
+
+#include "exceptionbase.h"
+#include "javaoslayer.h"
+#include "logger.h"
+#include "runtimeexception.h"
+
+using namespace java::runtime;
+using namespace java::util;
+
+int isCopyAllowed()
+{
+ int result = 0;
+#ifdef __SYMBIAN32__
+ // Only SifServer (0x10285BCB) is allowed to launch JavaInstallCopier.
+ TSecureId creatorSecId(User::CreatorSecureId());
+ if (0x10285BCB != creatorSecId.iId)
+ {
+ ELOG1(EJavaInstaller,
+ "INSTALLCOPIER: Process 0x%x is not allowed to "
+ "launch JavaInstallCopier", creatorSecId.iId);
+ result = KErrPermissionDenied;
+ }
+#endif // __SYMBIAN32__
+ return result;
+}
+
+int copyToInstallerDir(int argc, char *argv[])
+{
+ int result = 0;
+
+#ifdef __SYMBIAN32__
+ RFs rfs;
+ result = rfs.Connect();
+ if (KErrNone != result)
+ {
+ ELOG1(EJavaInstaller,
+ "INSTALLCOPIER: Connecting to RFs failed, err=%d", result);
+ return result;
+ }
+
+ CFileMan* fm = NULL;
+ TRAP(result, fm = CFileMan::NewL(rfs));
+ if (KErrNone != result)
+ {
+ ELOG1(EJavaInstaller,
+ "INSTALLCOPIER: Creating CFileMan failed, err=%d", result);
+ return result;
+ }
+
+ _LIT(KJavaInstallerTmp, "\\private\\102033E6\\installer\\tmp\\");
+ for (int i = 1; i < argc && KErrNone == result; i++)
+ {
+ TPtrC8 srcPtr((const TText8*)argv[i]);
+ TFileName srcPath;
+ CnvUtfConverter::ConvertToUnicodeFromUtf8(srcPath, srcPtr);
+ // Get the drive from the srcPath...
+ TParse fp;
+ rfs.Parse(srcPath, fp);
+ // ...and prefix it to KJavaInstallerTmp path.
+ TFileName dstPath = fp.Drive();
+ dstPath.Append(KJavaInstallerTmp);
+
+ result = fm->Copy(srcPath, dstPath, CFileMan::ERecurse|CFileMan::EOverWrite);
+
+ std::wstring srcWs((wchar_t*)srcPath.Ptr(), srcPath.Length());
+ std::wstring dstWs((wchar_t*)dstPath.Ptr(), dstPath.Length());
+ if (KErrNone == result)
+ {
+ ILOG2(EJavaInstaller, "INSTALLCOPIER: Copied %S to %S",
+ srcWs.c_str(), dstWs.c_str());
+ }
+ else
+ {
+ ELOG3(EJavaInstaller,
+ "INSTALLCOPIER: Copying %S to %S failed, err=%d",
+ srcWs.c_str(), dstWs.c_str(), result);
+ }
+ }
+
+ delete fm;
+ fm = NULL;
+ rfs.Close();
+#else // __SYMBIAN32__
+ for (int i = 1; i < argc && result == 0; i++)
+ {
+ WLOG1(EJavaInstaller, "INSTALLCOPIER: Ignored %s", argv[i]);
+ }
+#endif // __SYMBIAN32__
+
+ return result;
+}
+
+int main(int argc, char *argv[])
+{
+ //ILOG(EJavaInstaller, "INSTALLCOPIER main()");
+ JavaOsLayer::startUpTrace("INSTALLCOPIER main() start", -1, -1);
+
+ int result = 0;
+ try
+ {
+ result = isCopyAllowed();
+ if (0 == result)
+ {
+ result = copyToInstallerDir(argc, argv);
+ }
+ }
+ catch (RuntimeException& e)
+ {
+ ELOG1(EJavaInstaller, "INSTALLCOPIER main() RuntimeException caught: %s",
+ e.toString().c_str());
+ }
+ catch (ExceptionBase& e)
+ {
+ ELOG1(EJavaInstaller, "INSTALLCOPIER main() ExceptionBase caught: %s",
+ e.toString().c_str());
+ }
+ catch (std::exception& e)
+ {
+ ELOG1(EJavaInstaller, "INSTALLCOPIER main() Exception %s caught", e.what());
+ }
+
+ //ILOG1(EJavaInstaller, "INSTALLCOPIER main() exit %d", result);
+ JavaOsLayer::startUpTrace("INSTALLCOPIER main() end", -1, -1);
+ return result;
+}
--- a/javamanager/javainstaller/installer/build/javainstaller.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/build/javainstaller.pro Fri Jul 09 16:35:45 2010 +0300
@@ -37,7 +37,8 @@
INCLUDEPATH += ../src.s60/applicationregistrator \
../src.s60/iconconverter \
../src.s60/jadjarmatcher \
- ../src.s60/utils
+ ../src.s60/utils \
+ ../../iconsizenotifplugin/inc
SOURCES += ../src.s60/applicationregistrator/applicationregistrator.cpp \
../src.s60/applicationregistrator/sifnotifier.cpp \
@@ -53,7 +54,7 @@
LIBS += -lapgrfx -lbafl -lcentralrepository -lcharconv -lefsrv -lestor \
-lezip -lfbscli -limageconversion -lmsgs \
-lsysutil -lplatformenv -lws32 -lapparc -lcentralrepository \
- -lhal -lcaf -lcafutils
+ -lhal -lcaf -lcafutils -lbitmaptransforms
contains(PROJECT_DEFINES,RD_JAVA_S60_50_REL2) {
LIBS += -lmcsmenu
@@ -61,11 +62,7 @@
contains(PROJECT_DEFINES,RD_JAVA_S60_RELEASE_10_1_ONWARDS) {
CONFIG += hb
- LIBS += -lxqservice
- }
-
- contains(PROJECT_DEFINES,RD_JAVA_USIF_NOTIFY_PROGRESS) {
- LIBS += -lsifnotification
+ LIBS += -lsifnotification -lxqservice
}
MMP_RULES += \
--- a/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -355,6 +355,8 @@
String aJarFilename,
StringBuffer aIconSuffix)
{
+ Log.log("ApplicationRegistrator.convertIcon: " + aInputIconFilename +
+ " --> " + aOutputIconFilename + ", from jar " + aJarFilename);
return _convertIcon(aInputIconFilename, aOutputIconFilename,
aJarFilename, aIconSuffix);
}
--- a/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -60,6 +60,14 @@
}
/**
+ * Returns SIF specific error category from given error id.
+ */
+ public static int getErrorCategory(int aErrorId)
+ {
+ return _getErrorCategory(aErrorId);
+ }
+
+ /**
* Launches the application view. If launching application view
* fails this method does not throw exception but produces an
* error log entry.
@@ -157,7 +165,7 @@
if (ret < 0)
{
InstallerException.internalError(
- "Creating session failed with code " + ret);
+ "Creating SIF session failed with code " + ret);
}
//Log.log("SifRegistrator session started");
iSessionHandle = ret;
@@ -176,36 +184,18 @@
*/
public void registerSuite(SuiteInfo aSuiteInfo, boolean aIsUpdate)
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
+ checkSession();
Log.log("SifRegistrator registering application suite " +
aSuiteInfo.getGlobalId());
- if (_getUsifMode() > 0)
+ // Register suite as a component.
+ registerComponent(aSuiteInfo, aIsUpdate);
+ registerLocalizedComponentName(aSuiteInfo, -1);
+ // Register applications within the component.
+ Vector apps = aSuiteInfo.getApplications();
+ for (int i = 0; i < apps.size(); i++)
{
- // USIF Phase 2 registration.
- // Register suite as a component.
- registerComponent(aSuiteInfo, aIsUpdate);
- registerLocalizedComponentName(aSuiteInfo, -1);
- // Register applications within the component.
- Vector apps = aSuiteInfo.getApplications();
- for (int i = 0; i < apps.size(); i++)
- {
- registerApplication(aSuiteInfo, i);
- }
- }
- else
- {
- // USIF Phase 1 registration.
- // Register each application in the suite.
- Vector apps = aSuiteInfo.getApplications();
- for (int i = 0; i < apps.size(); i++)
- {
- registerComponent(aSuiteInfo, i, aIsUpdate);
- registerLocalizedComponentName(aSuiteInfo, i);
- }
+ registerApplication(aSuiteInfo, i);
}
registerLocalizedProperties(aSuiteInfo);
}
@@ -221,29 +211,12 @@
*/
public void unregisterSuite(SuiteInfo aSuiteInfo)
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
+ checkSession();
Log.log("SifRegistrator unregistering application suite " +
aSuiteInfo.getGlobalId());
- if (_getUsifMode() > 0)
- {
- // USIF Phase 2 unregistration.
- // Unregister suite as a component.
- unregisterComponent(aSuiteInfo);
- }
- else
- {
- // USIF Phase 1 unregistration.
- // Unregister each application in the suite.
- Vector apps = aSuiteInfo.getApplications();
- for (int i = 0; i < apps.size(); i++)
- {
- unregisterComponent(aSuiteInfo, i);
- }
- }
+ // Unregister suite as a component.
+ unregisterComponent(aSuiteInfo);
}
/**
@@ -256,15 +229,11 @@
*/
public void commitSession()
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
-
+ checkSession();
int err = _commitSession(iSessionHandle);
if (err < 0)
{
- InstallerException.internalError("Commiting session failed with code " + err);
+ InstallerException.internalError("Commiting SIF session failed with code " + err);
}
// Current session has been closed
iSessionHandle = 0;
@@ -279,17 +248,13 @@
*/
public void rollbackSession()
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
-
+ checkSession();
int err = _rollbackSession(iSessionHandle);
// Session is closed always when rollback is called
iSessionHandle = 0;
if (err < 0)
{
- InstallerException.internalError("Rolling back the session failed with code " + err);
+ InstallerException.internalError("Rolling back SIF session failed with code " + err);
}
//Log.log("SifRegistrator session rolled back");
}
@@ -305,7 +270,6 @@
{
return;
}
-
_closeSession(iSessionHandle);
// Current session has been closed
iSessionHandle = 0;
@@ -322,11 +286,7 @@
*/
public ComponentId getComponentId(String aGlobalId)
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
-
+ checkSession();
ComponentId result = new ComponentId();
int ret = _getComponentId(iSessionHandle, aGlobalId, result);
if (-1 == ret)
@@ -354,11 +314,7 @@
*/
public ComponentId getComponentId(Uid aAppUid)
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
-
+ checkSession();
ComponentId result = new ComponentId();
int ret = _getComponentIdForApp(
iSessionHandle, ((PlatformUid)aAppUid).getIntValue(), result);
@@ -384,15 +340,12 @@
*/
public void logComponent(String aGlobalId)
{
- if (0 == iSessionHandle)
- {
- InstallerException.internalError("No valid SIF session.");
- }
-
+ checkSession();
int ret = _logComponent(iSessionHandle, aGlobalId);
if (ret < -1)
{
- Log.logError("SifRegistrator logComponent failed with code " + ret);
+ Log.logError("SifRegistrator logComponent for " + aGlobalId +
+ " failed with code " + ret);
}
}
@@ -400,120 +353,19 @@
/*** ----------------------------- PRIVATE ---------------------------- */
/**
- * Registers one Java application to S60 USIF as a component.
- * Used with USIF Phase 1.
- *
- * @param aSuiteInfo Information needed to register the application
- * @param aIndex index of the application in the suite
- * @param aIsUpdate true in case of an update, false in case of a new
- * installation
- * @throws InstallerException if registration cannot done or
- * startSession has not been called successfully
- * @see startSession
- * @see SuiteInfo
+ * Checks if SifRegistrator session has been started.
+ * @throws InstallerException if SifRegistrator session has not been started
*/
- private void registerComponent(
- SuiteInfo aSuiteInfo, int aIndex, boolean aIsUpdate)
+ private void checkSession()
{
- String globalId = aSuiteInfo.getGlobalId(aIndex);
- if (globalId == null)
- {
- Log.logWarning("SifRegistrator: Application with index " + aIndex +
- " not found from " + aSuiteInfo.getGlobalId());
- return;
- }
- ApplicationInfo appInfo =
- (ApplicationInfo)aSuiteInfo.getApplications().elementAt(aIndex);
- String suiteName = aSuiteInfo.getName();
- String vendor = aSuiteInfo.getVendor();
- String version = aSuiteInfo.getVersion().toString();
- String name = appInfo.getName();
- int uid = ((PlatformUid)appInfo.getUid()).getIntValue();
- String[] componentFiles = getComponentFiles(aSuiteInfo);
- long componentSize = aSuiteInfo.getInitialSize();
- String attrValue = aSuiteInfo.getAttributeValue("Nokia-MIDlet-Block-Uninstall");
- boolean isRemovable = !(attrValue != null && attrValue.equalsIgnoreCase("true"));
- boolean isDrmProtected = (aSuiteInfo.getContentInfo() == aSuiteInfo.CONTENT_INFO_DRM);
- boolean isOriginVerified = aSuiteInfo.isTrusted();
- String midletInfoUrl = aSuiteInfo.getAttributeValue("MIDlet-Info-URL");
- String midletDescription = aSuiteInfo.getAttributeValue("MIDlet-Description");
- String downloadUrl = aSuiteInfo.getAttributeValue("Nokia-MIDlet-Download-URL");
- ComponentId componentId = new ComponentId();
- int err = _registerComponent(
- iSessionHandle, uid,
- getScrString(suiteName), getScrString(vendor),
- getScrString(version), getScrString(name),
- getScrString(globalId), componentFiles,
- componentSize, isRemovable, isDrmProtected,
- isOriginVerified, aIsUpdate, aSuiteInfo.getMediaId(),
- getScrString(midletInfoUrl),
- getScrString(midletDescription),
- getScrString(downloadUrl),
- componentId);
- if (err < 0)
+ if (iSessionHandle == 0)
{
- InstallerException.internalError(
- "Registering component " + globalId +
- " failed with code " + err);
- }
- else
- {
- appInfo.setComponentId(componentId);
- Log.log("SifRegistrator registered component " + globalId +
- " with id " + componentId.getId());
- }
- }
-
- /**
- * Unregisters one Java application from being S60 USIF component.
- * Used with USIF Phase 1.
- *
- * @param aSuiteInfo Information needed to unregister the application,
- * @param aIndex index of the application in the suite
- * @throws InstallerException if unregistration cannot done or
- * startSession has not been called successfully
- * @see startSession
- * @see SuiteInfo
- */
- private void unregisterComponent(SuiteInfo aSuiteInfo, int aIndex)
- {
- String globalId = aSuiteInfo.getGlobalId(aIndex);
- if (globalId == null)
- {
- Log.logWarning("SifRegistrator: Application with index " + aIndex +
- " not found from " + aSuiteInfo.getGlobalId());
- return;
- }
- ComponentId componentId = getComponentId(globalId);
- if (componentId == null)
- {
- Log.logWarning(
- "SifRegistrator unregistration failed, application " +
- globalId + " does not exist");
- return;
- }
- // Save component id to ApplicationInfo.
- ApplicationInfo appInfo =
- (ApplicationInfo)aSuiteInfo.getApplications().elementAt(aIndex);
- appInfo.setComponentId(componentId);
- // Unregister application.
- int err = _unregisterComponent(iSessionHandle, componentId.getId());
- if (err < 0)
- {
- InstallerException.internalError(
- "Unregistering component " + globalId +
- " failed with code " + err);
- }
- else
- {
- Log.log("SifRegistrator unregistered component " + globalId +
- " with id " + componentId.getId());
+ InstallerException.internalError("No valid SIF session.");
}
}
/**
* Registers Java application suite to S60 USIF as a component.
- * Used with USIF Phase 2.
*
* @param aSuiteInfo Suite information
* @param aIsUpdate true in case of an update, false in case of a new
@@ -529,7 +381,6 @@
String suiteName = aSuiteInfo.getName();
String vendor = aSuiteInfo.getVendor();
String version = aSuiteInfo.getVersion().toString();
- String name = null; // Set name to null so that suite name will be used.
int uid = ((PlatformUid)aSuiteInfo.getUid()).getIntValue();
String[] componentFiles = getComponentFiles(aSuiteInfo);
long componentSize = aSuiteInfo.getInitialSize();
@@ -540,17 +391,20 @@
String midletInfoUrl = aSuiteInfo.getAttributeValue("MIDlet-Info-URL");
String midletDescription = aSuiteInfo.getAttributeValue("MIDlet-Description");
String downloadUrl = aSuiteInfo.getAttributeValue("Nokia-MIDlet-Download-URL");
+ String updateUrl = aSuiteInfo.getAttributeValue("Nokia-Update");
ComponentId componentId = new ComponentId();
int err = _registerComponent(
iSessionHandle, uid,
getScrString(suiteName), getScrString(vendor),
- getScrString(version), getScrString(name),
- getScrString(globalId), componentFiles,
- componentSize, isRemovable, isDrmProtected,
- isOriginVerified, aIsUpdate, aSuiteInfo.getMediaId(),
+ getScrString(version), getScrString(globalId),
+ componentFiles, componentSize,
+ isRemovable, isDrmProtected,
+ isOriginVerified, aIsUpdate,
+ aSuiteInfo.getMediaId(),
getScrString(midletInfoUrl),
getScrString(midletDescription),
getScrString(downloadUrl),
+ getScrString(updateUrl),
componentId);
if (err < 0)
{
@@ -568,7 +422,6 @@
/**
* Unregisters Java application suite from being S60 USIF component.
- * Used with USIF Phase 2.
*
* @param aSuiteInfo suite information
* @throws InstallerException if unregistration cannot done or
@@ -610,7 +463,6 @@
* from given SuiteInfo object. The SuiteInfo must already have
* been registered to USIF as a component with registerComponent()
* method before this method is called.
- * Used with USIF Phase 2.
*
* @param aSuiteInfo information needed to register the application
* @param aIndex index of the application in the suite
@@ -797,7 +649,7 @@
" failed with code " + err + " (" + nonlocalizedAttrValue + ")");
}
LocalizedName[] localizedAttrValues =
- getLocalizedNames(aSuite, attrName + "-");
+ getLocalizedNames(aSuite, "Nokia-" + attrName + "-");
for (int i = 0; i < localizedAttrValues.length; i++)
{
err = _setLocalizedComponentProperty(
@@ -816,51 +668,41 @@
// Register Domain-Category property.
String protectionDomainProperty = "Domain-Category";
String protectionDomainName = aSuite.getProtectionDomainName();
- if (protectionDomainName != null)
+ err = _setLocalizedComponentProperty(
+ iSessionHandle, cid, protectionDomainProperty,
+ getProtectionDomainPropertyValue(protectionDomainName),
+ UNSPECIFIED_LOCALE);
+ if (err < 0)
{
- err = _setLocalizedComponentProperty(
- iSessionHandle, cid, protectionDomainProperty,
- getProtectionDomainPropertyValue(protectionDomainName),
- UNSPECIFIED_LOCALE);
- if (err < 0)
- {
- InstallerException.internalError(
- "Adding property " + protectionDomainProperty +
- " value " + protectionDomainName + " for component " +
- cid + " failed with code " + err);
- }
- }
- else
- {
- Log.logWarning(
- "SifRegistrator.registerLocalizedProperties: " +
- protectionDomainProperty + " not set");
+ InstallerException.internalError(
+ "Adding property " + protectionDomainProperty +
+ " value " + protectionDomainName + " for component " +
+ cid + " failed with code " + err);
}
}
/**
* Returns the "Domain-Category" property value which contains
* the text id and text file name for the localized domain category
- * text.
+ * text. This method must never return null.
*/
private String getProtectionDomainPropertyValue(String aProtectionDomain)
{
- String textId = null;
- if (aProtectionDomain.equals("Manufacturer"))
- {
- textId = "txt_java_inst_setlabel_cert_domain_val_manufacturer";
- }
- else if (aProtectionDomain.equals("Operator"))
+ String textId = "txt_java_inst_setlabel_cert_domain_val_untrusted_third_party";
+ if (aProtectionDomain != null)
{
- textId = "txt_java_inst_setlabel_cert_domain_val_operator";
- }
- else if (aProtectionDomain.equals("IdentifiedThirdParty"))
- {
- textId = "txt_java_inst_setlabel_cert_domain_val_trusted_third_party";
- }
- else if (aProtectionDomain.equals("UnidentifiedThirdParty"))
- {
- textId = "txt_java_inst_setlabel_cert_domain_val_untrusted_third_party";
+ if (aProtectionDomain.equals("Manufacturer"))
+ {
+ textId = "txt_java_inst_setlabel_cert_domain_val_manufacturer";
+ }
+ else if (aProtectionDomain.equals("Operator"))
+ {
+ textId = "txt_java_inst_setlabel_cert_domain_val_operator";
+ }
+ else if (aProtectionDomain.equals("IdentifiedThirdParty"))
+ {
+ textId = "txt_java_inst_setlabel_cert_domain_val_trusted_third_party";
+ }
}
return textId + ",javaapplicationinstaller";
}
@@ -894,6 +736,13 @@
"SifRegistrator ignored unknown locale: " +
name + ": " + localizedName);
}
+ else if (localizedName.getName() == null ||
+ localizedName.getName().length() == 0)
+ {
+ Log.logWarning(
+ "SifRegistrator ignored empty localized text: " +
+ name + ": " + localizedName);
+ }
else
{
Log.log("SifRegistrator found localized text " +
@@ -1015,7 +864,6 @@
* @param aSuiteName
* @param aVendor
* @param aVersion
- * @param aName
* @param aGlobalId
* @param aComponentFiles
* @param aComponentSize
@@ -1027,17 +875,19 @@
* @param aMidletInfoUrl
* @param aMidletDescription
* @param aDownloadUrl
+ * @param aUpdateUrl
* @param aComponentId upon successful execution contains the
* component id for the registered component
* @return 0 if registration succeeded or Symbian error code
*/
private static native int _registerComponent(
int aSessionHandle, int aUid, String aSuiteName, String aVendor,
- String aVersion, String aName, String aGlobalId,
+ String aVersion, String aGlobalId,
String[] aComponentFiles, long aComponentSize,
boolean aIsRemovable, boolean aIsDrmProtected,
boolean aIsOriginVerified, boolean aIsUpdate, int aMediaId,
- String aMidletInfoUrl, String aMidletDescription, String aDownloadUrl,
+ String aMidletInfoUrl, String aMidletDescription,
+ String aDownloadUrl, String aUpdateUrl,
ComponentId aComponentId);
/**
@@ -1145,4 +995,9 @@
* @return 1 if application data should be registered to USIF, 0 otherwise
*/
private static native int _getUsifMode();
+
+ /**
+ * Returns SIF specific error category from given error id.
+ */
+ private static native int _getErrorCategory(int aErrorId);
}
--- a/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/utils/SysUtil.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/utils/SysUtil.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -359,11 +359,12 @@
" drives failed with code " + ret);
}
// Save the drives so that next time they are not fetched again.
- iUserVisibleDrives = new Vector();
+ Vector drivesVector = new Vector();
for (int i = 0; i < aVisibleDrives.size(); i++)
{
- iUserVisibleDrives.addElement(aVisibleDrives.elementAt(i));
+ drivesVector.addElement(aVisibleDrives.elementAt(i));
}
+ iUserVisibleDrives = drivesVector;
}
/**
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckJarPackages.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckJarPackages.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -73,7 +73,7 @@
// Application touch support detection is not needed
// if Nokia-MIDlet-On-Screen-Keypad has been defined.
boolean touchDetection = true;
- if (ball.getAttributeValue("Nokia-MIDlet-On-Screen-Keypad") != null)
+ if (ball.iSuite.getOnScreenKeypad() != SuiteInfo.OSK_UNDEFINED)
{
touchDetection = false;
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/ConvertIcons.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/ConvertIcons.java Fri Jul 09 16:35:45 2010 +0300
@@ -258,10 +258,11 @@
// the attribute MIDlet-<N>
iconName = newApp.getIconPath();
}
- if (iconName.length() == 0)
+ if (iconName.length() == 0 || iconName.equals(suiteIconName))
{
- // No MIDlet icon defined, use already converted suite
- // icon if it exists
+ // No MIDlet icon defined or MIDlet icon defined to be
+ // the same as suite icon, use already converted suite
+ // icon if it exists.
if (suiteIconFile.length() > 0)
{
// Must make separate copy of the suite icon for each
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java Fri Jul 09 16:35:45 2010 +0300
@@ -56,7 +56,7 @@
{
if (aBall.iApplicationRegistrator.isOnDeviceKeypadNeeded())
{
- // default value when on-screen-keypad is needed
+ // Default value when on-screen-keypad is needed.
aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_GAMEACTIONS);
String attrName = "Nokia-MIDlet-On-Screen-Keypad";
@@ -77,13 +77,16 @@
}
else
{
- Log.logWarning("Invalid " + attrName + " value " + attrValue);
+ // Ignore on-screen-keypad attribute with invalid value.
+ aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_UNDEFINED);
+ Log.logWarning("Ignoring invalid " + attrName +
+ " value " + attrValue);
}
}
}
else
{
- // If the device does not need on-screen-keypad, the value is not set at all
+ // If the device does not need on-screen-keypad, the value is not set at all.
aBall.iSuite.setOnScreenKeypad(SuiteInfo.OSK_UNDEFINED);
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareInstallation.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareInstallation.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -37,6 +37,7 @@
import com.nokia.mj.impl.installer.utils.SysUtil;
import com.nokia.mj.impl.security.midp.authentication.AuthenticationModule;
import com.nokia.mj.impl.security.midp.authentication.OcspSettings;
+import com.nokia.mj.impl.fileutils.FileURL;
import com.nokia.mj.impl.utils.Uid;
public class PrepareInstallation extends ExeStep
@@ -170,6 +171,11 @@
{
aBall.iJarUrl = jarArg;
}
+ else if (isFileUrl(jarArg))
+ {
+ aBall.iJarFilename = getFileFromUrl(jarArg);
+ Log.log("Jar " + aBall.iJarFilename + " from URL " + jarArg);
+ }
else
{
aBall.iJarFilename = jarArg;
@@ -181,6 +187,11 @@
{
aBall.iJadUrl = jadArg;
}
+ else if (isFileUrl(jadArg))
+ {
+ aBall.iJadFilename = getFileFromUrl(jadArg);
+ Log.log("Jad " + aBall.iJadFilename + " from URL " + jadArg);
+ }
else
{
aBall.iJadFilename = jadArg;
@@ -346,4 +357,36 @@
Log.log("ocspSettings: " + ocspSettings);
return ocspSettings;
}
+
+ /**
+ * Returns true if given URL is a file URL, false otherwise.
+ */
+ private static boolean isFileUrl(String aUrl)
+ {
+ if (aUrl == null || aUrl.length() == 0)
+ {
+ return false;
+ }
+ return aUrl.toLowerCase().startsWith("file://");
+ }
+
+ /**
+ * Returns a file path from file URL.
+ *
+ * @throws InstallerException if URL is invalid.
+ */
+ private static String getFileFromUrl(String aUrl)
+ {
+ String filePath = null;
+ try
+ {
+ FileURL fileUrl = new FileURL(aUrl);
+ filePath = fileUrl.getFullPath();
+ }
+ catch (Throwable t)
+ {
+ InstallerException.internalError("Invalid file URL: " + aUrl, t);
+ }
+ return filePath;
+ }
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareSplashScreen.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareSplashScreen.java Fri Jul 09 16:35:45 2010 +0300
@@ -38,7 +38,7 @@
/**
* Installation step PrepareSplashScreen prepares splash
- * screen images from MIDlet-Splash-Screen-Image attribute.
+ * screen images from Nokia-MIDlet-Splash-Screen-Image attribute.
*/
public class PrepareSplashScreen extends ExeStep
{
@@ -70,7 +70,7 @@
return;
}
- String attrName = "MIDlet-Splash-Screen-Image";
+ String attrName = "Nokia-MIDlet-Splash-Screen-Image";
String attrValue = ball.getAttributeValue(attrName);
if (attrValue != null && attrValue.length() > 0)
{
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/ConfirmUninstallation.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/ConfirmUninstallation.java Fri Jul 09 16:35:45 2010 +0300
@@ -76,8 +76,9 @@
int idxMinus = -1;
do
{
- attrValue = ball.iSuite.getAttributeValue(attrName + "-" + locale);
- Log.log(attrName + "-" + locale + ": " + attrValue);
+ String localizedAttrName = "Nokia-" + attrName + "-" + locale;
+ attrValue = ball.iSuite.getAttributeValue(localizedAttrName);
+ Log.log(localizedAttrName + ": " + attrValue);
idxMinus = locale.lastIndexOf('-');
// If attribute is not found using full locale, e.g. 'en-GB',
// strip the most specific part of the locale out
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/GetFromStorage.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/GetFromStorage.java Fri Jul 09 16:35:45 2010 +0300
@@ -54,6 +54,15 @@
// Check if debug attribute has been defined for this suite.
ball.setDebug(ball.iSuite.getAttributeValue("Nokia-MIDlet-Install-Debug"));
+ // Check from arguments if preinstall state should be reset.
+ String arg = ball.iArgs.get("resetpreinstall");
+ if (arg != null)
+ {
+ ball.iSuite.setResetPreinstall(true);
+ ball.log("ResetPreinstall set");
+ }
+
+
// Log all suite info.
//ball.log(ball.iSuite.toString());
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/storagehandler/SuiteInfo.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/storagehandler/SuiteInfo.java Fri Jul 09 16:35:45 2010 +0300
@@ -73,6 +73,9 @@
private String iAccessPoint = null;
// Flag telling if application suite is trusted
private boolean iTrusted = false;
+ // Flag telling if preinstallation state should be
+ // reseted in uninstallation.
+ private boolean iResetPreinstall = false;
/** Flag telling if default icon should be used. */
private boolean iUseDefaultIcon = false;
@@ -783,6 +786,24 @@
}
/**
+ * Get the flag telling if preinstallation state should be reset.
+ * Used only in uninstallation.
+ */
+ public boolean getResetPreinstall()
+ {
+ return iResetPreinstall;
+ }
+
+ /**
+ * Set the flag telling if preinstallation state should be reset.
+ * Used only in uninstallation.
+ */
+ public void setResetPreinstall(boolean aResetPreinstall)
+ {
+ iResetPreinstall = aResetPreinstall;
+ }
+
+ /**
* Calculates initial size from MIDlet-Data-Size and
* MIDlet-Jar-Size attributes, or if they are not present
* from jar file size.
@@ -865,6 +886,7 @@
buf.append(" MediaId: ").append(getMediaId()).append("\n");
buf.append(" InitialSize: ").append(getInitialSize()).append("\n");
buf.append(" PreinstallState: ").append(iPreinstallState).append("\n");
+ buf.append(" ResetPreinstall: ").append(getResetPreinstall()).append("\n");
buf.append(" OnScreenKeypad: ").append(getOnScreenKeypad()).append("\n");
buf.append(" ConvertedIcon: ").append(getConvertedIconPath()).append("\n");
buf.append(" Group: ").append(getInstallationGroup()).append("\n");
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java Fri Jul 09 16:35:45 2010 +0300
@@ -67,7 +67,7 @@
*/
public String toString()
{
- return "javax.microedition.midlet.AutoStartPermission";
+ return "AutoStartPermission";
}
/**
--- a/javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -51,6 +51,7 @@
// NAMESPACE DECLARATION
using namespace java;
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
/**
* MIDP Stub SIS file UID. The application type Uid for MIDlets in S60
*/
@@ -66,6 +67,13 @@
*/
_LIT(KAppPostfix, ".fakeapp");
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+const TInt KAppIconCount = 2;
+#else
+const TInt KAppIconCount = 1;
+#endif
+
// ------------------------
/**
@@ -80,14 +88,6 @@
jboolean aBackground);
/**
- * Internal helper method for checking whether Application Shell is already running
- * Used JNI method ...1startAppShellUi
- *
- * @return ETrue if AppShell is running
- */
-TBool isAppShellUiRunning();
-
-/**
* Internal helper method for checking whether this code is executing in
* a device that has correctly working version of
* RApaLsSession::ForceCommitNonNativeApplicationsUpdatesL()
@@ -95,6 +95,15 @@
* @return ETrue if force commit works well
*/
TBool isForceCommitSupported();
+#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
+
+/**
+ * Internal helper method for checking whether Application Shell is already running
+ * Used JNI method ...1startAppShellUi
+ *
+ * @return ETrue if AppShell is running
+ */
+TBool isAppShellUiRunning();
/**
* Internal helper method for starting menu application
@@ -129,7 +138,7 @@
return err;
}
-#ifndef RD_JAVA_USIF_APP_REG
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
// Delete any pending (un)registrations (possible if
// e.g. device rebooted before commit).
// This call does nothing if there is no pending registrations.
@@ -144,7 +153,7 @@
pApaSession->Close();
return err;
}
-#endif // RD_JAVA_USIF_APP_REG
+#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
// Return handle to session. Utilize the fact that in Symbian
// all pointer addresses are MOD 4 so the last 2 bits are 0
@@ -168,7 +177,7 @@
* @param[in] aBackground
* @return 0 if registration succeeded or Symbian error code
*/
-#ifdef RD_JAVA_USIF_APP_REG
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1registerApplication
(JNIEnv */*aEnv*/, jclass /*aClass*/, jint /*aSessionHandle*/, jint /*aUid*/, jstring /*aGroupName*/,
jstring /*aMIDletName*/, jstring /*aTargetDrive*/, jstring /*aIconFileName*/,
@@ -176,7 +185,7 @@
{
return KErrNone;
}
-#else
+#else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1registerApplication
(JNIEnv *aEnv, jclass aClass, jint aSessionHandle, jint aUid, jstring aGroupName,
jstring aMIDletName, jstring aTargetDrive, jstring aIconFileName,
@@ -343,7 +352,6 @@
return err;
}
-#endif // RD_JAVA_USIF_APP_REG
/**
@@ -359,7 +367,7 @@
RFile appArcIcon;
TUid midletUid;
TInt err;
- TInt numberOfIcons = 1; // Conversion results always one icon in mbm.
+ TInt numberOfIcons = KAppIconCount; // number of icons stored in MBM
// Also default mbm has one icon.
midletUid.iUid = aUid;
@@ -475,6 +483,7 @@
return err;
}
+#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
/**
@@ -484,13 +493,13 @@
* @param[in] aUid The Uid of the application to be unregistered..
* @return 0 if unregistration succeeded or Symbian error code
*/
-#ifdef RD_JAVA_USIF_APP_REG
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1unregisterApplication
(JNIEnv *, jclass, jint /*aSessionHandle*/, jint /*aUid*/)
{
return KErrNone;
}
-#else
+#else // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_ApplicationRegistrator__1unregisterApplication
(JNIEnv *, jclass, jint aSessionHandle, jint aUid)
{
@@ -503,7 +512,7 @@
TRAPD(err, pApaSession->DeregisterNonNativeApplicationL(appUid));
return err;
}
-#endif // RD_JAVA_USIF_APP_REG
+#endif // SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
/**
@@ -524,7 +533,7 @@
TInt err = KErrNone;
-#ifndef RD_JAVA_USIF_APP_REG
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
if (aSynchronous)
{
// Make synchronous commit
@@ -552,12 +561,12 @@
// Use always this synchronous commit when running in emulator
// to make writing autotest cases easier.
TRAP(err, pApaSession->CommitNonNativeApplicationsUpdatesL());
-#else
+#else // __WINS__
// asynchronous commit
TRAP(err, pApaSession->ForceCommitNonNativeApplicationsUpdatesL());
#endif // __WINS__
}
-#endif // RD_JAVA_USIF_APP_REG
+#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
if (KErrNone == err)
{
@@ -582,9 +591,9 @@
reinterpret_cast<RApaLsSession*>(aSessionHandle<<2);
TInt err = KErrNone;
-#ifndef RD_JAVA_USIF_APP_REG
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
err = pApaSession->RollbackNonNativeApplicationsUpdates();
-#endif // RD_JAVA_USIF_APP_REG
+#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
pApaSession->Close();
delete pApaSession;
@@ -925,6 +934,7 @@
}
+#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
/**
* Internal helper method for checking whether this code is executing in
* a device that has correctly working version of
@@ -969,3 +979,4 @@
return EFalse;
}
}
+#endif // !SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
--- a/javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -20,11 +20,14 @@
#include <zipfile.h>
#include <time.h>
+#include <BitmapTransforms.h>
#include "javacommonutils.h"
#include "logger.h"
#include "mifconverter.h"
#include "iconconverter.h"
+#include "iconsizeutils.h" // TIconSizes
+#include "iconsizenotifier.h" // KUidIconSizeNotifPlugin
namespace java
{
@@ -32,12 +35,13 @@
/**
* The icon in S60 temporary drive
*/
-_LIT(KTempIconName, "D:\\micon.mbm");
+_LIT(KTempIconName1, "D:\\micon1.mbm");
+_LIT(KTempMaskName1, "D:\\mmask1.mbm");
-/**
- * The mask in S60 temporary drive
- */
-_LIT(KTempMaskName, "D:\\mmask.mbm");
+#ifdef RD_JAVA_S60_RELEASE_9_2
+_LIT(KTempIconName2, "D:\\micon2.mbm");
+_LIT(KTempMaskName2, "D:\\mmask2.mbm");
+#endif // RD_JAVA_S60_RELEASE_9_2
// MIF file constants
@@ -51,13 +55,11 @@
const TInt KMifIconHeaderAnimated = 0;
-
CIconConverter* CIconConverter::NewL(RFs& aRFs)
{
return new(ELeave) CIconConverter(aRFs);
}
-
CIconConverter::CIconConverter(RFs &aRFs)
{
iRFs = aRFs;
@@ -79,6 +81,8 @@
// Do NOT close file server session
delete iBitmapMask;
delete iBitmap;
+ delete iBitmapMaskScaledCopy;
+ delete iBitmapScaledCopy;
delete iImageDecoder;
RFbsSession::Disconnect();
@@ -246,34 +250,77 @@
*iBitmapMask);
CActiveScheduler::Start();
- err = iActiveListener->iStatus.Int();
+ User::LeaveIfError(iActiveListener->iStatus.Int());
+
+ // Scale icons
+ TIconSizes sizes(GetIdealIconSizes());
+ CBitmapScaler* scaler = CBitmapScaler::NewL();
+ CleanupStack::PushL(scaler);
+ scaler->SetQualityAlgorithm(CBitmapScaler::EMaximumQuality);
+
+ // Scale for Menu
+ ILOG2(EJavaInstaller, "Scaling Menu icon to (%d, %d)",
+ sizes.iMenuIconSize.iWidth, sizes.iMenuIconSize.iHeight);
+ iBitmapScaledCopy = new(ELeave) CFbsBitmap;
+ iBitmapMaskScaledCopy = new(ELeave) CFbsBitmap;
+ ScaleL(*scaler, sizes.iMenuIconSize);
+ User::LeaveIfError(iBitmapScaledCopy->Save(KTempIconName1));
+ User::LeaveIfError(iBitmapMaskScaledCopy->Save(KTempMaskName1));
+ iBitmapScaledCopy->Reset();
+ iBitmapMaskScaledCopy->Reset();
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+ // Scale for App Manager
+ ILOG2(EJavaInstaller, "Scaling App Mgr icon to (%d, %d)",
+ sizes.iMenuIconSize.iWidth, sizes.iMenuIconSize.iHeight);
+ ScaleL(*scaler, sizes.iAppMgrIconSize);
+ User::LeaveIfError(iBitmapScaledCopy->Save(KTempIconName2));
+ User::LeaveIfError(iBitmapMaskScaledCopy->Save(KTempMaskName2));
+ iBitmapScaledCopy->Reset();
+ iBitmapMaskScaledCopy->Reset();
+#endif // RD_JAVA_S60_RELEASE_9_2
+
+ CleanupStack::PopAndDestroy(scaler);
delete iActiveListener;
iActiveListener = NULL;
- if (err != KErrNone)
- {
- User::Leave(err);
- }
- // store bitmap to two temp files
- User::LeaveIfError(iBitmap->Save(KTempIconName));
- User::LeaveIfError(iBitmapMask->Save(KTempMaskName));
-
- // construct multi bitmap file from bitmap and mask files (2 files)
+ // Construct multi bitmap file from bitmap and mask files (2 files)
+#ifdef RD_JAVA_S60_RELEASE_9_2
+ const TInt KBmpCount = 4;
+ TInt32 sourceIds[] = {0, 0, 0, 0};
+#else
+ const TInt KBmpCount = 2;
TInt32 sourceIds[] = {0, 0};
- TFileName** filenames = new(ELeave) TFileName*[2];
+#endif // RD_JAVA_S60_RELEASE_9_2
+
+ TFileName** filenames = new(ELeave) TFileName*[KBmpCount];
CleanupStack::PushL(filenames);
- filenames[0] = new(ELeave) TFileName(KTempIconName);
+ filenames[0] = new(ELeave) TFileName(KTempIconName1);
CleanupStack::PushL(filenames[0]);
- filenames[1] = new(ELeave) TFileName(KTempMaskName);
+ filenames[1] = new(ELeave) TFileName(KTempMaskName1);
CleanupStack::PushL(filenames[1]);
-
- CFbsBitmap::StoreL(aOutputFile, 2, (const TDesC**)filenames, sourceIds);
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+ filenames[2] = new(ELeave) TFileName(KTempIconName2);
+ CleanupStack::PushL(filenames[2]);
+ filenames[3] = new(ELeave) TFileName(KTempMaskName2);
+ CleanupStack::PushL(filenames[3]);
+#endif // RD_JAVA_S60_RELEASE_9_2
+
+ CFbsBitmap::StoreL(aOutputFile, KBmpCount, (const TDesC**)filenames, sourceIds);
// Now try to delete the temp icon and mask files,
// ignore possible errors
- (void)iRFs.Delete(KTempIconName);
- (void)iRFs.Delete(KTempMaskName);
-
+ (void)iRFs.Delete(KTempIconName1);
+ (void)iRFs.Delete(KTempMaskName1);
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+ (void)iRFs.Delete(KTempIconName2);
+ (void)iRFs.Delete(KTempMaskName2);
+ CleanupStack::PopAndDestroy(filenames[3]);
+ CleanupStack::PopAndDestroy(filenames[2]);
+#endif // RD_JAVA_S60_RELEASE_9_2
+
CleanupStack::PopAndDestroy(filenames[1]);
CleanupStack::PopAndDestroy(filenames[0]);
CleanupStack::PopAndDestroy(filenames);
@@ -371,4 +418,64 @@
mimeTypes.ResetAndDestroy();
}
+void CIconConverter::ScaleL(CBitmapScaler& aScaler, const TSize aSize)
+{
+ ASSERT(iBitmapScaledCopy);
+ ASSERT(iBitmapMaskScaledCopy);
+
+ User::LeaveIfError(iBitmapScaledCopy->Create(aSize, EColor16M));
+ User::LeaveIfError(iBitmapMaskScaledCopy->Create(aSize, EGray256));
+
+ iActiveListener->InitialiseActiveListener();
+ aScaler.Scale(&iActiveListener->iStatus, *iBitmap, *iBitmapScaledCopy, ETrue);
+ CActiveScheduler::Start();
+ User::LeaveIfError(iActiveListener->iStatus.Int());
+
+ iActiveListener->InitialiseActiveListener();
+ aScaler.Scale(&iActiveListener->iStatus, *iBitmapMask, *iBitmapMaskScaledCopy, ETrue);
+ CActiveScheduler::Start();
+ User::LeaveIfError(iActiveListener->iStatus.Int());
+}
+
+TIconSizes CIconConverter::GetIdealIconSizes()
+{
+ TIconSizes fallbackSizes;
+ fallbackSizes.iMenuIconSize = TSize(KIconInMenuFallbackSize, KIconInMenuFallbackSize);
+ fallbackSizes.iAppMgrIconSize = TSize(KIconInAppMgrFallbackSize, KIconInAppMgrFallbackSize);
+
+#ifdef RD_JAVA_S60_RELEASE_9_2
+ RNotifier notifier;
+ TInt err = notifier.Connect();
+ if (KErrNone != err)
+ {
+ ELOG1(EJavaInstaller, "CIconConverter::GetIdealIconSizes #1 err = %d", err);
+ return fallbackSizes;
+ }
+
+ CleanupClosePushL(notifier);
+
+ TPckgBuf<TIconSizes> des;
+ iActiveListener->InitialiseActiveListener();
+ notifier.StartNotifierAndGetResponse(iActiveListener->iStatus,
+ KUidIconSizeNotifPlugin, des, des);
+ CActiveScheduler::Start();
+ notifier.CancelNotifier(KUidIconSizeNotifPlugin);
+ err = iActiveListener->iStatus.Int();
+
+ CleanupStack::PopAndDestroy(¬ifier);
+
+ if (KErrNone != err)
+ {
+ ELOG1(EJavaInstaller, "CIconConverter::GetIdealIconSizes #2 err = %d", err);
+ return fallbackSizes;
+ }
+ else
+ {
+ return des();
+ }
+#else
+ return fallbackSizes;
+#endif
+}
+
} // namespace java
--- a/javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.h Fri Jul 09 16:35:45 2010 +0300
@@ -26,6 +26,10 @@
#include <imageconversion.h>
+class CBitmapScaler;
+class TIconSizes;
+
+
namespace java
{
@@ -161,6 +165,15 @@
HBufC8* apIconBuf,
const TDesC &aOutputFile);
+ /**
+ * Scale the original icon into the current temporary icon.
+ */
+ void ScaleL(CBitmapScaler& aScaler, const TSize aSize);
+
+ /**
+ * Get the ideal icon sizes from UI, trough the ecom plugin notifier.
+ */
+ TIconSizes GetIdealIconSizes();
private:
/**
@@ -176,16 +189,25 @@
CBufferedImageDecoder* iImageDecoder;
/**
- * Pointer to bitmap generated from the icon
+ * Pointer to bitmap generated from the icon.
*/
CFbsBitmap* iBitmap;
/**
* Pointer to the bitmap mask generated from the icon.
- * May be NULL if the original icon not not have mask.
*/
CFbsBitmap* iBitmapMask;
+ /**
+ * Scaled copy of the original icon bitmap.
+ */
+ CFbsBitmap* iBitmapScaledCopy;
+
+ /**
+ * Scaled copy of the original icon mask.
+ */
+ CFbsBitmap* iBitmapMaskScaledCopy;
+
CActiveListener *iActiveListener;
};
--- a/javamanager/javainstaller/installer/src.s60/jadjarmatcher/jadjarmatcherscanfrominbox.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/jadjarmatcher/jadjarmatcherscanfrominbox.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -143,7 +143,7 @@
TRAP(err, atta = iAttaMan->GetAttachmentFileL(attaInfo->Id()));
if (KErrNone == err)
{
- aResultArray.Insert(atta, 0);
+ aResultArray.InsertL(atta, 0);
}
}
}
@@ -206,7 +206,7 @@
TMsvEntry index = (*entry)[loop];
if (KUidMsgTypePOP3 == index.iMtm || KUidMsgTypeIMAP4 == index.iMtm)
{
- aRootEntryArray.Insert((*entry)[loop].Id(), 0);
+ aRootEntryArray.InsertL((*entry)[loop].Id(), 0);
}
}
}
@@ -245,7 +245,7 @@
if (index.Visible() && index.Complete() &&
!index.InPreparation() && !index.Deleted())
{
- aEntryArray.Insert(aId, 0);
+ aEntryArray.InsertL(aId, 0);
}
}
}
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/GetComponentInfoTest.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/GetComponentInfoTest.java Fri Jul 09 16:35:45 2010 +0300
@@ -856,15 +856,11 @@
try
{
String value = aMsg.getStringValue(aName);
- assertTrue("Unexpected value " + aName + "=" + value, false);
- }
- catch (IllegalArgumentException iae)
- {
- // Expected exception.
+ assertTrue("Unexpected value " + aName + "=" + value, value == null);
}
catch (Throwable t)
{
- assertTrue("Incorrect exception for string value " + aName +
+ assertTrue("Unexpected exception for string value " + aName +
": " + t, false);
}
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/InstallerEngineTest.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/InstallerEngineTest.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -52,6 +52,8 @@
{
TestSuite suite = new TestSuite(this.getClass().getName());
+ String runIndex = System.getProperty("com.nokia.mj.impl.installer.test.param1");
+
if (Platform.isLinux())
{
// In S60 this would be interactive test, so disable it there.
@@ -64,6 +66,8 @@
}));
}
+ if (runIndex == null || runIndex.equalsIgnoreCase("run1"))
+ {
// Run 1
suite.addTest(new InstallerEngineTest("testMidletMessageOk", new TestMethod()
{
@@ -104,7 +108,11 @@
((InstallerEngineTest)tc).test3AppsOk();
}
}));
+ }
+ if (runIndex == null || runIndex.equalsIgnoreCase("run2"))
+ {
+ // Run 2
suite.addTest(new InstallerEngineTest("testDownloadJadOk", new TestMethod()
{
public void run(TestCase tc)
@@ -113,7 +121,6 @@
}
}));
- // Run 2
suite.addTest(new InstallerEngineTest("testDownloadJarOk", new TestMethod()
{
public void run(TestCase tc)
@@ -217,7 +224,11 @@
((InstallerEngineTest)tc).testNoJavaBinRoot();
}
}));
+ }
+ if (runIndex == null || runIndex.equalsIgnoreCase("run3"))
+ {
+ // Run 3
suite.addTest(new InstallerEngineTest("testBlockUninstall", new TestMethod()
{
public void run(TestCase tc)
@@ -241,8 +252,11 @@
((InstallerEngineTest)tc).testApplicationInfo();
}
}));
+ }
- // Run 3
+ if (runIndex == null || runIndex.equalsIgnoreCase("run4"))
+ {
+ // Run 4
suite.addTest(new InstallerEngineTest("testInstallOptions", new TestMethod()
{
public void run(TestCase tc)
@@ -258,6 +272,7 @@
((InstallerEngineTest)tc).testInstallAuthAndBig();
}
}));
+ }
com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
}
@@ -313,6 +328,15 @@
}
/**
+ */
+ public String getTestServer()
+ {
+ String server = System.getProperty("com.nokia.mj.impl.installer.test.server");
+ assertNotNull("-server=<address>:<port> argument required.", server);
+ return server;
+ }
+
+ /**
* Makes installation, update and uninstallation for given application.
* Does the following steps:
* install with cancellation and check that app is not installed,
@@ -413,12 +437,12 @@
assertNoIsDir();
// List.
- Log.logOut("InstallerEngineTest.doInstallUninstall: list -v");
- result = Installer.mainWithResult(new String[] { "list", "-v" });
- assertResult(result, Installer.ERR_NONE);
- Log.logOut("InstallerEngineTest.doInstallUninstall: list -otastatus");
- result = Installer.mainWithResult(new String[] { "list", "-otastatus" });
- assertResult(result, Installer.ERR_NONE);
+ //Log.logOut("InstallerEngineTest.doInstallUninstall: list -v");
+ //result = Installer.mainWithResult(new String[] { "list", "-v" });
+ //assertResult(result, Installer.ERR_NONE);
+ //Log.logOut("InstallerEngineTest.doInstallUninstall: list -otastatus");
+ //result = Installer.mainWithResult(new String[] { "list", "-otastatus" });
+ //assertResult(result, Installer.ERR_NONE);
// Update with cancellation.
Log.logOut("InstallerEngineTest.doInstallUninstall: update with cancellation " + aFilename);
@@ -573,38 +597,38 @@
public void testDownloadJadOk()
{
Log.logOut("InstallerEngineTest.testDownloadJadOk begins");
- SuiteInfo suite = new SuiteInfo("JBenchmark2", "Kishonti LP");
- doInstallUninstall(suite, "http://195.134.231.83:7070/omjserver/resources/omj/T00000900_JBenchmark2_gcf.jsp", true, iDefaultOptions);
+ SuiteInfo suite = new SuiteInfo("HelloWorld", "Nokia");
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/HelloWorld_ota.jad", true, iDefaultOptions);
}
public void testDownloadJarOk()
{
Log.logOut("InstallerEngineTest.testDownloadJarOk begins");
- SuiteInfo suite = new SuiteInfo("JBenchmark2", "Kishonti LP");
- doInstallUninstall(suite, "http://195.134.231.83:7070/omjserver/resources/omj/JBenchmark2.jar", false, iDefaultOptions);
+ SuiteInfo suite = new SuiteInfo("HelloWorld", "Nokia");
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/HelloWorld.jar", false, iDefaultOptions);
}
public void testDownloadJadHttpRedirectOk()
{
Log.logOut("InstallerEngineTest.testDownloadJadHttpRedirectOk begins");
- SuiteInfo suite = new SuiteInfo("JBenchmark2", "Kishonti LP");
- doInstallUninstall(suite, "http://195.134.231.83:7070/RedirectServlet/redirect?name=JBenchmark2.jad&count=5", true, iDefaultOptions);
+ SuiteInfo suite = new SuiteInfo("HelloWorld_redirect", "Nokia");
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/redirect?name=HelloWorld_redirect.jad&count=5", true, iDefaultOptions);
}
public void testDownloadJarHttpRedirectOk()
{
Log.logOut("InstallerEngineTest.testDownloadJarHttpRedirectOk begins");
- SuiteInfo suite = new SuiteInfo("JBenchmark2", "Kishonti LP");
- doInstallUninstall(suite, "http://195.134.231.83:7070/RedirectServlet/redirect?name=JBenchmark2.jar", false, iDefaultOptions);
+ SuiteInfo suite = new SuiteInfo("HelloWorld_redirect", "Nokia");
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/redirect?name=HelloWorld_redirect.jar", false, iDefaultOptions);
}
public void testDownloadJadHttpAuthOk()
{
Log.logOut("InstallerEngineTest.testDownloadJadHttpAuthOk begins");
- SuiteInfo suite = new SuiteInfo("DS_Snow_http_auth", "DS_Effects");
+ SuiteInfo suite = new SuiteInfo("HelloWorld_http_auth", "Nokia");
iDefaultOptions.addElement("-username=guest");
iDefaultOptions.addElement("-password=guest");
- doInstallUninstall(suite, "http://195.134.231.83:7070/httpauth/DS_Snow_http_auth.jad", true, iDefaultOptions);
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/httpauth/HelloWorld_http_auth.jad", true, iDefaultOptions);
}
public void testDownloadJadHttpAuthNok()
@@ -614,7 +638,7 @@
{
"install",
"-silent",
- "-jad=http://195.134.231.83:7070/httpauth/DS_Snow_http_auth.jad",
+ "-jad=http://" + getTestServer() + "/installertest/httpauth/HelloWorld_http_auth.jad",
};
int result = Installer.mainWithResult(args);
// Check result code.
@@ -625,7 +649,7 @@
iItu.isExceptionReason
(Installer.getExecuteException(),
InstallerErrorMessage.INST_CANCEL,
- InstallerDetailedErrorMessage.NO_MSG,
+ InstallerDetailedErrorMessage.INST_CANCEL,
OtaStatusCode.USER_CANCELLED));
assertTrue("installed app uid should not exist", Installer.iInstalledApps.length == 0);
}
@@ -637,7 +661,7 @@
{
"install",
"-silent",
- "-jad=http://195.134.231.83:7070/RedirectServlet/redirect?name=JBenchmark2.jad&count=6",
+ "-jad=http://" + getTestServer() + "/installertest/redirect?name=HelloWorld_redirect.jad&count=6",
};
int result = Installer.mainWithResult(args);
// Check result code.
@@ -680,7 +704,7 @@
{
"install",
"-silent",
- "-jad=http://195.134.231.83:7070/omjserver/resources/omj/T00000900_JBenchmark2_8mb_gcf.jsp",
+ "-jad=http://" + getTestServer() + "/installertest/HelloWorld_8mb.jad",
};
Log.log("InstallerEngineTest.testDownloadJadCancel: installation starts");
int result = Installer.mainWithResult(args);
@@ -693,7 +717,7 @@
iItu.isExceptionReason
(Installer.getExecuteException(),
InstallerErrorMessage.INST_CANCEL,
- InstallerDetailedErrorMessage.NO_MSG,
+ InstallerDetailedErrorMessage.INST_CANCEL,
OtaStatusCode.USER_CANCELLED));
assertTrue("installed app uid should not exist", Installer.iInstalledApps.length == 0);
Log.log("InstallerEngineTest.testDownloadJadCancel: end");
@@ -1109,10 +1133,10 @@
{
Log.logOut("InstallerEngineTest.testInstallAuthAndBig begins");
// Do first installation with doInstallUninstall helper
- SuiteInfo suite = new SuiteInfo("DS_Snow_http_auth", "DS_Effects");
+ SuiteInfo suite = new SuiteInfo("HelloWorld_http_auth", "Nokia");
iDefaultOptions.addElement("-username=guest");
iDefaultOptions.addElement("-password=guest");
- doInstallUninstall(suite, "http://195.134.231.83:7070/httpauth/DS_Snow_http_auth.jad", true, iDefaultOptions);
+ doInstallUninstall(suite, "http://" + getTestServer() + "/installertest/httpauth/HelloWorld_http_auth.jad", true, iDefaultOptions);
// Then start installation which downloads a large file.
Log.log("InstallerEngineTest.testInstallAuthAndBig begin to install big app");
@@ -1120,7 +1144,7 @@
{
"install",
"-silent",
- "-jad=http://195.134.231.83:7070/omjserver/resources/omj/T00000900_JBenchmark2_8mb_gcf.jsp",
+ "-jad=http://" + getTestServer() + "/installertest/HelloWorld_8mb.jad",
};
int result = Installer.mainWithResult(args);
// Check result code.
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/customisationproperties/CustomisationPropertiesTest.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/customisationproperties/CustomisationPropertiesTest.java Fri Jul 09 16:35:45 2010 +0300
@@ -212,18 +212,18 @@
String drive = (String)value.firstElement();
assertTrue("PossibleInstallationDrives is null", (drive != null));
- assertTrue("First PossibleInstallationDrive is not C:", drive.equals("C:"));
+ assertTrue("First PossibleInstallationDrive is not C:, it is " + drive, drive.equals("C:"));
// second possible drive
drive = (String)value.get(1);
assertTrue("PossibleInstallationDrives is null", (drive != null));
- assertTrue("Second PossibleInstallationDrive is not E:", drive.equals("E:"));
+ assertTrue("Second PossibleInstallationDrive is not E:, it is " + drive, drive.equals("E:"));
value = cust.getIntegerProperty(CustomisationProperties.PossibleInstallationDrives);
assertTrue("PossibleInstallationDrives value is null", (value != null));
assertTrue("PossibleInstallationDrives value does not contain any integers", (value.size() > 0));
Integer idrive = (Integer)value.get(1);
- assertTrue("Second PossibleInstallationDrive is E:", idrive.intValue() == 4);
+ assertTrue("Second PossibleInstallationDrive is not E:, it is " + idrive, idrive.intValue() == 4);
}
public void testTypesOfPossibleInstallationDrives()
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/SysUtilTest.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/SysUtilTest.java Fri Jul 09 16:35:45 2010 +0300
@@ -167,6 +167,41 @@
}
}));
+ if (Platform.isS60())
+ {
+ suite.addTest(new SysUtilTest("testGetProcessState", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((SysUtilTest)tc).testGetProcessState();
+ }
+ }));
+
+ suite.addTest(new SysUtilTest("testDriveGetters", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((SysUtilTest)tc).testDriveGetters();
+ }
+ }));
+
+ suite.addTest(new SysUtilTest("testGetScreenSize", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((SysUtilTest)tc).testGetScreenSize();
+ }
+ }));
+
+ suite.addTest(new SysUtilTest("testIsoToLang", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((SysUtilTest)tc).testIsoToLang();
+ }
+ }));
+ }
+
com.nokia.mj.impl.utils.OmjTestRunner.run(suite);
}
@@ -198,11 +233,11 @@
{
try
{
- // Test PS keys defined in ScreensaverInternalPSKeys.h
- Uid uid = PlatformUid.createUid("0x101F8771"); // KPSUidScreenSaver
- int key = 0x00000001; // KScreenSaverPreviewMode
+ // Test PS keys defined in hwrmpowerstatesdkpskey.h
+ Uid uid = PlatformUid.createUid("0x10205041"); // KPSUidHWRMPowerState
+ int key = 0x00000003; // KHWRMChargingStatus
int value = SysUtil.getPropertyValue(uid, key);
- assertTrue("KScreenSaverPreviewMode(!=0): " + value, value == 0);
+ assertTrue("KHWRMChargingStatus(!=0): " + value, value == 0);
}
catch (InstallerException ie)
{
@@ -215,8 +250,8 @@
{
try
{
- // Test PS keys defined in ScreensaverInternalPSKeys.h
- Uid uid = PlatformUid.createUid("0x101F8771"); // KPSUidScreenSaver
+ // Test PS keys defined in hwrmpowerstatesdkpskey.h
+ Uid uid = PlatformUid.createUid("0x10205041"); // KPSUidHWRMPowerState
int key = 0x00000010; // Undefined key
int value = SysUtil.getPropertyValue(uid, key);
assertTrue("Getting undefined property value did not fail", false);
@@ -573,4 +608,51 @@
// OK, expected exception.
}
}
+
+ public void testGetProcessState()
+ {
+ int state = SysUtil.getProcessState(PlatformUid.createUid("[102033e6]"));
+ assertTrue("installer process state is " + state +
+ ", not " + SysUtil.PROC_STATE_ALIVE,
+ SysUtil.PROC_STATE_ALIVE == state);
+ state = SysUtil.getProcessState(PlatformUid.createUid("[e0001001]"));
+ assertTrue("nonexisting process state is " + state + ", not 0",
+ 0 == state);
+ }
+
+ public void testDriveGetters()
+ {
+ int defMem = SysUtil.getDefaultPhoneMemory();
+ int defMassStorage = SysUtil.getDefaultMassStorage();
+ Log.log("testDriveGetter: defaultPhoneMemory = " + defMem);
+ Log.log("testDriveGetter: defaultMassStorage = " + defMassStorage);
+ }
+
+ public void testGetScreenSize()
+ {
+ int screenWidth = SysUtil.getScreenWidth();
+ int screenHeight = SysUtil.getScreenHeight();
+ Log.log("testGetScreenSize: screenWidth = " + screenWidth);
+ Log.log("testGetScreenSize: screenHeight = " + screenHeight);
+ assertTrue("screenWidth <= 0", screenWidth > 0);
+ assertTrue("screenHeight <= 0", screenHeight > 0);
+ }
+
+ public void testIsoToLang()
+ {
+ testIsoToLang("unknown", -1); // unknown locale is indicated with -1
+ testIsoToLang("fi", 9); // ELangFinnish, Finnish
+ testIsoToLang("fi_FI", 9); // ELangFinnish, Finnish
+ testIsoToLang("sv", 6); // ELangSwedish, Swedish
+ testIsoToLang("sv_FI", 85); // ELangFinlandSwedish, Finland Swedish
+ testIsoToLang("en", 1); // ELangEnglish, UK English
+ testIsoToLang("en_US", 10); // ELangAmerican, American
+ testIsoToLang("en_AU", 20); // ELangAustralian, Australian English
+ }
+
+ private void testIsoToLang(String aLocale, int aLang)
+ {
+ assertTrue("SysUtil.isoToLang " + aLocale + " != " + aLang,
+ SysUtil.isoToLang(aLocale) == aLang);
+ }
}
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000019.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000046.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000058.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000070.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000090.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000150.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000172.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000175.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000182.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000189.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000250.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000305.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000390.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000500.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000582.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000618.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000703.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/3DSpaceShooter.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,18 @@
+
+MIDlet-1: 3DSpaceShooter, /icon.png, Sapce3D
+
+
+MIDlet-Jar-Size: 240229
+
+
+MIDlet-Jar-URL: 3DSpaceShooter.jar
+MIDlet-Name: 3DSpaceShooter
+MIDlet-Vendor: Innovative Ideas From Outer Space Ltd.
+
+
+
+
+
+MIDlet-Version: 1.0.4
+Nokia-MIDlet-Original-Display-Size: 176,208
+Nokia-MIDlet-On-Screen-Keypad: navigationkeys
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/800_x_N97_64GB_fr_speed_v5_32_01.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,99 @@
+RepositoryContentType: text/plain
+UserAgent: NokiaN95/J2ME-IMPS
+ShowStatusTextInCL: 0
+SpaceBetweenFriendsNameAndHisIcon: 3
+ShowDomain: 0
+MIDlet-Icon: /img/App.png
+NormalPollRate: 12000
+TCPCIREnabled: 1
+Images: http://download.ko.mysite.fr/koi/j2me/enc/1111/
+SpecialKeys: -12
+Host: koi.ko.mysite.fr
+TCPPingRate: 1560000
+EnableCommunitySelector: 1
+BackgoundImgPos: 0
+ScrollBarWidth: 5
+MIDlet-Vendor: Vodafone
+BillingURL: http://koi.ko.mysite.fr/koi/sq.dll/awo_buy
+UseTemplate: 1
+MaxFriendsNumber: 150
+StopTCPCIR: 1
+MIDlet-Version: 4.5.27
+SelectCommand: 1
+KeepAlive: 1500000
+SMSCIREnabled: 1
+MultiTrans: 5
+DefaultDomain: gmaeam1.com
+EnableBackgroundImage: 0
+MicroEdition-Profile: MIDP-2.0
+TermsAndConditions: 1
+SeamlessLogin: 0
+GlobalMsgLength: 600
+MIDlet-Push-1: sms://:3716, ui.Main, *
+RegisterConnection: 1
+ViewType: 0
+HTTPCIREnabled: 1
+IsTabFontBold: 1
+AboutNaming: PrerryLake_h_N97_fr_speed_v4_5_27
+InitMessage: 1
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-Jar-URL: 800€_x_N97_64GB_fr_speed_v5_32_01.jar
+AnimationRate: 300
+Multitask: 0
+EnableSemitransparentHighlight: 0
+CheckContentType: 1
+MaxMsgNumber: 30
+Port: 80
+LoginURL: http:/koi.ko.mysite.fr/koi/sq.dll/dsw_daas
+UseKeepAlive: 0
+MIDlet-Install-Notify: http://download.ko.mysite.fr/InstallNotify?c=
+SelfUpgrade: 1
+MIDlet-Data-Size: 500
+AnimationEnabled: 1
+TitleUpdateRate: 7000
+EnableRenameFriend: 0
+SystemMessageUserTimeout: 25000
+Help: http://download.ko.mysite.fr/koi/j2me/enc/help/fr/
+UseDeviceTimeForIncomingMsg: 1
+TCPCIRReconnectCount: 3
+DefaultLanguage: de
+MIDlet-1: Messenger,/img/App.png,ui.Main
+MsgListHeightTuner: 8
+MIDlet-Name: Messenger
+FontSize: 0
+WVExtension: /web/wv.dll/msn_imgw
+RefreshChoiceOnStateChange: 0
+MIDlet-Permissions: javax.microedition.io.Connector.http,javax.microedition.io.Connector.https,javax.microedition.io.Connector.socket,javax.microedition.io.Connector.sms,javax.wireless.messaging.sms.receive,javax.microedition.io.PushRegistry,javax.microedition.media.control.VideoControl.getSnapshot,javax.microedition.io.Connector.file.read,javax.microedition.io.Connector.file.write
+MaxConversations: 20
+SubscribePresence: 1
+PersistencyEnabled: 1
+RepositoryAlertMessage: Error loading application data. Please try again later.
+GlobalMaxCharCount: 5000
+EnableEmoticonsSelector: 1
+IdleMode: 1
+SpacerHeight: 5
+TCPCIRReconnectRate: 3000
+MIDlet-Jar-Size: 502719
+BackgroundEnabled: 1
+IsCaseInsensitive: 1
+AlertToneMsg: http://download.ko.mysite.fr/koi/j2me/enc/dingdong.mp3
+NormalNoPollTransition: 1800000
+AlertToneContact: http://download.ko.mysite.fr/koi/j2me/enc/alalal.mp3
+NoPollStateEnabled: 0
+Device: 3
+SupportCustomUTF8: 0
+MIDlet-Info-URL: www.koikoikoi.com
+MsgListWidthTuner: 15
+CommandsType: 1;4;2;4;3;8;5;4;6;2;8;2;9;7;10;4;11;8;23;4;24;3;37;2;68;2;69;7;76;4;80;2;86;6;87;1
+IdleModeTimeOut: 900000
+ShowAboutLogo: 1
+TopMarginFriendName: 2
+ContentLanguage: fr
+FastPollRate: 7000
+NokiaTimeOut: 100
+FastNormalTransition: 20000
+EnableShortProfile: 1
+RepositoryVersion: 1
+MIDlet-Jar-RSA-SHA1: QhSjP7F1q3TGmmNC45cUGclVWB537GtcMLpplIJGe+TyDwJ1Mx5VssNHpp3Qs3C1WHLycvcfOkDT0CscStI0lV/5Xy33z192qEHIT5lkGVz1Rd1nfBHqrIBqv77H7dHW1tdU6RiVajx8jrYYXz+Yh/7U2kskmGXd0bLSYq2cuZZgkiT9YDOLa8OJ1Xn2U4/AYzonM1tjGQvkOniCvwqv0DXDW3GAial5w7hzB4txSopBgWiCO7sEPgkssJIvWQ2dsuLnwb3nU8gsUYWuRqidSI5Dm8mSOEA0zjRoREjTJjkqRZXX3r27rtp+omYh+VNCkXDneiNcaihWpkW5TgMhVg==
+MIDlet-Certificate-1-1: MIIEOTCCAyGgAwIBAgILAQAAAAABFIeLkAEwCQYJKoZIhvcNAQEFBQAwUDELNAkGA1UEBhMCVVsxFzAVBgNVBAoIDlZvZGFmb25lIEdyb3VwMSgwJgYDVQQDEx9Wb2RhZm9uZSAoVHJ1c3RlZCBBcHBsaWNhdGlvbnMpMB4XDTA3MDgyMTA4MzA0NFoXDTEyMDgyMTA4MzA0NFowTzELMAkGA1UEBhMCU0cxFDASBgNVBAoTC05ldXN0YXIgTkdNMSowKAYDVQQDEyFNb2JpbGUgSW5zdGFudCBNZXNzYWdpbmcgMjEuMDguMDcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCFfdEngntebK38dtsdODIkNzMiYsngpTwgnDPqV23m/OtsCX1+1E3+ns9v7EPQVqeTuPYUbUiQRXAYE2NpnUjzNd4bKIXBlk18YpXftMxKv4XRvtVa273O/nbKigtR9IuJx2Pz/x/zWbDpc4ZitRQaRTHy0oA1W+htVI1BBzO8cFC3kf4DTNEXjeYHGF5U7deGp/KuN8qfN7QPJ5gtYyUcwYtrV9imc7P2idLFfYGejm7/s/R3qh9o3bIvqLSHUQbwTQNz7bA7QzpBYkSgaQqzif8+ZYRZuLApjbhpoM5XRFUwQCu6KXx7ZPMKoCKVjof20LWlilUiBrVIXMIwHq0tAgMBAAGjggETMIIBDzAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwUgYDVR0fBEswSTBHoEWgQ4ZBaHR0cDovL2NybC52b2RhZm9uZS1wa2kuY29tL2NybC52L1ZvZGFmb25lVHJ1c3RlZEFwcGxpY2F0aW9ucy5jcmwwOAYIKwYBBQUHAQEELDAqMCgGCCsGAQUFBzABhhxodHRwOi8vb2NzcC52b2RhZm9uZS1wa2kuY29tMBoGA1UdIAQTMBEwDwYNKoY6AAHv9U8BAQMBAzAfBgNVHSMEGDAWgBQ7En6Wl4emCf8AlmWvsw/TeSSR9DAdBgNVHQ4EFgQUadzkP7g69+F/NQGoOfvOG1PC6YowDQYJKoZIhvcNAQEFBQADggEBAK2Z4qE4EFlXYL3ELnsbV/Ri6igPgdXgSZalaw8IKorw19TX7ERpL2tCiyDqisEJygNLW2iok9Nn3DUsmJTr0CoSZFGZc88hkJ9mlDTCQnNa9Hx9XQhp3Ig0uo1Eoei+12kF9j1kVlQJl6QkOPrbdmBbGpv7NFTM29zkPN/4wt3uUvoLZ/ZlbB4NjufZ6gVL77Bt2+UNwKLM4wF39Dy3zTD6qcJPuitGGSss0X4SYX6AzTtNRM+CtTPkFby10pHmmr4ClSfGtOZnXmbGizOIUh/lgOgv/nG9Q+dRDUGDTkhnDwMs1b0reQ0rGE1jFayCJ6Rmn/03FIN5N1SKfgkSeBE=
+MIDlet-Certificate-1-2: MIIECjCCAvKgAwIBAgIFAwEAAzANBgkqhkiG9w0BAQUF8DBLMQswCQYDVQQGEwJVSzEXNBUGA1UEChMOVm9kYWXvbmUgR3JvdXAxIzAhBgNVBAMTGlZvZGFmb25lIChPcGVyYXRvciBEb21haW4pMB4XDTA1MDYxMzExMDAwMFoXDTIxMTIzMTEyMDAwMFowUDELMAkGA1UEBhMCVUsxFzAVBgNVBAoTDlZvZGFmb25lIEdyb3VwMSgwJgYDVQQDEx9Wb2RhZm9uZSAoVHJ1c3RlZCBBcHBsaWNhdGlvbnMpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvfev7oXJy+WKdRjmc2i+Y8vMI3ey/LggGtOhGhY7w1oH1puYttgAjwPP7Ff2qObaJyfFnX81aCopQWeymGzpJtcIv/Z5sZRayBw9ceNIqI7WrwS3Ht//4uqUIH0p6VtPuRukNAnJewbFGgImowwZI4sizQ5Idqxx14lUoOTw8EaE0ygwXSJefS1w/5vuShyujd22F3wHpQnjo/lf05y14x43Uf+PpfFoVzvKm8q/n4VMtzMwi04vkgPjkflT2yay8WWtEpxU6rw8j32EWM/A2+kd4YbTE50I9/XFmIitHajaPVB3piwsChSt4d89UyIP/a+xGkPMultznEdH23SptQIDAQABo4HwMIHtMA4GA1UdDwEB/wQEAwIBBjASBgNVHRMBAf8ECDAGAQH/AgEAMB0GA1UdDgQWBBQ7En6Wl4emCf8AlmWvsw/TeSSR9DAZBgNVHSAEEjAQMA4GDCqGOgAB7/VPAQEDATBNBgNVHR8ERjBEMEKgQKA+hjxodHRwOi8vY3JsLnZvZGFmb25lLXBraS5jb20vY3JsLnYvVm9kYWZvbmVPcGVyYXRvckRvbWFpbi5jcmwwHQYDVR0lBBYwFAYIKwYBBQUHAwMGCCsGAQUFBwMJMB8GA1UdIwQYMBaAFEjdPe/gPJzfErEw/ZHhwen7l9wIMA0GCSqGSIb3DQEBBQUAA4IBAQCaehJEHzna6onjE8bCCsi7A5NxcQ2Cx85PYs67yxQZ0wMQq1khzxsOJPB7H4SoXlceNMvIxpgPFm/ZcLNdeyjoYOQccH+aS6GRSerYX3COdbtWA4Gjq/sB6ghoUZ74+VbXD3t9Rhrnt7fOMe1llWOcf/eoMmvOrJOrBPrC3ZxZEwyHAgyqEJDn2Z8KXTMUr41jge3KyhxRehflRcYhdXzwmE+8LOHaN7xLEZauOuafyBEVpjVN5UaaOm/v8mTn0TymV2j9R7D8Nycbz1gVeMrOhNW2GODxjvu5IoEHQh/myul28EecKGx05Xprcodr0a8Q6LKJg+ihJMxMrS3YEylp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,10 @@
+MIDlet-Jar-URL: https://uljava.gjmptw.de/midlets/harmonized/Local%20Connectivity%20(BT%20and%20IrDa)/BCExchanger/BCExchanger.jar
+MIDlet-Install-Notify: https://uljava.gjmptw.de/Index/Index.php/BCExchanger.jad?installed=BCExchanger_harmony
+MIDlet-1: BCExchangerMIDlet, /icon.png, bcexchanger.BCExchangerMIDlet
+MIDlet-Description: Demonstrates the usage of the JSR-82 Bluetooth OBEX API by exchanging business cards between devices.
+MIDlet-Jar-Size: 29967
+MIDlet-Name: BCExchanger
+MIDlet-Vendor: Forum Nokia
+MIDlet-Version: 1.0.0
+MicroEdition-Configuration: CLDC-1.1
+MicroEdition-Profile: MIDP-2.0
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.zip has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/DevCertTestMIDlet.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,14 @@
+MIDlet-1: DevCertTestMIDlet, , com.nokia.midp.test.devcerttests.DevCertTestMIDlet
+MIDlet-Jar-Size: 3152
+MIDlet-Jar-URL: DevCertTestMIDlet.jar
+MIDlet-Name: DevCertTestMIDlet
+MIDlet-Permissions: javax.microedition.pim.ContactList.read,javax.microedition.pim.ContactList.write,javax.microedition.io.Connector.http
+MIDlet-Permissions-Opt: javax.microedition.io.Connector.https
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+httpUrl: http://www.google.com
+httpsUrl: https://www.google.com
+MIDlet-Certificate-1-1: MIJs7jCCbFegAwIBAgIJAPNUaScSr5cxMA0GCSqGSIb3DQEBBQUAMHMxCzAJBgNVBAYTAmZpMRIwEAYDVQQIEwlQaXJrYW5tYWExEDAOBgNVBAcTB1RhbXBlcmUxDjAMBgNVBAoTBU5va2lhMQ0wCwYDVQQLEwRKYXZhMR8wHQYDVQQDDBZKUF9EZXZpY2VfTWFudWZhY3R1cmVyMB4XDTA5MDkxNjExNDk1M1oXDTEwMDkxNjExNDk1M1owNTELMAkGA1UEBhMCRkkxEDAOBgNVBAcTB1RhbXBlcmUxFDASBgNVBAMTC0phdmFEZXZDZXJ0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXZ/GCV/N8foAkCQJfoiwGlwHO+f1lV9zloo0r0zosGtVqItLXKrvXEKylpOVWBygRVVrkl30Y1Cxess4aS1UmZ1rcvwL0jcvwlkZGacJazjtHE4UQuYJz9WRbYOaQxR2SVS/wU2Ptu/mr0ZgqFhgaJ1FzCuBdNaWzx2mGV9az/QIDAQABo4JqxjCCasIwKQYDVR0gBCIwIDAOBgwrBgEEAV4BMQEBAwQwDgYMKwYBBAEqAm4CAgICMA4GA1UdDwEB/wQEAwIHgDAXBgNVHSUEEDAOBgwrBgEEAV4BMQECAgMwgmpqBgwrBgEEAV4BMQECAgcBAf8EgmpVMIJqUQwPMDA0NDAxMDE1MDc2OTU5DA8xNDM3MjU3ODc0MDc3MzAMDzAwNDQwMTEwNDIzNjk4NQwPODUxODA4MzAxNzgwMzcwDA84MzYwMTU2MDMxNDY4MjgMDzM2ODYxNzM4NzAzNzM4MAwPNzY2NjI2NTYyMDM3MzI4DA84NjgwMjIwNjUxODczMTgMDzQ3NTEzNTQ0MzEwMzQwNAwPNDY0NTI4NzEzODY1MDY1DA84NjEyMTU3NzIwMDczODUMDzQwNzQ3NTAzMTI1NjYxOAwPNzQxMDY1MDUxNDE1ODI2DA81MzI1MTM4NTc4MzM1NTMMDzA4ODQ1NDM0Mjg4ODg2NQwPMTY1MTEwMDA3ODE1NTE2DA83NzYwMTU4NDUzNDgyODgMDzIyNTUzNTY4NjA4ODYwNQwPNDUzNTUyMTc2Mzc2MjcyDA8zNTAwNTM1MjQxMzMyMDYMDzg4NzU3ODg4NzM2MTM0NwwPNzgxODA1MjY0ODE0MzQyDA8yNTM4ODg2NzUzNzUxMjgMDzMyODczMzE2Nzc1MDg1OAwPMjA2Mzg1NDYyMTM4MjUyDA82NTA1NTIwNDcyMjIzNDMMDzA2MjQ4NzM2NTAxMzMyNgwPMzM4NjAxODY2NTcwMzcwDA8yNzcwMTgyMTEyODYzMzYMDzA3MDE2MzQ1MzQ3MzExMwwPMDM3MDI1ODcxMzE3ODc3DA81MjMyNDMzODgyMDA0NDIMDzg1NTcwODIzMzAyNjQzMQwPNTQzNDU4MzEzMzc1ODI1DA80MDgwMzUwNTQxODIxNzcMDzcxNjYyMjEzMzMzMjEzNAwPMTAzNzY1NTEwNDcwODQ3DA80NjAxNzgwODEwMTQ0NjYMDzMxMDYxMTQzNzY2NDUyMAwPMDQwMjM1MTMxMDE3NjI0DA8xNTIyMzUzNjA1MDg1NDQMDzc1NjU3Mjc2NDI1ODE3NQwPNjcwNjcyMTIyMzAzMjU3DA83NzUyNjU0NzQ3MjgwMjMMDzQyMTgwMzg1MjE0MjE2NQwPODE0MTcxODU0NjQ4MjcyDA80Mzg2MTIwNDczMDY2MzUMDzY2ODA4ODQ1MjM3NDAxNAwPMjMwMDgyNjEzNDYzNTM2DA8yODA4MTYyMjMyMTExMTYMDzc4MjM3MzE2NzgwMTgwMwwPMDYyNjU3NTgwODMxODMxDA82NzI0Njg2NDc0NTUwNTYMDzgyNTUyODAzMjY0NzQ0MwwPNDU2MzAxNTA4NzEwMDMzDA8xODgzMTg4MjAzNjI0NTcMDzQ4NDM3NjExMDUzNDQyMgwPMjMyMzU0MTQzNDE1NTU4DA84NDc2NzAxNzc3MDI0MTAMDzc4NDIzMTY3MDE3NDY1NQwPNDc2Nzg0NDI1MDE1MTMyDA81MTEzMTU3ODA1NjcxNDMMDzA1MDUxNjgyNDg1Mzc3NQwPNDUxNTA1NjA0MTE3NjQ3DA8wNzc3MzU0MTc0NzcwNzcMDzQ4ODQ3NzYzNTE3MTU1NgwPMTQ4NjM0MzM1MDgzNTgzDA8yMjMxMzE0NzI1Mzc0NzcMDzY1ODQ4ODQ2NzI0MjA1NQwPMzYwMTU2NDYwODU1ODM1DA8zNDc1MTczMjM2NDMwNDYMDzMwNTE3MDA0NDQyNjQ4MQwPMDg4NzMzMjAyMzUzNzQwDA8zNDY2NzY1MjY4MDA1MDMMDzUwODQ1MDEwNjM3MzY1NgwPMjAxNzM2NzEyMDUwNDg3DA80MDMwMDg1ODMwMzE1NTIMDzM4NTUyMDQ2ODA2ODAxMgwPNzIwNDc3Njc4NjM2NDg3DA84MTM4MTc1NDQzNTY3MzAMDzgyNzIyMzc3MzY1NTEzNQwPNjQ3MDEwNTUyMDA3ODY2DA8xODAzMjExMTg4ODY2NzIMDzc0MjEzMzg4MzgxNDIzNQwPNTc1MzU1NzQ4NTMwODgwDA8zMTAzNzAxMTY1NDcyNDMMDzQ0NDQ4NTU1Mzg0NTE3NQwPNzQzNzc1NzA4MjM2NDM3DA8yMzc1MjQxNTg3MTUxMTMMDzI3NzQwNTUzMDE2MzAyMAwPMTgyMzA3MTU2Mzg3MzM2DA8xMDMwMzA2NjIyNjA0NzAMDzE0MTYyMTU3MDI1MzI0NAwPNDY0MDcyMjc2NjQ1ODM3DA80NTUxNzc3NDczMDQ1NTcMDzI2NzYwODgyNjY3ODY0NgwPMzQwNjM1NjMyNTc3NDg0DA8wMTUxNzcwMzI2NjM4MDUMDzgwNzI2ODcwNzY3NjQwNQwPMjA1NzQ2NTE1NTQzMDIzDA82NDU3MzA4MTUxNjcwMzUMDzAzNDEzNjM0Mjc3NTAxNwwPNTc4ODAyODAyNDYzMzYyDA84NDA1MDUzMjE4MjM2MjcMDzA3NzEyNzYxMTEyNjUyNgwPMDE4NzU0NDgwMDM3NDM4DA8wMjEyNTgwNzAzNDE1NzgMDzg2MzAyNjcxNDcwMDYyNAwPMDU2NjQ0MjQ2NjA1MTEzDA8xMjIyMDMxNTcwNTg2MjEMDzgxMDY3NjQ2MjU0MDU1MwwPMTUxMzM1NzUyNTI3NDc0DA8wNjA3MzQyODg0MTgzNTQMDzEyNzYxMjI2NjE0MjUxMAwPODY2MTI0NDU3NzE2NDQxDA8zNDAwNjI0ODY3ODE2NjYMDzA1NzcyMjMwNTE4MzQ4MgwPODMzMzU2NTI3NDI3ODc2DA8zMTA2MjI0NjI0MTM0MzQMDzQ3NDYwODY1MzEyNjA2NAwPMDQzMzIyNzg1MDgxNzM2DA8zNzY0MTAzNzcyODQ2NTIMDzYxNDg3MzQxNDY4MTA3NQwPNjM2NDc1NTgzMDgxNTE4DA8zNzIzODAxMjgzNDAwMzUMDzcxMzEwNzAyNzIwNDcwMQwPNTU2MDA4MTY1MDg4MDMzDA83MjQ4MzQ4MTgyNjY2NTcMDzA2ODA2MTMwNDcyMzg0NgwPMTMzMzY1MjMwODQ1MDUyDA81NDQ2MDI1NjQzNzU0MjgMDzQ4MTM0ODQ3ODAwMjEwMAwPNDExMzA0MTUzMDA0NjcyDA83NTYyMzUxNzc3MDEzNTAMDzIwMTI3NTg3ODMzMTc0NwwPNTg2MTQ4NTYyMzM2NjgzDA84MDQ3Mzc1MjM0NTgzMjYMDzMyODYxNjI3NzQwMjAwOAwPNjU1ODMwNTExNTEwNTA4DA8wNDgwMDc1Nzg2NzIyODUMDzM1ODM2MTM4NDEyMDcwNQwPNTg1MzA2NzU1MjUwMDI3DA81MDU3NjQ3MjQ2MTExNjcMDzQ2NjU2MTc0NTMxMDU3NAwPNDU1MTUwMjI4NjQ3MTc3DA8yNDM1NDY0NTY1MDI4MzAMDzUyMDI4NjUzNDE0MTQ0MQwPMTUzNDA4MDc0NzAzMDE0DA81NjUwNjE1MTEwMjM2MTAMDzQ4MDExNDMwNzIwMTc1MwwPMjQ1Mjc2ODc3MTg3ODY2DA80MDY3MDgxMjM1NzExODQMDzQxMzU2MTA4NTY2MTAxNgwPNDIyMjI2NjEwMDcyMzgwDA8yMTEwNDE3MjU1MjM2MzYMDzU3ODM1NDE2MjQ3MzIzMwwPMDU4MTExMDQ3NzQxMjEwDA82NDUyMTAyMDAxNzI2NDgMDzA0MzEzMTc1MDE0NDA4MgwPODc3NTIxODg2NjE3NzU4DA80NjYxNTgyNTA2MTUzNjgMDzg3NTY4MzA4NjE2MjExMQwPMDQ4NjQzNjM1NzEwODUwDA8wNzg1NzY2NTYzODE4MzUMDzE4NTQzNTU4NTE3MjU3NAwPNDMxNjYxMjc4NTUwNDU0DA8yNTgwNzQ4NjU3MjM1MzAMDzM0MDc4ODYzODA2NzQ2NQwPNjE4NDIzNjMwMTM0NzczDA8yNjgwODQyNzQ0NzAzMjAMDzI4MDgxNDMxMjA2NzM1NQwPNDEyNjUxMTA4MzAxMTYzDA80NTE4ODIxODc4NTcyMjAMDzQ3NTYwODc2ODE0NzY2NgwPMDU3MDAzMjcxMTUyODI3DA8yNjAwMDYzODg2MjExNjYMDzM1MDg3NDQxMDUyMTMwOAwPODM1MDAwMzUzNTcxMTQwDA81MTU3MjAzMDYxMjg3NTYMDzA1ODgzNzY0ODQwNDg1NQwPNDA4NDg2NjQ0NDMzNDM2DA82NTg0ODM0MTIxMjM2NzcMDzU4ODA0NzA1NTM0MDYzOAwPNTA3NDMzMTMwMDY3MDY1DA8yNjQwNjcxNzc3NDc4NTgMDzQ4NTEwMTM4MTY1NjE1MAwPMzEwNzYzMzY2MjIxNDU1DA83NzIzMjMyMTEyMTQyMjQMDzU0ODg4MTU0Mzg4MTY0NwwPNDc2NTYyNTE3NzIzMTE2DA8wMTAwMTQ0NjEyODE4MDYMDzUwNzM1NzA3MDM4MDUyNwwPNTg3NDQ3ODIyMTExNTA2DA81MzY2NTExMjI2ODc0NzIMDzIxNDc0NTAwNjU0NTcyOAwPMjg2MTY2NzUxMTA2MzA4DA8xNjg3NzA1NDQ1MTIyMTcMDzM1MjU3MzcwMzQxMzU0MwwPMzAxNDEwODc4NDI2MjE1DA8zNDY2ODQxODUwNjgxMjMMDzUzMzA2NTMyMzEzNjI0NQwPNjA1MDE3ODUyNzU1NDM1DA80NzcxMzg3NTc0MjM2NjgMDzY2NzA4Mjc1NDUwNTUyMgwPODczMjQ1MTM4MTAwNDAwDA81NTc1MDI0ODczMjQ1NzEMDzI1MTEwNDAzMTcyNjI1NAwPNjI4MTA0NTEyMTU0MDAxDA80NzQzMDM1MTExMjI1NDUMDzQ4NDY4ODc1MDg2MTI4MgwPNTMxNjY0ODAxMjA3NjY0DA80NDc3NjA0MDUzMjM1NDcMDzgxODA2NjQ0MjgyMzQxMQwPNDg0NzQ1NzUzNTcxNTAyDA83MDM1NDE4Mjg3NjUwNzgMDzA0NDAwODczMTEyNTY0NAwPNTM0NTAzNjE4NTA3MDczDA83MDQ0NzE4NTE4MzQ1NDYMDzM0ODEwNjMzMTUyMDg0MgwPNzY0MDY3NTYyMjM1MjA0DA80NzQwMzEyNTI1ODE3NDUMDzU2NzQzNzQ4MzY2MjQ0NgwPNTIyNzM0NTg4MTY2NjE4DA8zNDU1NTQ0NzA0ODgwMjIMDzAzMjMzMjAyMzYyNjQzMAwPNjUwMDg0NDc1NTU1ODYyDA82ODE0ODA1NTM3NzM0NzcMDzM0NzMyMDI1NjE3NDg3MgwPMTA0NTIxNjY2Njg2NjI4DA81Njc2NDg1MTM3MjMzNzMMDzU4NzUxNzg4NDA2MzAzNAwPMjI1NTI3MDAxMTYyNDU1DA8zNTc2MjQzNDc1Nzc0NTAMDzY3NjQyNjQzODc2NzI0MAwPNDg2ODM0MTAwODA4NzU3DA8xNTg1NjY0NDM3MDA2ODUMDzY0NDY2ODE4MDU0NzY0MwwPMDQyMzU3MTQ3MTgyNjY0DA80NTA3NTQzODQyMzA2MzEMDzA1ODA3Mjc4MjIyODI4MwwPNTY1NjE1NjEwMzQxNzYwDA84NzIzNzIyODc0ODIzNTIMDzYzMDE2NzY0ODE1Njg4NgwPNjEwNDAzMzg2MDUzMTY4DA8zODA1ODQyMTE0ODEwNjUMDzExMzg0NTM0NDY3MjI1NgwPMjY2NDY1MzEzNTUzMjg4DA80MDExNTc2NzMyODAyMDcMDzc2NzI3NTQ2NjM0MzA3MgwPNDczMjY2NDY3MTU3NjA3DA8wMjY2NTQ2MzA1MzEyMjUMDzYxMzU2NjgxNjExMzg0MgwPNzE1MTE2MjE2NDI1NzcxDA8wMjY4MzcyMTQ2MDMyMzMMDzE2NjM2MzY1MzE3ODUwNAwPNjgyNDAwNjExMzQ0NTM3DA80MDE3NDM0MzMwNDI1NDYMDzY0MDc0MDMyNDg4MDgzNQwPNDU2MTQ0ODM1MTg2MTYyDA8xODI0NTYyNjI0NTcwMjQMDzQwMzEzNjc4ODY1NzI0NgwPNzUyMjE3NjI3NTQxMTIxDA8zMTcyMTQxNTgyMTYxMzgMDzM2MDI3ODA3MjA3MTA0OAwPMDU4MjA4MDgzMjg4NzIwDA80MTgxNDgwMDUyNzc2NTgMDzM0MTg1ODQyMjgwODYzNwwPNTU1MzIxMDI3MjMyNTE3DA83MjYyNjY3NTQ2Mjc2MzUMDzQwODc2NTg0NDExMzQ1NAwPMzAzMzc2ODIyODg0MTc4DA80MDE3MDI0NTMyMDYyNzQMDzIxMTcwNDc2NTE3MTIzNAwPMTg0NzEwMDY3NzgyMjAzDA8yNjIwMDAyMDQ1MjI1NjQMDzg4NDI0Nzg4NDI3Mzg4MAwPMTIzODAyMTI0Njc1NDA4DA8zMTczMDYyMjY4ODIwODQMDzQxMzc2NzQ4MzEyMjQ2MwwPMjc3MDU0NDI0MDQ3MzgyDA8xMTYwODA4NzU2NjE0NzEMDzE2MzY3MTIzNzg4NzIyMwwPODc0ODI1NjYxMTczNTU2DA80MjU1MTg0NjA2NTI2NzIMDzA1NzMyNzU0NTgxNTE2MAwPNDIwMzU0MzA3MzI2MzQwDA83NjQzMjYxMTc0MTQxMzcMDzQxNDEzODIyNzQ1MTc3OAwPNDE0MjE4MjQ3MzI4NzEzDA81NTAwNzE0MjIyMTE1MTAMDzE2MjcxODUwNzQ1NjYyMQwPNzE0NDc3MjI4MjAzMzE0DA80NzgwODAwMDAwNTg0MzcMDzI1NjQ4MTY1ODQzMzQ0MAwPNjYyODU0MzU2NjY4MzQ1DA8yNDE2ODY2NzY1NzI1NzgMDzUwMzIxNDE1MDU1MTU1MgwPNjAwNDU0MTI1MDU4MTc3DA83MjYxNjQ2NzY3MjMyMTgMDzUyNjMxMDMwMjMyNDA4MgwPNjgwNTEwMzE1NzI3ODgyDA80MjY4NzgzODE1MTcxMjgMDzQ3MzQ3NzI2MzM1NjAyNwwPNDgxODE4MDg3NTMxNjE4DA82NTIzMTY3NjY1MDg1MzIMDzM0NjgxNTI1NTcxNjc4MgwPNTcyNTY1ODQ4ODM2MzA2DA81MzMzNjQ3MzAyNjM3MzcMDzAwNTI1MjQ2ODEyODA2MAwPNzYxODIzNjM0NjA2NTQ0DA8yMDY4NDA1MzQ1MDE2MjUMDzgyNjg3MDExMTA4NzQ1MAwPNzcwNjUzNDE4MjE3NDU4DA83NjM0MzY4MTI4NDg3MjgMDzA2MjYzMjQyNjM1NTI0MAwPNTUzMDY1MzQ2NTU0MjQ2DA8zMDE3NjQyMjQ3MzA2MDEMDzM3MTUxMTM2MjQxMjA3MwwPMDgyMDg3MTc0MDA2NjA4DA8zMTg1NzQwNjA4NjA1MTgMDzQ4MjQ1MjIxMTUwNzIxMQwPNTQwNTAwNTQ2NzcyMDI2DA8xNjczNTAwMDQ2NzAzNDYMDzQzNTExMzIyMjE2NTExNgwPNjY3ODMzMTY0MTM0MTYwDA81MTI2MzYxNDEyNjIyNjcMDzcxMjA2ODA3NzUyMzMzNQwPNjY4MDMxMDc1MzU1NzU2DA82NTM3ODgxMzI1MDUxNjgMDzg2NjIyNTgxNzI3ODMzNgwPMjg2NTg3NDc2NjM0NzMzDA80NTQ2MTQ0MzU2MzY2NjIMDzQxMzU3ODEzMjMyNzgyMAwPNjMxMzQ1MzA2Nzc1NTQ0DA81ODA0NDczNDUzMjgzNTgMDzY1NTI1NTU4NzYxMzQ4NwwPMjUwMjAzODUyMTM3Mjg0DA81Mjg3NDYzNjg1MjAwNDgMDzIxNjE1NzQzODM0ODA3NgwPMjEzMzAzMTE1MzEwNzM0DA8zNzUwNzg0NDgwNDcwODAMDzM3Nzc1MTE3MzExMDc3NQwPODE0MDAyNjIxMjIyNDUyDA81NzY0MzM2NjAyNjMyNTAMDzIzNDAyMTI0MDExODA1NgwPODg3NjE1Nzg3NzEyMTAzDA84NTUzNTYxODA3NDE2NjgMDzc3NjA4NzgwNzgyMjE3MwwPNjU3MTg1NjcxMjIwMTI4DA8wNTU2NDAyNTQ4NzU3MTEMDzcyMDMyMDE0MjI3NjU1MAwPNjE2NTgzMDcxODIyNTc0DA81MTEwNDQ0MzEwNjg0MTAMDzgzMDg1NTM2MTAwMTQ1NwwPODAwMjA0NDAzMzAxMDI2DA8wNDM0NjIxNjg3NTE3NzUMDzI2MjYyMTc4NzgxNjQzMgwPNTc1NTU1MTQ2MTIwODY4DA8zNDEzODI1MTYwMjI0MzUMDzE2NTgzNzE2NDM2ODAyMgwPNzY3Njg0NzI2MTE3NDA1DA8yNjM1MzU4NDExNTEzNzAMDzAyMzAyMDE3NjM4MTI2NwwPNTg1MTI2MjgyMzgwMDQ3DA81MzgxNDI2MTgyMDM2MzQMDzczNDM1NjA1NTEwODIwNwwPNjA2NTA3MzE1MTE2NjE3DA8xMTgyMjA2MzYxNjEzODUMDzQ2NjY4MjE1NzIzNjg4MQwPNDUwNTc3MzI0Nzc4NzQ3DA80NjE1MzAwNTIxMDAzMjUMDzM1MTc4NjY1MzQ2NTYyOAwPNjIwMDE0NDM4NzMzNTM0DA8yODQ1MjA2NTE4NjM3MjAMDzUwODA1NTQwMzM3MDEzMgwPMzIzMjI2NzM3NzY4MTY1DA8wMTQyNDcyMTM2NDA0ODEMDzI0MDYxNzgzMDc4MjU3NQwPNDc2Mzc2NTY4NTQ4MDcwDA8yMzY4MzI4ODMwMTYzMDcMDzIzODYzODI3NjIzNzA2OAwPNTA3NzYxNDc1NDQ4MzUwDA83MjgxMDAwMzAzNzY3NzgMDzU2NjMxNDU3MDU1NTA2MAwPODY4NzExNjIzMTc0MzMwDA84MTQxMDgxNzU2NTI3MjMMDzIyMTc0MjQzMjY1NzM2MQwPNjA3NjgxMzYxNTgxMDU1DA83MzMwMDE0MDE2NzQ4MzgMDzY0MDQwMDUwMzA2MjI1NwwPMTI3NDI0MjQ0NTc4MzMwDA8xMDcwNjM1MTc3NzIwMjUMDzQ1MDUyODE3MzU1Mzg4NwwPNzE1NTExNDYyMDE2NzczDA8zNjQ4NzcxMzAzODExMjgMDzEzNDAwMTQ3MDI0MTE2MAwPODAzNjQ2NTE1NTIzMTUwDA8wODcxNDI3ODc1MTA3NjAMDzM0MjI3ODcxMjM3MjEwNgwPMzc0MDA3ODMwNjcxNzU2DA83NDY1MzE1MDAzMDU4NjcMDzEyNjM2MjQ4MzUzMzA1OAwPMjMzMjIwMDI3MTE1NTE1DA80MTQzNjMwMzc3NzA1NjYMDzM1NTE1MjEyNDAwMDg2MgwPODQwNzczNDU1Nzg1MTgwDA80NTc2NDQyMDExMjIzNDYMDzEzMzg3ODMyMjgyODU4MQwPNzM0NDQ3NTMyNTAzNTIwDA8zMTAwNDQyODYyNzczMTEMDzI4MTY3MDY2MTIyMzE0OAwPNTAyMDI2ODE1NzE4NDI3DA8wMzA3Njg1ODE1ODI2NDEMDzI4MjQ4MDYxNDU1NzMxMwwPNDU3Njc0NTU0MzI0NDA1DA84MTc0MTc2ODI4NTcwODEMDzMwNDE0ODI1MjEyMDY2NQwPNTEzMzExNDMzNzA1Njc2DA83NzUzNDI0Njg0MTI3ODEMDzM0NzgyNTczODc3NzA0OAwPNzIzODQ3NDYzMDQwNTI4DA8zNTI0MzA3MDc2MDYxNTIMDzc3ODgzNDU4MTI0NzQxMQwPMzQwNjIyMjMxMDg1MjM4DA83MzQyODIwMzU1NjA4MjEMDzgxMzgxMjY2NTI4NzQwMQwPMjI4MDI4NTExODUwMzI1DA8yNzgwNzE0ODE4MDIzODAMDzM4ODg0NTU0NTcwMzIzMgwPMDgwMDE0MzUxNDM1NTEzDA8wNzQzODUxNjcwNTUwMDcMDzQ2MzQxODM0MTUyNzAwMgwPODAzMDcyMTM2NDI0ODg3DA80NjAxMjMwNjgzNTIyMTcMDzMxNzAwNjU1MDE0Njg1MwwPMTcwMzIyODAxMTY2NTgwDA83MTM2NDU4MjI2Mjg4ODMMDzA3NTA0ODc2NzgyNjg3OAwPMDQ2MjA2ODYyNDY4NTgzDA8wMjc3ODM2MjgzMzgyNDYMDzIzMTY3MjA0NzAzNjc1NQwPMTUzMzIxMTQ1MzAwODQwDA83MTIyNTMyODQyNTExNTMMDzYzMDMyNjcyMjU3MzQzNwwPNzY0MTIwMjEyNTc2NzUwDA82MzUyMjczNzYxMTU2ODYMDzI3NDc2NDYzMzc3MTcyMAwPMzM0ODIzMjM0NTY2MjE4DA8yODYwNTg1NDAyNzM4NjQMDzA3NTg2MDMxODE3ODIyNgwPMTE3MzY3MzIzNTg0NjgwDA80MjI2ODg0MDc2NTE0MjQMDzQyODgxNjA2MjE0MzI0NQwPNjEyMDY3NTU1NzUxMjMzDA8yMTcyODM3MDg4NDY4NDYMDzc4MzgwMDI2NzcyMzE0MwwPNTc3NzY1MTI2MDI3ODU2DA8wODAwMDM3ODIzMjA3MDcMDzM3MzM3NTA1MzY1MDQzMAwPMzg1MjI0MDY0MDU3MzUzDA84ODQ4MjMxMzg0MDA4NzAMDzA3NzQ0NjYwNDEwMjMwNgwPNzM4MjgwMjM1NzYxNjg4DA83NzM2ODAxODU1NjIzMzMMDzU3MDY1MjYwMDQyNTMzMQwPMjQyNjQxNTcwMjg3MTMwDA8wNTc0NjczNDc3NDc1NjUMDzczODIzNjU3MzgwNDU0MAwPMDU1MzIxMzE3ODgzNDgzDA8zNTEzMjc1MDMwMzQwNDYMDzA2MjMxNTQ4NjY3NzI1NwwPMDc0MDEwNDMwMTI2MTY0DA83MDQ4MDE1NDI1ODI1NDQMDzE2Mjc3MjQyNTg2MTgzOAwPNTY4ODgyNzI1NzY3MTcxDA8wNzgyNTQ1NDE2NDM2NDYMDzY3MzE3NzI3ODM4MTgyNwwPNzEwNzU0Mzg0Mzg3MDg1DA8yMzEyNjg1NjA0NzIzNTYMDzIzMDYyNjgzODQxNTg2OAwPODcxMjIyMzI4MDY4NTQwDA80NTg3ODUxMTIyMzY4MjAMDzQxMjQyMzYyNTE1MDYyMAwPMjUwODUzNzExMjAzNDQ3DA82MDExNTcwMzg3NzUzMjcMDzM2NTQ2NDM3MjE2Nzg4NAwPMTU2MjAyMDgyMjQyMTQzDA84MjYwMDQwMzc3NTcyODAMDzIxNTQ1MDIzMjA4NjE1NAwPNTY3MDE4NTI3MDc2NjI1DA8yNDUyMjc0NjUxNjYzMDQMDzc4ODI4MTAyMDQ0MDQ1MQwPNDc2ODQ3MDI4ODg0MTYwDA83NzE0NDY1MjY1NTA3MzUMDzc1NDIyMzg1NTYzNjAxNwwPMTQ0NjE1NTA4MzQwMjA4DA83MjcxNjUwODMwNzgwMDUMDzEyNjQ1MzIyMjMwNjY3NwwPMjU3NTExNzY3ODQwMjgwDA8yNTg4MTA3MzYzNTAwNjAMDzE1Mjg1MjM0ODcxNjU0MgwPMzE0NDE1NzcyODc1NzA0DA83NjE3NzU3MDUwNjg4MzgMDzA0MzU2NzE4NjI0ODI4OAwPMDMzNTc0MjI3NzE3Mzc0DA81MDIyMDY4NjM1NTY0MzcMDzgxODM3ODMzNzE2NDQzMwwPMzExNDI4ODQyNTQxNDEwDA83ODYxNzQyNTE0MDc1NDMMDzM1NDg2ODQxNTAwNzQyNAwPNzg4Njg0Njc4Nzc4NTc0DA8wODc3MjAyMDUyMjA2NzQMDzIzNzQyMTcxODA2NTU2NAwPNjQzNjIwNzU1Mjc0MzM1DA81MTg0MDMyMDY0NzIxNzgMDzA1NzIzMzQ3MjUwNDQyNQwPNTgxMzI2NDY1MjY3NjYxDA8yNzc3ODM1NzM1MDc3NTUMDzg4NTAwMjA0ODc3MDAxMAwPNDczNzIzNjcxMjgzMzE3DA8yMTQzMTgxMjcwODE4MTAMDzA4NDU2ODg2NTAwMjcxMAwPNDc2NjE1MTg4NjAzNjMxDA83MDcwMDcxNzQ1ODM3MTAMDzYxMTUyNjcwMTEzNzEwMwwPMjEyMTczNzM1MDI3ODA2DA8wODgyMzgzMzEzMjA1NDUMDzU1NjEzODEyMjYyNjU4NgwPNTU4NDQyNzQ1ODI4NDI4DA8wNDQwMDIxNDUzMTAwNDMMDzU4MjQ1NzM0Mzc3MTY0NgwPMDg3NTM3NTY4NTMyNTQ4DA81MDI0NjU3NjA4ODg0NDcMDzE1MTUwMzYyMjE2NjM4NwwPMzQ0NzQxMjI2NDU3MTIyDA8yODIzMDU3ODI0NjY2MzQMDzYyNDMwNjE1NTAxMTU2MAwPMzA2NTE2NDUyNjI3NzUyDA81NDMxODc4MTg0Mjc1NDgMDzQwMTE4NzA2NTgxMDcxMgwPODc4MTgzNjE3NDUyMDE3DA8xNTI0NzgzMjY3NjUyNTUMDzEwNDIzNjgyMDY3NzEyMgwPMjM2MDM4MDczNTU3ODU1DA84NjAwMDI2NTczODQ1MzcMDzcxMjQ2NjAzMzAxMzI0NgwPNjU4NDcyMzM0NzgyNDUyDA82Mzg3ODY0MjMzMzg1NDIMDzUyODA4NzA0NjYxNzQxNAwPMjM4NjMwMTM2NzY1ODczDA80NjM1NTc0MTM2Nzg1MjUMDzAxMTQzODU3NzQxMTUxMgwPODYwNzQwMTg0Mjg0MDc1DA8xNzQyNTgzMDEwMzU0MDMMDzc0NzYyNjI3NDg2MzA2MwwPMTcxMDY2NTMwNTg1NjEzDA8zMDYyNDU0MTcwMzUyNDUMDzQ2ODUwMTA2MjEwNzUxNwwPODQ3Mzc1NjUxNzcwNTMxDA8zMDM2NjM3MzY4MzAxNjYMDzc3MDQ2MjY0MTMwNzg4MAwPMDcxNTUxNTMxNDYzMzIwDA81NzAxNTgyMjMyODcwMzgMDzE4NzA4NDUyNTUyNjM4MAwPMjY2NTE1MzAxODgzNTc2DA8yNDc2ODY4NjcxMzYzNjEMDzcxODM2ODAyMTIzNjQwMAwPMDIyNzUzMjcwMDAyODg1DA82MDMxMTgxNjA2NzY2ODQMDzY1Nzg2Njc1NDU2NTM2OAwPMDgyMjE1MjQyMDcyMzEwDA8wMDYwMDM1NDQyMDA1MzcMDzMwNzU2NTUxMzEzNzYxMAwPNTY0MjIyMTA3MjI1MzE1DA82ODQyODIxODg0NTYzNzIMDzQ4NzY1MDYwMTQ4NDMwMAwPNTU4MDYyMjgwMzE4NzQ1DA82NDM0ODMzNjE0NjI0MzIMDzY4MTY4MDExODUwNzg2NAwPMjU3MDMwMjQxNTA0ODY4DA82ODg0MDQ2NDU0NDEyMjMMDzMyMjQ4ODIyMzI1MTA1NAwPMTQ1MzcxODMyMDUxMDQ0DA8yNjQ2MDYzMDMzNjAxMDEMDzg4NDgyMzQ0ODM0ODgwNAwPMTQxMzgzODEyNDU0NTIwDA8wNjA2MTU3NzUwNTM2MjUMDzc3NDQwNjAzMzQ1NjI0NgwPMTQ4MzM3MzE2MTQwNTA0DA81MDU0MzI3NDU3MzY1ODMMDzQwMjEzNzU1MTI0NzY2MgwPNzQwNjI1NDg4NDcwNjYxDA80NDIxMjc2MjQ4ODc2MTgMDzA4NDgxNDgxODMyMTg1MgwPMTg1MDg2MjEwNTY3ODE2DA8xMjUwMjQxMzUwNTcxNzEMDzQwMzg2ODQ2NzMyNjQ0NgwPMjY1MTgyNzQyNjM1ODU4DA80ODczODUxNDczNjA4NTcMDzIwMzU2MjQzMTQ3NzQ1NgwPMzA3NzA2NTg3MTY2ODU0DA80NzQ3NTI3MzE3MzEzNjUMDzQzNjQwNzgxNTgwNTI1OAwPNjYxNjI0MTQ2NDI4NDMxDA80MTI2MjE0NjU2MTMyNTgMDzQ1ODc1NTI2NDY1MDM3MAwPMjcxODczNDE3MTU0NTMwDA83NjM0NTMyMzE2NTA0MTMMDzU3ODYxMzM2MjM1NDI3NQwPMDcyMjc1MzUyNjcyMDU0DA83NzM0NjE1MTQ1NzQyMzQMDzI3MDQ4Njg2MjIyNzI3MAwPNjE3NTYxNDA2NzcyNjQ0DA83NDc3MDc3NjIyMzg1NjEMDzA3NDYwMzA4NzE0NzA0MgwPODU1Njg1NDA1MjQ0NTQ0DA80NTM0NzMyODM1NDU3NzgMDzQ4NTU2Mzc0NTIxNTI0MAwPODEyMDg4MTM2NTY3NDA3DA8xMTU2NzEyMDgzODcwNzUMDzgxMTI0MjE0ODczMDA1MAwPODIyNzU4MTEwNjYxMzUwDA8xNzcxNjU0NTIxNzIyMDEMDzczODM3MjIxMDYyNDc1NgwPMzUzNzY4NjE1NzY3NDM0DA84NTg4NzMwMzU0MTA4NTYMDzcxMDYwMTc1MzczNzMwNAwPMTU4ODAzMTA2NjU4MTIzDA84NTc3MDY4MzQwNzc3MjAMDzI2ODI2Nzc1NjQ2Mzg2NgwPODgxMzUyNjE0NzU4MDgwDA80ODc2MzQwNDE3NTg3NDgMDzQ2MzAxODU2MjQwNzEwNAwPNzg2NTA1ODQ3MzY0NDM2DA8wNzg4MTE3MzEwNTUwNTEMDzQwMjYxNjQyNDAzNzg3NQwPMjMzMDMxNTMzMDE3NDA2DA8xNzMxNTE4NjYzNzc2ODIMDzE1MTc0MzE1MzExNjc0NwwPNTIyNjE2NzM1MzMwMTMzDA82NTQ3MjAwODc2NjA1MTgMDzQ3NTgwMDM1MTIyNzMwNwwPNzExMjYxNTgwMjAxMjQzDA80ODYwODMwMjAyNjQ4NjAMDzE1NjIyMTAzNTIxMDc3NAwPNjEyNjMyNTgxMDQyMDY2DA84MDU2NjM3MzUwMTQ0MDMMDzc2MTQ1MzcwODU0MzI2NgwPMTI4NjE1NDg1NzI0NDIxDA81MjExNDY3NDU1Mzg2NTMMDzAwODM1MzAxNzE2NDgwNgwPNTgxNDQyMTIzMTAyODU0DA8zNjIxMTYxNTcxNjAyMTAMDzMwMzg3MzUxNTAzODc0NQwPNDU4NDU3NzQ2MjIxNjQ0DA81NTIyMjA0NDAxMDY1MzcMDzgxNDI3NDcwNTI4MDMzNAwPMDQ4NjA1NjI2NjU3MDg3DA82NjMwNTUyNzc1MTg0NDIMDzg3NTAxNDA3MTc2NzYwMwwPMzI3ODUyMTgyNzc0NTQ1DA8wNDQ4NzU0MjM2NTE4MTcMDzI4MTExNTcxNDMwNjAzNQwPNDgxNTY1MzU3NTE3NjgwDA8wMTEyMzE3NDI3NTQzMDgMDzIyMTg0MjY4MTUzNTEwMAwPMDYyNzQyMDMzODgwNzUzDA81ODUxMzAzMDUwNzEwNjcMDzM1MTI4Nzg1MDA1NjcwNQwPMjcyODEwODQ1MzI4MDYyDA8zNTg1MzQ4MTAzMzgyMjMMDzQzMDM1NjY2MjAyMzIxNAwPMzY1NjM1NDY4ODM1NjM2DA81MDA0MzY3NjMwMzQ2NTQMDzAyMTE0MDg0MDQwMDYwOAwPMzEzMTMzNjg0ODM1NDgyDA81MTA0NjI3MTgyMjU3NzQMDzc3NTE2MjMzMTY4MTIwNwwPNjQ2MTU0NDQzNzU1ODM4DA8wODUzNzAzMTAzODI0NTUMDzU3Nzc2ODM1NDc2ODg3NwwPMjQ4ODQyNzIzNDU2Mjc0DA8yMDU4NjY2NjE4ODA2MjYMDzE3NTI4ODQxMzU3MjE2MAwPNTA0MzQyMTU1NjIyMzcxDA81ODY2MDE4NzY4MjY1NjYMDzEzMjUxODYyNTgxMTUxMwwPNDIzMDc4NDIzNjcyMzUyDA8xMTQ0NzczMTI1ODY2NDEMDzU2NDU4NTM0MTgyNDgyOAwPMjU0MTE4NzY1NjQzNjI0DA81NjA1MjAxNDUwNTUwNzAMDzg4ODQyODI0NTcwODIwNgwPNDM1NzY2MTE0MTc3NTQxDA8zNjY4MDQwODQ3Njc0MzMMDzE2NTgzODY2NTU2NDU0OAwPNzA1NjgzMTg4NzU1MTczDA84Njc3MzEwODMwNDAwMDIMDzA0MTg2MTg2MTQ3NDA4MwwPODIxODQ1NDAzNDA3MTUzDA81MzExNTQ4NTcxNDMzNjEMDzA0MTgwMTUwNDQ1MTAxNgwPMDAzNDUyNDc2MDYyNzc2DA82ODE1MjMwMTAwODYwODYMDzMyNTAzMTUyNDM1NTY1MgwPMTczMTI2NDAyODQ3MzAzDA8yMDMzNzc2MTU0ODM0NjEMDzUzMDIzODA3MDQ3NTQwNwwPNjYwNDUxODIwNTMwNDE4DA83Mzc0NzQ1NTQ2NjQyNzgMDzAyNjAzNjc2ODgzMzMzMgwPNjA1NDIxNjg2MDYzODAxDA8wMTYwNzI3MjUyNTIyNDQMDzg3MDYzMDQ3MjMwNTQzNAwPMDMyODAwMzQ3MzE0MTgzDA8wNDg0NzY3Njc2NDY4MTIMDzM1MDMxMjEwMDE2MDA0NgwPMTU3MzM0NTg3NTQzNjUwDA8zMjExMTExNjQxODQ0MDUMDzI3NTU3MDA1MzI1MjA2NAwPMjU3NjMwMTAyNDg1NjE3DA82NDU3NDYzNTgxMDYwNzAMDzM3NzgzMjIxMjM3NjQ2MAwPMjE2MTc2MTE0MTUyNjM1DA80NjgyNDMwNTQ4NTM4MTMMDzc4MTM2MDEzNTI1NTU2NQwPODcwNDEzMTcwMjg1NzU2DA83MTE3NDQ0NDE2MzQwNzEMDzEzNjE0MDAwNDU2MDIxNgwPNDA4MjQ4MjEyNDg4MTUwDA8yMjY1MDU3NTE1MjgyODgMDzY0NzU4MzcwNTAzMjYyNwwPNjUzMjQ1NDMwMzg4MDUzDA8wMTQ4NjUwMDMwNDUxMjAMDzIwNDA2MDA0MjY0NDAzNAwPMDM0MjM4MTUzMTg4MjQ0DA8yMjg1MjQyNjcyMTU4NjAMDzQ0MzE4MDgwNDI2ODUxMAwPMzM0ODA1NzUxMzg4MjU3DA81ODAyNDA1NzY2MDY4ODcMDzg0MzAwMDQ1ODY4NTA1MAwPNTY4Nzc4NjY3ODExMjcyDA8zMTUxMTcxNTIxMzQ2NjEMDzg0NTQ3NDMxMjQyMTYxNwwPNDYxMDIzNjQyMDgzODMyDA8yMTQ3MDM2MTg0NjM2NTIMDzM0NTQyNTIyMDU1MjQ3NwwPODMwMDUzODczMTA2NjcyDA8wMDUyMjEwMjc4NTE2NDgMDzE1MjY0Nzc1MTE1MTM2NAwPNzI2NDQxNjM2MDYwNzMzDA82ODU3MTgzMTIwNTA1MzEMDzI2NDM1MDIzODI0NjI4MAwPNTA0NDU0MzYwMTMyNDUyDA84Mzg0Mzc1NDI1NzA2MjQMDzQyNzQ2MDQ2NTE1NDAwMwwPMDQzODExMjEzNTM3NzYxDA84MTE4NDc3MzA4NjE0NjgMDzUxNTI1Mzc0ODEzMTQwOAwPMDQ1NDU0MDg4NDYyMTUwDA82MzE2Nzc4MTYwNTE2MjUMDzU4MzI4MjcwMTEyMTY0NAwPMzgzNTg0NzQ3NTM0MDE2DA8xMDIwNDY0MjUwMjU0MjQMDzU3MDA2NjIxNDQ4NTE1NwwPNDU4ODY4MTg1NjI4NDA4DA81ODUyNTg4NjYzNDY3NzgMDzUyNzQwNTYxODY2NDc0MAwPMjc0MjY4MTczODA3MTE3DA83NzY2MzcwNDY2NDA3NTQMDzUzNTEzMzMzMTM2NDA1MwwPMTA1MDYzMDAxMjIxNjUwDA81ODMzMTY2MjA2NDc3NzcMDzQzMzM3NDYzMDMyMTU2NAwPNDcxMjA0MzgzODAxODg3DA81NjUwNTIxMjU1MzUxMDYMDzM2NTMxODEzNzA2NzMwNgwPMjQzMjg4NzgzMjY3NzI3DA8zNzQxMDg2MjYxMDAxMjQMDzc4MjA4NDIyNzUwMDM3MQwPMzU0NzU3MjYzNjAzMzg1DA83NDM3MTU2MzAwODAwODYMDzM4MzIzNzc3NzMzMTE3NwwPMzU2MjIyMzUwMDc2MTE3DA84MDIwMzQxNjcwMjU1NzcMDzU1ODE1NTI1MjM0NDQzMwwPODE4ODcxMTQ0MDQxNDY3DA8yODQzNDI1NjAyMjg1NzcMDzA0NTQyMDcxNjEzODAwMAwPNzQ4MzgxMDQyMzIxMzgxDA8zNzE1MjA4NjI3MzMyODgMDzMxMjgzMjQwNjYxMzA1NQwPODA1ODgzMDUzNDIzMzUzDA8zODEzNzQ0NzI1MDQ4MjYMDzU2Mzc0ODE0NDI3MjU0NgwPNjE2MTA3Nzg1MTcwMjg1DA8wODQ4NjY2MzI1MTEyODAMDzMxNjEyNzE4NjUxNzgzMwwPMTAwMjQ2MTE1MDU0NzgzDA84NzQ3MTgwNzEzMzc0NDcMDzA1MzQ3NzgwMTEyNDEzNQwPNzcwNjM0MjQ1MzM4MTM0DA82MTQ2NzUyMjY1MzcwNDYMDzU1NjA4MTM4MDMzMTQ0NgwPNTgyMzI1NzU1MjU0MjM2DA8zMzAyMTI1NDcyNjQ0MTMMDzE1NDg3MDE0ODcwNzMyMQwPNTI3Njc3ODIyNTUxNjE1DA82ODY0MDgzNDE2MTQzNTAMDzQyNTAyNzM4NjAxMTc4OAwPMDg0MDExNDg4NzQ4ODY1DA81NTgxMjUyNjg0MzYwNzYMDzE0NzEyODE3NjczNzUwNgwPMzEwNzAzMjI2MTQwODE3DA8yNjA2NjAwODQ0NzQ2MjYMDzEyMjMxNjgzNjUwODE4MQwPNTAzMjA2ODI0MTc1NDY1DA8xMDY3MzIzNDE1NTg0ODcMDzgyMzI4NDcxMjIwMjg0NgwPNTIwMjUxMTIyMTU0MDM3DA80NzE2NTIyMTMxMTgyMTEMDzYwNzAzMjU4MzAxNTM4NQwPNzM4NjU2NjUwMzYyNTQwDA81NjQyNzUwMTg0MTI4MzUMDzU4MDIwNDM4NDg2NzM1MQwPMzYxNjA2NTgxNDU4NzczDA84MTAwNTg0NjA0MDY3MzgMDzA1ODA0MDAyMzMxMjE0MgwPNjg0NDY0MzQzNzg0MjQ3DA8xNjU1NTgxNjIzODQwNzEMDzU0ODA1MDgzMTY0NDczNQwPODU1NjY2NTI4ODM2NTUyDA82NjE0NjcyNjMwNDYwNDgMDzYwMzUzNTMxODEyNjAxOAwPMDE0MjM2MjU1MDM2NzEzDA84NDQ1MjQyNzYzNDc1MTQMDzY3MDc4MzY3MjYyMzYxMAwPMjY4MjU1NjgzMDcyNDc3DA8xNzUyMTY1MzgyODg4MDEMDzg2NjQxMTI0MDc1MzM4MgwPNDg1Mzc4MDgyNTQ4NTY3DA84ODU3Nzc2NTcxNzc1MzAMDzgxNzQyMjcwMjQwNDYyMwwPMzI2MzcxMzYwODcxNDAwDA8yNDcyNDg1MDA0MDY4MzcMDzA2MDE1NzIwNTQwMTIzMgwPNjgxNDMwNDEyMTA4MDE3DA82ODQwNzM0Mzg4MjgxNTgMDzU0MTI4MzQ3ODQyMTE4OAwPNjM2NDI1ODYyNTgxODg0DA84NzM4NjQ4MTc2MDA3NDcMDzM2MTg4MTcyNjQwMTUwNAwPMTM4NTY3ODI4ODAwNjEzDA8wNDE2NDI1MDM2MjUzNzUMDzUxODEzMTQwODg3MDgxMgwPMjcxNTM4ODc2NTEzNzM4DA8xODY4Mjc2MzU0MTEyODEMDzUyMzU4MjQ0ODU4MDUwOAwPMzg1MTg1MTg2ODE1NTMxDA84MjU4MzUzMTc2NDMwNDIMDzU4MzAzNTY0NTgwMzg2NwwPODQ1NTMxMzQ3MTg4ODMxDA84MDUyNzYyODA0MzI0ODIMDzQyMzcwMjAxMDQ4NjUyOAwPMjEwODIwMDA1ODU4MTQ4DA83MzQ3MTA3MjMzNTAwNTYMDzc1NjA2NDYyNTA3NDQzNwwPMjcwMjY1MDMyMTQzMDcyDA8wNjY2NDcxNTQ4MjA2NzQMDzU2NTAxNTE3MzQ3NTMxNQwPNjQ1MjQ3NDEyNTM3NTUwDA81MDY3MjAwODY2NTY4MjgMDzc2MTEwNTQ3NTUxMDYyMgwPNjY4NjMyODg2NzMxNTA4DA82NDE2NzI1ODQxNDUzNjAMDzY2NjcxMjIxODQwNzQ2NQwPNTg0MTIyMTM3MDAxMzIxDA84NDgyMzc1NTQzODgwMjcMDzc1NTg4NzI3MzYxMzI4NgwPMjY1MjI0NDAyNDM2ODExDA83MzMyNjMwMzg3NzAxMzUMDzE4Mjc1MDExMDE0Njc3MwwPNTgwNTUzMzA2MDgxMjA1DA80NzQ2MzMwNTIyMzUzNTYMDzg4NTgxMDYyMjIxNjQzMQwPMjQ1Mzc4ODQ2MzE0MjgwDA8zMzEwODIzNjg2MTM3MDYMDzA4MzQzMTA0NjYyNzE0OAwPMTc3NzgwNTQ2MjQyNzI1DA84NTIyNjYyMDU3MjI0NzYMDzM2NTgxMjg3ODMyMzQ1MQwPNzAzNDA3MTU1MzEzMDcyDA84NzgyODIxMjQwMTAwNjMMDzI1MjU4ODA0Mjc2NDYwNQwPMDIzODAyNjg2NzUyNjI1DA82NDQyMDI4MDUxMjA2ODEMDzE1NzAxMjU1ODU4NjU2MQwPMDM4ODAzNDUyNTU1MTI4DA82Mzc1MjMzNTUxNjUwMTAMDzQ2MjQxNjg3NTI2MjI3MQwPMDEzNjUzODAzODc0MjI0DA8wMTUyNzE0NDI0MzQ4MDcMDzI3NTc4NjcxNjc3MzYwMgwPODA2NDM0MTQ0MzEzMDczDA81NjMzMDEzNTY3NTIwMjMMDzcyMTc3NDI4NzAwMjIzNgwPMTg4ODQzNjEwMzQ2MDEyDA8zNTMyMTE1ODYxNTA2MDMMDzQxMDQyMDA0MzcxNTg2NAwPNTAzODY0NDIxMTg4MDEzDA83NTUwNDI3ODE4MTA2MTQMDzAxODQ4NzI0NjYyMzQwMgwPMDg2MDUxMzIwNDI4MTM1DA84ODcyMDc1NDU1NjA3NDMMDzg4NDQwNTIxMjExNzA2OAwPMDg2MjY4NDY0Mzg3NjA2DA8zODIwMzY2MzQ4NDEyNDYMDzI0NzI1MDExMTI2NTQ2NAwPNDA0ODQzNTIxNjg3NzAwDA8zNjg3MDEwNjcxNDM0ODMMDzgwODA3MjY0NDI2MTE4MwwPNTYzNTEzMDgwNTIzODI3DA82ODExMjczODg0NzY1NzUMDzY3MjI3MTcwMzQxNTcyMAwPMTA3NzcxNzAyMjU1NDY4DA8yMzc1MTQxNzY0MjMwMjYMDzQ4ODgxMzM2MjcyNjMwMgwPMzYwMDAyNTUyNzYwMzE4DA8yMTA0MzgxMDAwNzM0ODYMDzUzNjU2NDY2MDIyNTEwMwwPNDU3NjcxMjM0MDUwNjYxDA84Njg2NjY3Nzc3MDAyNjUMDzI2NzExNTEwMzQ0MjY4NgwPODc2MjYwMzUwNDExNzE2DA8wNjY2MjUxNTExNDMyMTcMDzIzNTI3MTMyMzM0MzUwOAwPMjg1MTgxNjI2NTU2NDAyDA82MDA0NzAwNzE2NzcxMzYMDzE3NDc3Njg0MDA1MTc3MgwPODY4ODczODUyNDI4NjgyDA81NjE2ODQ3ODYyNjczODYMDzMzNTI4MDA0NzMxNjg4MgwPMDM4Mzg3ODMzMzY1NjU4DA8wMzc1MDMxMjc3NTU3NzcMDzc4NzA2NTAwNzE1MDI0NAwPMzcyMjUxMzEyNzYwNjI3DA8wMTcxMjIxMTc0Mzc3MjIMDzM3ODMwMjA0NDU0MDc3NQwPNDgyNzY2NDYyNTYxNzE3DA8xMDY4MDY4MTE3MTg2NjgMDzEyODM3NzQ4NDA3MDE2MgwPMzE1ODUwNDYzMDY1MzIxDA84MjAxNTEwMzQxNjcyNTcMDzY3NzQ0NTQ1NjAzNTcxNAwPNTY0MTQwMjY2Mzc4NzM2DA84ODc3NTc4MzU1NTMxMTQMDzQzMTUyNTcxODI0MjYxNAwPMTAxNTIyNjEzMTIwNTg4DA83MzUyNTczODcyMzIwMzQMDzAyMzQ4NTg2MDQyNzE2OAwPMjUyNDUwNDgzNzU4NjU0DA83MzQ4MjE4MTQzNzcwNjUMDzg4MDgzMTA3ODU3Mjg1MwwPNzUyMDE1MDgxMTQxNTcwDA8zNzc4ODYxMTU4NzMzNTcMDzEwNTgzODcxNDI4NjY0MQwPMjg3NzEzMzE4ODE4NzEyDA8wMzUwODg3NDU4MDI1MTAMDzc2NTU4NTMxMzM0MzI4MAwPNzg1NzAzNjExMjczNjgzDA80MjQ2ODcxMDc0NTM4NTcMDzQ3MTc2MTQ3NzUyMjQwOAwPMTIxODY4NzM3NzY2MTAxDA8zNzg2NzAwMTY1MTQ2NjQMDzg4MDE1MDY2ODIyNzA2MwwPMzQ3NjM2MzI1NzI2MDYxDA83NzUzMTY0ODQ0MzU3ODAMDzU3MjMxODI1ODY2NTcyMAwPNzQzODI2MzIxODg0NjE1DA84ODU4MjQ1NjQ0ODczNDYMDzc1NjA0NjYwODU3NDE2OAwPMjIzNTI2Nzg0MDI0ODM2DA82NjQzMDA3NzQxODA1ODYMDzYwNDAxMDcyNTUwNDQ2NQwPNzY0MDE4Nzg3NjAyNTUxDA8xNDI1MzMyNTQyODczMjAMDzEzNDU3ODYxMTgzODU0MAwPNzM3NDU1MDcxMzEwMDU1DA8zMDMwMDg4MTI0MjU3MzMMDzc0ODU3MzU3MDIwNjcwMAwPNDIxNTAxMjA2MjU0MTE2DA80ODMzNjg0Njc1NDgwNjQMDzUyMTIyMzU4ODYwNzAzMgwPNTUyNjg3NTAxODI2MTY1DA80MTM2MjQwMjUwNzYyNDUMDzU2NjI3NzYwNjMwNzUzMgwPNzgwNTc4MzMzMjgwODA2DA84ODIxNjMwODc1MzIwMjUMDzI1ODI0NTc4NjU3NTcyNQwPNjMwNjIxNzEzMzQxNDU4DA83MjQxMjA1NTU2MzY2ODgMDzUwNzE4MDUwODU1NzA1NwwPNDQzMTY1MTc4ODA2ODMyDA84NDYzNTE2NTc1MDgzMTgMDzM0MDEyNTIwMDQ4ODY2NgwPNzg4MjcwODE2MDEwNjQ4DA82ODEyMjczMDQ2MzE2NTcMDzU0ODYxMDEzODMxNDgyMAwPNDI4NjA0Mzg2MTc2MTIyDA8wNDU2ODQ2MzU1NzcyNTgMDzU3MTEzNTMyMjg4NzIzNAwPNTQ2MzMzMjYzMzU3ODc4DA8zMDgyNzY2NTY0NzM0MDUMDzU0ODQ3MTMzNTM2NTYxOAwPNjY3NjM0MjIyMDE0MTQzDA8yNTMwNTcwMDI2ODY2MDcMDzc0NDUxNDgzNDc3NTA0NAwPNzMxODY2MzA0MDgxNTc1DA82MjU3NjcxNDgwNTc2MjcMDzY4NjQ2NzI4NDI4Mjc3MwwPNDAzMDUwMDM4NTQwMjAzDA8xNTQ3NDYzNzIyNzY1ODcMDzEzMTY1NTc3Nzg2MTE0NgwPMzY4Njc2MDMwMjQyMDMyDA8zMDY2MjM4MzYzNDY1MzMMDzUzNDgxMDc2NzI4MjI2NQwPNjYwMDEyNDA0MjI1NDU0DA8zMTg0MDc1ODYwNzgwMzYMDzMzMjQzMzc1MDg0NDUxMgwPNTA1MjMyMTE0NjgyMDA0DA8xMjYyNjcyNDM2NzQ0NTIMDzQ3NDQzNDYyNjAwMDA4NgwPNTY1MzI1NjMzNjcyNTQyDA8zMjc3MjMwNjUxNDcyMTgMDzcxNjQ2NzEzMDg2Mzg1MwwPMDQ1MDI3ODgzMzQ0NDYwDA8wNDQ3Mjg1MTA0MDE2MzUMDzU4ODgxNDYwNDg1Mjc1MwwPNDgzMzY0ODIzMzYyNjUwDA82NDMzMTUzMTcwMDgxNjQMDzAzNzQwNjEzNjM3Njc1MwwPODYzMjg2MjQ0MzgwMzQzDA80NjMyNzUzODMxNDMwMzcMDzM2NTQ3MzU2MDc0NjMyMgwPODc4MzM2NjY3NzI3NTQ3DA8zMDU2NDYzMzcwNjczNzEMDzM3MDA4MzE1MjY4NjE1NwwPODg4NTM1NzY3ODg3MzAwDA8zMzYwNzUyMTIxMjI3NjIMDzUwMDgzNTM0MTExMTQwNAwPMDQzNjg4NDg4Njc3MTE3DA82NDY0MzIyODM2MTAyNzQMDzE3MTIyMjA3ODIyNDgwMAwPMjUzMDEyMjg0NTg2MjUyDA80MzYyODIxMTg0NzU3MDQMDzgzMDQxNDU4NDM2MjQzMAwPNzY2ODIzNjYzMTI1MDI4DA8xMjAzODEyNjI3ODE3MTEMDzAxNjM1Nzg2NTg3MTQ3MQwPMDMyNzM3Nzg2MjgyMzY4DA8wMjYzMzAwMzcxNDUzMjEMDzgwODcyMzU1ODQ0MTgxMgwPNDI4MjMzMzI1MjQ1MDgyDA8xODgwMzAyMTczODA4MjcMDzI1MjYwMzI0NzcxNjg0MgwPMDE4MzM1MjA4NDAyMDczDA8zODgzNDQxMzMwNjU4ODgMDzAxODUxMjAwMTE1MTY2MQwPMDgzMjgzMTM2NjY1NjcyDA84NjMzODU3ODU0MTIwODgMDzgxNzg0MjQ2MjUxNTA3MQwPNTM2ODA1ODIyNzgxODU1DA8xNDA0NjYzNzY3MzQyMjQMDzMxNDUxMjgwODQzNjEzNgwPNzUzNjY3NTAxMjgzNTE1DA8zMjQ4MzM1MTMyMzEyMDcMDzc0NTMwMTY4NjI1MTg2NwwPMjE2NjMwNzM3NjEzNjM2DA81NzgxODUxNjY2Nzg1NzUMDzc0MjI0MDQ1NjI2MzU3NQwPODA2NDUyMDQyMzI1NDg2DA81NTAwMTExMDgyNzg4MjMMDzQxNTIwNzM3MjM4NDc1NAwPNjIwNTA4NTUxNTMyNDEwDA80NTM4NTYwNzA1NjgyNDAMDzE1NzY1MDIwNDM2NjUyOAwPMjcwNDUyNjc3Mjc1MDc1DA8wMTgyNzE2NTIwMDU1MjMMDzU2Nzg0NjA0NDI0MDEyNQwPNDYwNTgxMDUwNDg1MjM3DA80NjM1NTQwNzgxNjMxMzYMDzQ3ODAwMTAyNTAxMzU4NAwPNDc3NzUwMzEyMDg4NzYwDA84MDU1MzQwMTYwNzUyMDEMDzg1Mjg2MTcxNjQyNzExOAwPNzU2NjA3MzEyMzcwNTg2DA81NTQ3MTQ4NTAwNTQ2NTAMDzEzMzI2ODQ2MzMwMDMwNQwPMjYyNTU0MTYyNTU3NTMyDA80Mjg3NjI4NTc2NDE0MDMMDzg1MzQ1MzEyMTgzNDY0MAwPNDAzMTgyMjU4MDU0NDQ2DA84MzYzODAwNTczODY4MjgMDzIzNDAwODQxMzIzMDIzMQwPNDg4MzE1NzA2MDQ0ODAyDA82MzY4MjI3ODQzMTczNjUMDzg2ODg1MTU3NTA1Njg3NgwPNjY0NDAzMzA4NDIxNzMwDA8zMzI4MTQyNjA0NDExNTEMDzYyNTY3NjcyMjI4MjM1NwwPNTc1NzYwNDAyNjE2NzQyDA8xODQ1NTg4MzE4MzI4MzYMDzg3MDIxMDMxNjM0MjczMwwPNjg1NzQyMDg1MjYwNDExDA83NTY4ODU3NjUzMjczMzYMDzA0NjU3MzQ4MzU2MzYwOAwPNjE3MDQyMTU1ODEwMDgyDA84NTU4NDU4NzIxMjExNTgMDzc1MzYzNzI4MDgyNDIyNwwPNTM3MzAzNzU0MzYzMTI3DA81MzYyNjU4NjQ0MzcwMjIMDzc3MjcxODU4ODcxNDI0MwwPMDUwNjY2MDAwNTgyMzE3DA81MjE1NDY3MDYwMzYzMTAMDzczODQ1ODcyNzU1NTY1MgwPMTE1NTUwNzYxNjcwNzQ4DA82NzcwMDcyNjgwMTQzNTEMDzI4ODU3NTgzNTA1NzI1NwwPMzcxNjIzMjQyMjgwNzQ3DA8zNTU2Njg2NDAwMzgwNzQMDzQxNzExMzQ4ODQ0MDc1NAwPNzY2MzAwMjU4MTI2NzcyDA8xODU1ODE0NDUwMTM2NzMMDzg1ODIzMDY1NjYxNzY2NQwPMzIyNjQ2NzA3Njc3NjU3DA83ODg4ODU2MTAxODczNzIMDzc2MDgyNDcyMDI4NzcxNwwPNTc4Mjc0MTMzNDM3MTgwDA8yNDEyMzMzNDE4NzEyNTIMDzcyMjg3MjQ4MzY4MjA1MwwPNTQ0MDQyNDIzMzU2NDQ3DA83MjI2MDg3NTUwNjQ4MTEMDzM1NTE2NDU4NTcxMzcyNQwPNTE1NDI4NTQwNTQ0NzU0DA8yODUyNzU4NTE3MDc4NDcMDzY0Njc0NjUwMTEwNzQ2MAwPMDA3MDczMTQ1NjU1NTgwDA8wNTIzMTc1ODA0MDQ2NjQMDzUwNTAwMTY3NTg2MjU2MAwPMzEwMzQ4ODA0NDQxNzM1DA8wNzE0NzI1NzA4MTYyNTAMDzYzMjA4Mjg0NDY4MzE3NQwPNjUxNjY2MTgzNDY3MDI4DA8zNDgxMjA0ODI1NzM2NDgMDzE3MjUwODIxMDUxMTg2NgwPMzg2MTI2NTYxMzM3NzMzDA81NjAxMzU2MDYwMjE2ODcMDzI4MjY2NzgzNDUwMTI1MgwPMDIzMjY4NzIxODYxNDEwDA8xNDE4NjgyODg1MTQyNjgMDzcwNjMyMDQ4MDYyNTQ2NQwPNTA0NDMwNzE1MTA4NzQxDA8xNTQ4MTAwMjU4NDMzNTAMDzgxMTY4NjYyMTEwNTY0NwwPODY4NDM0MzU4MDY0MTA2DA82MzE2ODQ2MjMzMDA3NjgMDzgxODc0MzgxMDc2NjY3OAwPMTE0MzQyNDI0NTYwMzE2DA8wODU0MDQ3NjM4NTc4NjEMDzM1MTAyMjcyMjE4NzI0NgwPNzc2Njc4MzE3NDMyNDAwDA82MzIwNDE4Mjc2NzEyMzEMDzc2NDA3MjEzODMxNjEyMAwPNjMxNTUxODMzMTc2NjA2DA8yMzIwNDA4NzQ1NDc1MzcMDzI2NTA2MjExMjEyNjEyOAwPMjc0NDM1MDgyNzIzODYyDA80MDI0NjA0MjAwMzIyNzgMDzgwODg0MTI0ODExODYwMwwPMzAxMDM0NDE0NjUwNjcxDA8wNTc4NTM0ODc1NTg2MDIMDzc2MDYxNTMxNjU4MzAxNgwPNzgxMTgyNDIxNzUwNTA4DA8yMTEzNzY3MDczNDExNjYMDzc0MzM0NzQxNDgxNzI4NwwPMjg4NjE3NTM4MDQ0MjY2DA80MDMwODExMjE0MzE2MDEMDzc3NDU1MDgxNDQwMjYzNwwPNjc2NDQ2NDEyMjUzMzUxDA80NjE4ODQwNDgyMjI0MTMMDzQ2ODcwNDc1MDEyMzM1MwwPNTA4MzM0Njc3NjI1ODYyDA82NTY2MzEzNjQzMDE3MzIMDzcxMzI2NTgyNTUyMDIwMgwPNjIzMTQ2ODM0Mjg3NzI0DA8zODIwNTg3Mjc2Njg4NjcMDzA3MjcwNjYwNzc1MTUyMAwPNDg1NzY3NDI2NDU0MDE4DA84NTI0MDAzNTE2NDY1MjIMDzIyODEwNTgzMDY0MTM3NgwPMDAzNDczMTIzNTYwODcyDA8yMDA1ODA0Njg1NzY0NDIMDzc2MDg3MTc2NzUzNDUyNAwPNzg2MDI4Mzg2NTAyNDE4DA8xMzY4NTAwMTg1NDA4MzMMDzIyMzY1MzA3Nzg0MjQ1OAwPMTI4NzM4MDg3MjcxMzQyDA8xMjA4Mzc2MjQwMjQ0MzIMDzA3NTE3NTgxMzA2MDc0NAwPNjM4NTY0MTAyNTEyMzMzDA8wMjE4MjcyMzA3NDQ3MzUMDzAzMjAyNTQzMjc1ODUwMgwPMDY3Nzc1MTc1MDAzMjMwDA8wNzc1NDc0ODgwMTg0NzIMDzc0NjcwNjczNTAwMzMyMQwPODQ4MzgwODA0MjAxNDExDA8zMTQ4NTYwNTI0MzQ4NjAMDzI4ODAzNDUyNDI4MjQ0NQwPMDIyNTI4NTExNzg2NDQwDA82MDQwNjgxMDg1NzA1MjMMDzY1NTYyMjY3ODcwNTE2MgwPNTY0NDIxMDIyNTI3NzQzDA8wMjE1MjE3MDI1MDI4ODQMDzYzNzgwMTY1NTA0MDc2NwwPMzA3MTE4NDExMTc2NTU3DA8wMDYxNzI3NTM0NDQxMjAMDzU1MzgxNzI4Nzg4MDA3OAwPMzI2MjU2NjQ0MTIyNDc3DA8zNTgyNjQ0NDI2NzQ1NzcMDzQyMTg3MDg3MjMyNDIwNQwPNTE3NTMzMzE4ODY1NTE1DA81MDQ1Mjc3NjI1ODQ3NzAMDzcxNDAyNDQxMjEyNzgzOAwPNTIzMTYxODE4Mzg1NTEwDA8wMDI3Nzg2MzEyMDQ0ODQMDzMzNTUxMDcxMTYxODAwOAwPNDU1MDYwODMzMzMyMjM4DA80NTM4NzExNjE1MDg1MDMMDzQ0MzQ3MjUxNzM4MDU2NwwPNjIwMDM1MDg1MzU0NDcxDA81NjE4NjMzNTE2MjU0MDUMDzE1Mzc4NjYwMDgxNDM2NAwPNzgwMDgyNjEzODc2MzgzDA81Njc0Nzg1NTg0ODczMjcMDzM1NTIwNDg4NTMwMTM3NAwPNDA4MDAwNzU3MDQzODYxDA81NjgxNjQ1ODcyMzIwMTgMDzQ4MTUzMjMxODUyNzM0MAwPMzE0NDI0NjY4Mjc4NDg2DA81NDc3NzIwODcwMDU4NjMMDzMzMjExMTUwODMzODI2MgwPNDU3MjI4MzM3NjAzNzAwDA80ODQyODAzODQyNjg1NTYMDzEzMjMxMjQ3Nzc3ODQ2NAwPNjI3NjQyMDY2NTA0MzUzDA82NTAwNjEyMTIxNjY2MzcMDzE1MTA3ODY0MTc3NDUwMAwPNDEwODIyNDIwNzcyMDg0DA83NjEyMjY3ODYxODU4MjcMDzcxMDMyNTE1MjcwNDIxNAwPODY2NjU4MzA4MjEwMjcyDA80MjI3ODc4NDg1NTg3NDcMDzgzNzcxNDQ4MTI2MTg1NwwPNjM1ODY2MTA1MTIxMTcxDA83NDU2MDExNTM2MzAzNzUMDzg1MjUyNjE3MjM1MDUyOAwPNjI1MDM3NzY2MTc1MDc0DA84NzAyNDIyMjMyMjAyMzUMDzQ0MzQwMDMxNTYyNTY0NAwPODUzNDUyNzgyODAwMzcxDA8xMDM1MTY3NTY0NDgzNTYMDzQyMzUxMzYwNjcwMjUzOAwPMTcyMTAxNDg2MjcyNDUxDA80MzIzNDI0NDg3NjUwMDUMDzc1NjI4MDAxNDU1ODQxNAwPMTE1NjU2ODE2NzAwMDM0DA8wMjc4MjQ0MDc3MzU4NTIMDzM1NzYxNTgxMDYyNTA4MAwPMTIwNTQ4NjUzNTgwNTgxDA80MTI2MDg3NzAzMjI4NzMMDzYwMzgwNjQ4NjIxNTY0NQwPODQxNzE1NjIyMzQ4NjczDA82ODI0MjQ0MDIzNjUwMzcMDzQ0NzQwNTU0ODI1NjI3MgwPMTEwNDQwMTMwMjIyODM0DA8xNTQ0NDMzNzU1NjgzMTYMDzI3MTExNDU4MTYwNjM3OAwPNDIyNjU0MzI0MzM2NjA3DA83NjQ0MTQ1MDcyNDg0NDYMDzE3MzU3NzgxMjE1NDQ2MwwPNzcwNjAwMzAxMzgwNzAxDA80NTM0MzYzNjQwNzIwMjEMDzgzNzIyNTQ1NTUyMjAyMgwPNjAyMzQ2MjIwMjUyODA3DA84MzAyMDExMDQwNjA2MjIMDzUyODQ4NTgzMzg2MDI4MwwPMTc1NDc2NTA0NDQxMDQwDA83MTM1NDE2Njc3NDE2NzYMDzIwODU2NDcwMzYyNDU3NwwPMDA4NDcwMDIxMjg4MDU3DA8zMDAwMDA1ODIwODQ4NzYMDzE4MzI0NzEwNDIwNTQxNQwPMzEzODY2NTA3NTM0NjI1DA8zNzcwMDcyMDgxMjgzMTMMDzIyNzQ2ODIyMjE0MDIzMAwPODE2MjU3MDEyMDI0MjE3DA83NjAyMDMwMDY4MTM3MTEMDzQxMjgyNTE0NTQzMzIzOAwPMzI2MzU2MTE4Njg2NjQ3DA82NTM2NDIwMTcwMzI0MzMMDzEwODQ3MjYzMDAxODc1MAwPNzM3MDI3ODI4NDUzNzQzDA8xODQ4NzI1MjI1NDg1NzIMDzgxNTQ3NTA1MzYxNDEzNwwPNzUyMTg2ODY3MzYzMzMwDA82NTM0MzgyNjU0MTQyODUMDzIwMjQyMjI1MTA1NzQ1MQwPNzE1MzQ1MDI2MDY0MTIwDA8xNTcwNjc0MzM4MzA1NjUMDzcxNDcyNjIzODQ4MTA2NwwPMjg0NjM4NTY3MjM1MDYwDA8yNzQ3NjAzNDc3NTMwMzEMDzIyMTYzNjgwNTE3NDAzNQwPNjgzMjI2MTEzMTUxODA1DA82NTgwMzE2NDIyMzU0NzQMDzYyNjQwNzYyODAyMjAzMwwPMjIxMzgxNDgzMTMyMzI3DA8xNjU2NzEwNTI3ODI1NDgMDzY1ODgyMTU2ODU2ODY2NAwPMzY3MTU3NDUxMjIxNzU3DA8zNzMzMzUyNTE0MDgzODYMDzcwNDYwNjYwNTEyNzA3MwwPMjgzODg0ODU2ODI1MzA3DA8wODQzNzIyMzgwMTYxNzMMDzM3ODAyODExNzgyMjE3MgwPMzU3MjQ1MDI3MDQ1MDM2DA82NDUxNzAzNjg2NDQ3NzUMDzE1MDQyNTY0MDAxMTUwMQwPODYyMDMzNDQwNDgxNDcwDA82NzE4MDgwMTU1MDUxNDUMDzQ0NDI1NjQ3MjA1MTQ1MQwPNTU0MjM1MzI1NTg2MTIzDA84MzQ1NDUwODgyMjA3MjEMDzc4NjU1MjIxODYwODIxNQwPMzgyMDU1NjIyNTE0ODMwDA81MDMyNTMzMzExNDcyNjcMDzAxNDc2ODA4MzA0MDgzMQwPNTE0MzY4ODgxNDQxNTI0DA84ODMyMTUzMDMyNTQxMjUMDzAyNDQyNzE2MTIyMjg0MQwPNjI1NTYyMTQ3NDc2NDA2DA84NzM4NTA2MTgxNzc3MTMMDzIyNjM2NzU0MDczNjAxMQwPMzYzNjA4NDQ0Njg4MDEyDA80NzMzNzYzNTAwNzc2ODUMDzY3NTA1ODUxMDY3NDgwOAwPNTc1MDM1NDYxMzg2NDEyDA80NjU4Mjg0Mzg0NjY4MTgMDzIwNjE2NTg4NjU1NTczMAwPMjUzNjQxNDQzMTEyMjA0DA8xODE1MTE0MDI3NTA4MzMMDzU2NDYxNDQ1MTAxNTM3MgwPMDEyODQ2MzI2NjM2MjUxDA8zNjUzMDg2ODgwNTY3MjYMDzg4Njg2NjA2ODEzNDQ1MwwPNjM4ODMwMzEyNDA4MzgwDA81NTUzNzA4MDc2NTI0MDcMDzE2NDY0MTI3NzE1MjM2MwwPMzg3MTA2NTg4NDQ2NjEwDA8xNTIxMTc4ODY2NjI1MjYMDzU0MTU3ODIyMzQ1MjEwNAwPMDQ3MTMwODYwMzU0NDA2DA84MzQ2NDA3NTI4MDQ1NTcMDzExMDc4NjcxNDQ0NjI1NwwPMzUwMjEyMzAzNjgwMTQ0DA8xODc4ODI4ODQ3NDIyNzYMDzg1MzU1NDg4NTg0NTMxMgwPMTQ2NzY3MjI0Njc1MTY1DA84MTY1MjEwMjU0MjIwMTUMDzM1Nzg2NzMzNTczMTc1OAwPNzQwMjUwNTgyMDI3MzM0DA84MDcwNzA0NzUyNDA3MTQMDzcyMDA0MDI1MTgwMzczNwwPMDMyMjI4NzU1ODA3NDcwDA8zNDY0NTQyNzA1NDIxNTEMDzQ0MTMxODAyNzA4NzMzMAwPNjg2NjEyMDgyNjEwODg3DA8wMzUwNTY4NDQwNjA4NzMMDzUzMTc1NTQ4NDg4MTQ2MwwPNTc0ODA4NDUyMzU0MjU0DA8zODQyMDUwMjU1MTUwNTEMDzgxNTU1NDAwMjg4ODgyMwwPNjg0MDMzMDYwMTc4MzYzDA8yNTE3NDc3MjU2MTEwMTIMDzUzODQ0NDcwNDgzMjUwNAwPMDY2MzUyNTQzNjQwNTI2DA8xNjY0NzU1MTAzNjAwMjIMDzMwODE3ODA0NjI3MDQ2NgwPNTEyODQwMTI2MzUzMjYzDA82NTU3NjY3NzE0NDU2NDYMDzIyNDc3NjQ4MDE3NTc1NQwPNDc2MTAwMjYyMDMwNzQzDA8xMjE1NTExMDc3MjYxNDcMDzExNDc2NTMyMDU0MDEyNQwPNzY1Mjc2Njg0MTE1MjQ1DA80NDc1Nzg1NDgwMzEwODAMDzQ0MzgyMDY0ODQ0MDYwNgwPMDg3MDAwMDgzNjIyMDMwDA8yNjg4NDM3MzYxNDM2MDUMDzgzMjMxNTM4MTQ3MzE0NgwPMzI2Njg1MjI4MjYzNDM3DA81ODgxODAxMzUwNTEwNTAMDzQ0NTEzNDYwMDUxMDA1OAwPMzI3NzQxNjUxNjU3MTU1DA80MTYwMTgyNTQwMjg1NDUMDzQ3MDE2MDE3MTE0Mzc3OAwPNzYwNjAxMjU3NzgwNjgwDA80NjE1MzQ4NDU1NTU3NjcMDzU2MjIzMzYxMzAxMTcyNgwPMTQzNzE2ODMxMTg4MjI0DA8wNDM3ODQ3MzU2NDYzMzEMDzg1MDU3MzQ4ODEyMTYwMAwPMzEzMTA3MjIwMjM0MjMxDA83NTczMDcyNjE2NTMzODIMDzE2MTEwODYyNjY1Nzg2NAwPNTUyNzUxMzAyNDA3ODg1DA8yNDA2MTg2MDc1NjEwMzgMDzA0NTA2MzcwNzQyODQ0MgwPODUzNzA1NTIwNTYwNzY2DA8yNTI4NTI3NDU2NTQ4NDUMDzMyNzE3ODIxMjMwMjc1NAwPMjMxMzA4MTE0MzU3MjE3DA8zNDQ3NDU3ODY4MzIxNzQMDzI0NzM0NDc3MTI4ODE4NwwPMzM2ODEzODAxMTUxMzg3DA8xMTU4MjU1MDAxMzg2MjIMDzQxMTcxNDQ4MjAwMjAyNQwPMjQ0NDU1MjYyNjA4NjIyDA8wMDUzNDgzMzg3MjI1NzYMDzY1NzM2NzExMTc4NjYyMQwPMDE2MDU0MTIxODY3NDcwDA8xNDU2ODcwNDY4MDEzMjAMDzIwNTg1MjYyODE1NzA4NwwPNTIyNDY4MjQxMTQ2MTU1DA8zMzY2MjMyNTY4MzczMjUMDzAxMTMzNzg3Nzc0ODU3MgwPMTE0ODU4MDEzMjE4NTIzDA84Nzg1MDc0MjYwMDgwMTIMDzQ2MzM2NDE4NzE1NjYyMQwPNTcwMzMyMDYxMzI1MDUzDA83Nzg1MzA4ODQ2NTMyNjgMDzMzNjgxMjIxNDQ0Mjg3NwwPNjIxODI1MjYxMzMxODQzDA8yNTc1NzU3MTc3MzI1MDIMDzYyNDQ4MjU3NTI4NTAyMAwPMzQ4NDA1NjU2MTUyMjI3DA83NjY3MDAxMzU1MTQ1NzIMDzYzODM0NDE1MjUzMTcyNgwPNjAzMjEwODA1NzIyNzU1DA84NzAxNjcxMTM2ODU3MzYMDzYyMjI4NjQ0NjIyNTM4NgwPODcwNTgyNzYyNTg1MzUzDA8wNDMzNTg2MzAzMjU2ODcMDzc1ODI2NTA4NDQzNTA0MQwPMDM4MjM4NzI3ODUwNTQ2DA83MjYxMzQyMDgzMzYyMTEMDzU2ODM3NTIxMjU1MDgxMwwPNzM0MDQyMzExNDMwNzQ2DA83MDU3NDIwNTcyODU3MDQMDzg4NTA3NzAxNDYxMDc0MQwPODExNDI3NTA4NDgxMTIyDA80MzM2MzQ0NjQxNDU3NjQMDzc0MDAxMzY3NTc4MzE2MwwPODg1MzUwMzI2MTcwMDc4DA84NDQwMzY3MDI4MzYxMzQMDzc0ODA4NzY4NjA2NTcxMAwPODA3NDg3MTU2NzcyNjg3DA82NDY4NzIzNzU1MDU2NjcMDzI4NTE2Nzc0NTgyMDY1MwwPNDY2ODczNDUxODI0MzE4DA81NDg2NzIzMzA3MDgxODQMDzcyNjQ1NjgwMzI2MDI3NwwPMzE1MDM4ODAyMDY1NDgzDA83NjEzMjczNjM2NjM4ODEMDzQ2NjUzMzYyMzg1MjcwNAwPMTQ4ODE4MTQ4ODcxODE1DA82ODQzMDIzNDc2ODU4MDYMDzUzNjEyODQzMzMwMDgzNwwPNDAxMzQ4Njc0ODg3NzE0DA84NjQ1NzU4MDI4MTg4ODYMDzc2NTQ3NzIwMzIzMDEwMQwPMDA4MTI2MjA1Mzc2NzA0DA8wNjM4NjAwNTI4MjY0MTQMDzY4MDg0MTc0Mzc3MTQ2MwwPNDUyMzg3ODU4NjEzNzA4DA80MjYyMjA2NTMwNTIwNTMMDzc3NzM1NDE1ODQzMzg1NQwPODcyNDc2ODQyMzY4NjI3DA82NTQ3NDQ3NjMwNTMyNzUMDzg0NjU2MjMxMTYxNjYwOAwPNzEzMTUzNzM3MTE1MDMwDA8yMDQ2Nzg2MjczMTEzNjUMDzU4MTYwNDcxNzIwNjY0MQwPMTYxODIzMDIzMTUzNjEyDA83MTgwMDM4MDEwMzc4NjAMDzA2ODQyNDc0NTQwNjIzMQwPMzU0NzQyMzc2NDQ4MDU4DA8wODc4MzUyMjc4MTc3MTcMDzQ4ODYzNDEyNjExNjMxNAwPMDA0NDAxMDE1MDc2OTc1DA8wMDQ0MDEwMTE0Mzg0MDEMDzAwNDQwMTAxMTQxOTc0MAwPNjUxODAxNjc4NjQ1MDA0DA8zNjgyMDMwMDY0MDIzMjgMDzAwMDAwNTA2MTY2NTYwMAwPMzczNjczMTAyMjE1ODY3DA81NTAwNjE2NjQzNDcxNzAMDzI3MjgzODQ4NDUzNjcxNgwPMTUyMTM4MDIxNTg0MTAxDA8yMDMxMTA1NjM2MzM3MTgMDzQzNDI3MDYyNzMzODEwOAwPMzY4MTUxODcyMjE0Mzg0DA80NzI3MjI4NzExNTg4ODQMDzYxMzMxMjMwNjQ2MTA1MAwPODgxODgxNzEwNjI2NzI0DA8xNTIxNTE3MjA2MzEyMTcMDzA0MzUwNzIyNzU1NjQyNQwPMTY3ODAxMzIwNjIwMDQ4DA83MDQwMzU4MzEyNTQzMjIMDzQ3Mzg4MDM2MDg3ODE2MgwPMTE3NTQxODEwMDM2NTg1DA83NDIxMjQyMDUxNzYxMzIMDzEzMzg4MTI4NDM1MTUxMQwPNDE1ODcyMjUwNDg4MjYwDA8yMzUwNjIzNjcyODMzMzYMDzQyMTU3Mzc4MjMxMzcxNwwPODU2MjIxNjM2NTQyODM4DA82Mzc1NDI2MTI3MDUxMTcMDzg4ODU2NDAyODYzMTA3MQwPNzg4NDc3MjM1Njg0MjEzDA8zMzA0MjQxMjQ0ODM0MTgMDzI3NTQzNzExMTQ0NzIzNgwPNTMwNjQwNjM3ODIzMjQyDA8xMjExNDIzMjE1ODI0NDUMDzMxNDY2MzMzNjQxMDUzMgwPNzI1NzE2NDI4NDIzNTIwDA8zNjM4NTYyMDI0MjYxMTQMDzIzNTUxNTY2MzI0NDMwMwwPNjI4NzYxMjE4MDA4MjY4DA8xMzg0MDcxNzM0ODY3MTYMDzYzNjYxMzI2MTM3NjU4MgwPNTg3MTE2MjcyMDcxMTEwDA8yNDA1NDAzMDQzMjc3NDgMDzM0MTYxNDI2MDMxMDI3NAwPNDQwNTc4NzE0NDM1NjI0DA82MTc3NzY0MTYwNzUwMTMMDzA1NDE1MTAzNzI3NzYxNgwPNjMzNDU2MzM0NTQ0NjE2DA8wNjU3NzY1NTE4NDQzODIMDzIxMzMzMTU4NTY2ODE1NgwPNTgxNTAwMjY2ODY3NTIwDA81NDMzNDI4NDYwNzc0MzcMDzAzNjM3NTcyNzgwNjc1MAwPMDcyMzQ2ODg0NTU3MDg0DA8yMjcyNzYzNzIzODcyODYMDzEwNDg3NjUwNzUxNTU4MAwPODIxMDY1MTIzNjM4MjU1DA83MjMwNzc1ODA2MTE1MzEMDzI2MDYxNjMzNDIwNzU0NAwPMzU2NTY0NjM4MDYxNzQxDA8yNDY4NzMzNTA3MjgyODAMDzIyNTgwMjIwODI0NzcxMwwPNDQ4MTQ3MzEzNzAwODM0DA82MTYwMzg4NTgzODYxMDMMDzc4NjcyODgzODg2MjA3NQwPNjgwMTczNTYxNzgwMjg0DA81NjA4MzA4NDcyMDgxMDAMDzYyMjM0ODI0NjIzNTY3NAwPNDA3NDc4Mzg0MTExMzQxDA8xNDgxMDI1NzU3MzA3MjEMDzY1MDY1ODI2MTQ1MzE3MQwPMDgyMzU0MjIwNzQ2NzU3DA82MjQ4MjY2NDc4MTE1ODIMDzI3MjI2MTI3Mjc0NDA0NAwPNTIwMjIwNzgwMTc2MTY2DA81MDE1MzI4MDE0MDgxMjUMDzI1NDMwMzcwMDQyODgyOAwPNjc0NDc4ODY4MzQ4MjgxDA80NjMzMTY3NDU1MjcyNzUMDzQ3MTE4NTQ1MDIwMzEyMgwPNjM1NDgwMjg2MTEzNjUyDA82MTM0MzE4MjI4NTI3NzMMDzIyMTYzNDczNDg2MTA4NgwPNjE4NjU3NDcxNzUyMTE0DA8zMjg1MjU1MTIzMTgwNzAMDzQ2MTAzMTQ0NDAzMDMyNAwPNTc2ODU4NDI3MjE0MTg2DA82NjU0MDAwNjgwMjgxMzEMDzMwNTcyMzIxODQ0MTgxMwwPNTQ1MTg0NDYwMDg4NTQ2DA82ODExMDczNDM4Njg3MzgwDQYJKoZIhvcNAQEFBQADgYEAQq6zHN8SP8w71Yyq+cwwNQ2VZ4UMPRw/9JkW8ZUJWC4gae2lOfeyyjtN3akXaT+p+vETtfoPuCpPjvzPYoN1RZieyJnpSVzUrNw/lM6kSP5DjGg5K/WKWYad0VkQg56Kynp2YVX4yKUhBydd7iBeSGP900LAHRWCR++xq+r98mI=
+MIDlet-Jar-RSA-SHA1: PRpjLFh81oAjHdPSZ/9lTe64ICSSHOk/MQMdRSqwsoGMSPID91mBRFEYOIQ/5nocEscacSi81o089Y0gMpEIP8V/EWBD7WDP6xqjC0gSyac+QjZm1Bu7Pzav+JC5J3KEkKOGy4wgQKJx02bArR/P9LhYAe7T6LVVFbfFyw2lhJA=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/EmptyLines.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/FL_Rocks.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,6 @@
+MIDlet-Version: 1.0
+MIDlet-Vendor: Standing Still Limited
+MIDlet-Jar-URL: http://195.114.231.97:7001/dls/delivery/ds/01AAvJ1WX3jmZsurMwoC/1/FL_Rocks.dm
+MIDlet-Install-Notify: http://195.114.231.97:7001/dls/delivery/ds/01AAvJ1WX3jmZsurMwoC/2/FL_Rocks/status
+MIDlet-Name: Rocks
+MIDlet-Jar-Size: 28196
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/NDRM.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,10 @@
+MIDlet-Jar-URL: NDRM.jar
+MIDlet-Install-Notify: http://uljava.gjmptw.de:8080/Index/Index/NDRM.jad?nstalled=NDRM_harmony
+MIDlet-Name: DRMonitor
+MIDlet-Vendor: m-internet.com Limited
+MIDlet-Version: 1.0
+MIDlet-Jar-Size: 24472
+MIDlet-Icon: /icon.png
+MIDlet-1: NDRM, /icon.png, ndrm.NDRMMIDlet
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/PlatformReqHTTP.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,11 @@
+MIDlet-1: PlatformReqHTTP, , com.nokia.midp.test.securitytests.PlatformReqHTTP
+MIDlet-Jar-Size: 2272
+MIDlet-Jar-URL: PlatformReqHTTP.jar
+MIDlet-Name: PlatformReqHTTP
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+URL: http://tcktest3.extra.wirelessfuture.com:8080/axis/servlet/marika.GetServlet
+MIDlet-Certificate-1-1: MIICPDCCAaUCBD+zblMwDQYJKoZIhvcNAQEEBQAwZTELMAkGA1UEBhMCZmkxEDAOBgNVBAgTB1Vua25vd24xEDAOBgNVBAcTB1RhbXBlcmUxDjAMBgNVBAoTBU5va2lhMQwwCgYDVQQLEwNKQ0YxFDASBgNVBAMTC01hcmlrYSBGYWJlMB4XDTAzMTExMzExNDMxNVoXDTEzMTExMDExNDMxNVowZTELMAkGA1UEBhMCZmkxEDAOBgNVBAgTB1Vua25vd24xEDAOBgNVBAcTB1RhbXBlcmUxDjAMBgNVBAoTBU5va2lhMQwwCgYDVQQLEwNKQ0YxFDASBgNVBAMTC01hcmlrYSBGYWJlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDsUJbYMb9GlP99Ax9n6m2AIAg+b2zC0u6h7OuLP+ls9OpI0sLtE1uBABCePloS0uKwmjtsdFc1zLyA/bpbi644xDw3PMIEhppeuKbLrog5uMk5wD1bFk5kJXYwYEorWVrFpLDmqFwEMig2a+Uhf7eTq1Ze/JgMHoUDXRo0eVsnFwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBACuTqh37N34NnVzziuj66gmiE3rt7fKDTUCiqoHGfv7dpr4M0e8+y6FvtXtUXEajxX/DZbZuy0E9mZqmXsYyP2DDKbCg4cBJ23uOCffuYYVQFSnv4RQFVrQr4jMUHgX7wT5Ox4Ee8xcpsvWWfOgTY4zyEznOBUj6Uw4Xj7F+1yk8
+MIDlet-Jar-RSA-SHA1: UfQMdprNMMmJOk9INrJXe+Y06tnuL+zOJz4gJNEKnLPOzb6UwR2zczNddwfdBxENKbhw2RVp3GBQD2OZjB6UEU4kiw2S956RMlk5OVfqwXB5wvYPCePX6/8qgKSUmsBjNiEpXBGE2UT7MqbRApxmsf/OaDnzzd9Tlr9jUw+YU3w=
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/SimpleRMS8.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-Name: SimpleRMS
+Created-By: 1.5.0_12 (Sun Microsystems Inc.)
+MIDlet-Vendor: Unknown
+MIDlet-1: SimpleRMS, SimpleRMS.png, SimpleRMS
+MIDlet-Version: 1.0
+MicroEdition-Profile: MIDP-2.0
+
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/SimpleRMS8.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,24 @@
+IGP-BS: MP3D=MP3D_BS;SCDA=SCDA_BS;ASP3=ASP3_BS;PSDK=PSDK_BS;
+IGP-CATEGORIES: WN=WN;BS=BS;PROMO=0;OP=OP;
+IGP-DEMOS: DEMOPG=DEL;
+IGP-PROMOS: MB3D=MB3D;PB07=PB07;BBRK=BBRK;
+IGP-VERSION: 2.5.0
+IGP-WN: RBPF=RBPF_WN;MMN=MMN_WN;BRBO=BRBO_WN;ASCR=ASCR_WN;
+MIDLET-FULLVERSION-URL: http://advers.bestgamfts.com/redir/?from=D725&game=MD3D&op=GONG&game_type=DM&lg=EN
+MIDlet-1: Sun Shines 3D Demo, /icon.png, HightS3D
+MIDlet-Data-Size: 8192
+MIDlet-Description: Sun Shines 3D, Emulated sun shine in full 3D!
+MIDlet-Icon: /icon.png
+MIDlet-Jar-Size: 754864
+MIDlet-Jar-URL: SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.jar
+MIDlet-Name: Sun Shines 3D Demo
+MIDlet-Vendor: Celedons Two
+MIDlet-Version: 1.0.4
+Nokia-MIDlet-Block-Uninstall: true
+Nokia-MIDlet-Category: Applications
+Nokia-MIDlet-UID-1: 0x20012293
+Nokia-Scalable-Icon: /icon.svg
+Nokia-Scalable-Icon-MIDlet-1: /icon.svg
+URL-OPERATOR: http://bestgamfts.hereis.com/redir/?from=D725&op=GONG&game_type=DM&lg=EN&ver=2.5.0
+URL-PT: 0
+URL-TEMPLATE-GAME: http://bestgamfts.hereis.com/redir/?from=D725&op=GONG&game=XXXX&game_type=DM&lg=EN&emb=1&ver=2.5.0
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.zip has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,14 @@
+MIDlet-1: TestMidlet, TestMidlet.png, TestMidlet
+MIDlet-Jar-Size: 3674
+MIDlet-Jar-URL: TestMidlet.jar
+MIDlet-Name: TestMidlet
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+: Empty attribute name
+ : White space only attribute name
+ : White space only attribute name 2
+a<>: separators in attribute name
+bo: control characters in attribute name
+c:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet2.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,3 @@
+a<>: separators in attribute name
+bo: control characters in attribute name
+c:
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet3.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,9 @@
+MIDlet-1: TestMidlet, TestMidlet.png, TestMidlet
+MIDlet-Jar-Size: 3674
+MIDlet-Jar-URL: TestMidlet.jar
+MIDlet-Name: TestMidlet
+MIDlet-Vendor: Nokia
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+o: attribute name starts with CTL characters
+MIDlet-Version: 1.0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,32 @@
+MIDlet-1: Calculator, i.png,common.control.CalculatorMIDlet
+MIDlet-Name: Calculator
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.5
+MIDlet-Jar-Size: 123
+Nokia-MIDlet-Category: Application
+Nokia-UI-Enhancement: CanvasHasBackground
+MIDlet-Data-Size: 150
+Vertical-Move-Delta: 10
+Vertical-Move-Period: 2
+Inline-Editing-Supported: true
+Nokia-Platform: Nokia*
+Nokia-MIDlet-Category: Games
+Nokia-MIDlet-Name-en: Calculator
+Nokia-MIDlet-Name-de: Rechner
+Nokia-MIDlet-Name-es-ES: Calculadora
+Nokia-MIDlet-Name-fr: Calculatrice
+Nokia-MIDlet-Name-it: Calcolatrice
+Nokia-MIDlet-Name-tr-TR: Hesaplamalar
+Nokia-MIDlet-Name-nl-NL: Rekenmachine
+Nokia-MIDlet-Name-pt-PT: Calculadora
+Nokia-MIDlet-1-en: Calculator
+Nokia-MIDlet-1-de: Rechner
+Nokia-MIDlet-1-es-ES: Calculadora
+Nokia-MIDlet-1-fr: Calculatrice
+Nokia-MIDlet-1-it: Calcolatrice
+Nokia-MIDlet-1-tr-TR: Hesaplamalar
+Nokia-MIDlet-1-nl-NL: Rekenmachine
+Nokia-MIDlet-1-pt-PT: Calculadora
+MIDlet-Jar-Size: 84713
+MIDlet-Jar-URL: calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.jar
+Nokia-MIDlet-Category: Best-Sellers
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.zip has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/ceac00.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ASCII
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/ceac00/bin/CEAC00.jar
+MIDlet-Jar-Size: 1494
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ASCII,,USASCII.CEAC00_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=9F732D83F3B6AF98EB6577EA92366D95&tID=ceac00
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/cecn02.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ùÓùÔùÕ
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/cecn02/bin/CECN02.jar
+MIDlet-Jar-Size: 1417
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ùÓùÔùÕ, ,Big5.CECN02_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=C9EABB544D0A47788C684D71A5A1C8C9&tID=cecn02
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/cecn06.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ‚X‚Y‚Z‚[
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/cecn06/bin/CECN06.jar
+MIDlet-Jar-Size: 1415
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ‚X‚Y‚Z‚[,,GBK.CECN06_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=79CD95B6352F8388513D6DDB699817CF&tID=cecn06
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/ceis00.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,19 @@
+MIDlet-Name: ÷ùø
+
+MIDlet-Vendor: Nokia
+
+MIDlet-Version: 1.0
+
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/ceis00/bin/CEIS00.jar
+
+MIDlet-Jar-Size: 1450
+
+MIDlet-1: ÷ùø, , ISO8859_1.CEIS00_01
+
+MicroEdition-Configuration: CLDC-1.0
+
+MicroEdition-Profile: MIDP-2.0
+
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=1D11AB7B2A1E2BC200165EB4CF554232&tID=ceis00
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/ceis09.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,11 @@
+MIDlet-Name: ¢£¤
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/ceis09/bin/CEIS09.jar
+MIDlet-Jar-Size: 1457
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ¢£¤, ,ISO8859_15.CEIS09_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=7F914DE931B9D04E5F731F1ADCD163F6&tID=ceis09
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/ceis14.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ??»
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/ceis14/bin/CEIS14.jar
+MIDlet-Jar-Size: 1456
+MIDlet-1: ??», ,ISO8859_16.CEIS14_01
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=336AA79A2E085DC20583865B841DBE6B&tID=ceis14
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/cejp04.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,4 @@
+MIDlet"DNa"De:"D"D@!"D"D"D"D"D"D"DMIDlet"DVe"Ddo"D"D"DNoki"D"D"DMIDlet"DVe"D"Dio"D"D"D1."D"D"DMIDlet"DJa"D"DURL:"DCEJP04"Dja"D"D"DMIDlet"DJa"D"DSi"De:"D1439"D"DMIDlet"D1:"D"D@!"D"D"D"D"D"D"D"DJISX0208"DCEJP04_0"D"D"DMicr"DEditio"D"DCo"Dfigu"Datio"D"D"DCLDC"D1."D"D"DMicr"DEditio"D"DPr"Dfile"D"DMIDP"D2."D"D"D
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=CF0B99F53572032690A4D26E0CB83D02&tID=cejp04
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/ceko01.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,11 @@
+MIDlet-Name: ÍÎÏÐ
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/ceko01/bin/CEKO01.jar
+MIDlet-Jar-Size: 1429
+MIDlet-1: ÍÎÏÐ, ,KOI8_R.CEKO01_01
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=64E5A88BE41622497EDF05039C15F26C&tID=ceko01
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/cems01.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ýþ€
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/cems01/bin/CEMS01.jar
+MIDlet-Jar-Size: 1465
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ýþ€, ,windows_1250.CEMS01_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=3F627BEFBC6E8A0FB9510BA4EB42AE6F&tID=cems01
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/cems11.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,12 @@
+MIDlet-Name: ýþÿ
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: http://195.134.231.83:7070/java-server/resources/man_jam/cems11/bin/CEMS11.jar
+MIDlet-Jar-Size: 1467
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ýþÿ, ,windows_1256.CEMS11_01
+MIDlet-Install-Notify: http://195.134.231.83:7070/java-server/getresult.jsp?phone=3EBDFC736561D6876CF9ED93D3BF1B36&tID=cems11
+
+
+
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut03.jad has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut04.jad has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut08.jad has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut09.jad has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/einstein_EN_FR_IT_DE_ES_N97_v2942.jar has changed
Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/javahelper.mif has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/mine_en_fr_de_it_es_ES_pt_PT.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,33 @@
+MIDlet-Name: HecticMine
+MIDlet-1: HecticMine,/images/icon.png,com.nokia.mid.appl.mine.common.MineMIDlet
+Nokia-MIDlet-Category: Game
+MIDlet-Icon: /images/icon.png
+MIDlet-Vendor: Nokia
+MIDlet-Version: 3.0.4
+MIDlet-Description: HecticMine
+Period-Speed-ms: 100
+Vertical-Text-Offset: -2
+Nokia-Platform: Nokia*
+Nokia-MIDlet-Name-en:
+Nokia-MIDlet-Name-fr: Hectic Mine
+Nokia-MIDlet-Name-de: Hectic Mine
+Nokia-MIDlet-Name-it: Hectic Mine
+Nokia-MIDlet-Name-es-ES: Hectic Mine
+Nokia-MIDlet-Name-pt-PT: Hectic Mine
+MIDlet-Jar-Size: 233616
+MIDlet-Jar-URL: mine_en_fr_de_it_es-ES_pt-PT.jar
+MIDlet-Certificate-1-1: MIIDhDCCAmygAwIBAgIEQhnyeTANBgkqhkiG9w0BAQUFADAzMQ4wDAYDVQQKEwVOb2tpYTEhMB8
+ GA1UEAxMYTm9raWEgQ29udGVudCBTaWduaW5nIENBMB4XDTA1MDIyMTE0Mzg0OVoXDTE2MDEwMjExMDUwNFowKDEOMAwGA1UEC
+ hMFTm9raWExFjAUBgNVBAMTDU5va2lhIENvbnRlbnQwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAK2PV8KLVSZ9OePe4k
+ 78GeQ0MiujbMd1wU9/xqhUFPst50drxhKzH+fMxvXgQOJ7viReolqWyq+ZmKpikGa+6SdqHysnVBhAqo9SLMNjlMfoOXVJ/lvM
+ gOk9k5oyVhBqFonw/FDDHmINC6w9o83e3gRq1C1m2T368yHbZtKifiVdAgMBAAGjggEtMIIBKTAOBgNVHQ8BAf8EBAMCB4AwEw
+ YDVR0lBAwwCgYIKwYBBQUHAwMwggEABgNVHSAEgfgwgfUwgfIGCysGAQQBXgExAQMBMIHiMIHRBggrBgEFBQcCAjCBxBqBwVJl
+ bGlhbmNlIG9uIHRoaXMgY2VydGlmaWNhdGUgYnkgYW55IHBhcnR5IGFzc3VtZXMgYWNjZXB0YW5jZSBvZiB0aGUgc3RhbmRhcm
+ QgdGVybXMgYW5kIGNvbmRpdGlvbnMgYW5kIGxpbWl0YXRpb25zIG9mIHVzZSwgYXMgZGV0YWlsZWQgaW4gdGhlIENlcnRpZmlj
+ YXRlIFByYWN0aWNlIFN0YXRlbWVudCBhdmFpbGFibGUgZnJvbSBOb2tpYS4wDAYIKwYBBQUHAgEWADANBgkqhkiG9w0BAQUFAA
+ OCAQEAvXtgKSffVjD52zHgUEFBBmXFq3QjgWNh8+cQTD23wnPYgfA4GBomMmznLiV3X03SOOI42DUUenQ9baPb78iU8AngF6xd
+ oOpFYlNtVka9YdD9mA0jtkoe4YEmykxPabSKDS50xVYgQG+5Y9H8nO9EyIiviP6drFmpRv635mf8Trlao63XIx4geoCMb9v8vS
+ dfs0louKB9DrjwFki/uHAQvRcVYnFNtAwHdri22UMx+GMppuY4/oPVvQqxgzfP+1AX/w2lgG7pi3lbVVUB4MLhG36kZIk8/J7B
+ lmATAL1/G5t19HR3+9doz5H94y3WQG7ClWN1eoQtjLlvLfZO/iu20g==
+MIDlet-Jar-RSA-SHA1: ncuy0soEPUB4OPGHNyLn1ldXU2FvKvs0bUKGn/aPQefKI15aOlrczlapIWreUukE3ArQImU/xwxWh0
+ Q8LROEULJKXRIYyoGCCblM6o6EPYn+YT+CDd/HV8JlHS6OO+sAV//9vWuo9orIwSwdKN8wGl0g1JmPl8LF8V5/MjSmyh8=
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testdata/utils/utf8bom.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,8 @@
+MIDlet-Name: ışÿ
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MIDlet-Jar-URL: utf8bom.jar
+MIDlet-Jar-Size: 1417
+MicroEdition-Profile: MIDP-2.0
+MicroEdition-Configuration: CLDC-1.0
+MIDlet-1: ışÿ, ,UTF8BOM.UTF8BOM
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,54 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+-->
+<project name="InstallerTestServer" default="dist" basedir="..">
+ <property name="catalina.home" value="C:/apps/apache-tomcat-6.0.26"/>
+ <property name="build" value="${basedir}/build"/>
+ <property name="java.build" value="${build}/javabuild"/>
+ <property name="classes" value="${java.build}/WEB-INF/classes"/>
+ <property name="src" value="${basedir}/javasrc"/>
+ <property name="web" value="${basedir}/content"/>
+
+ <path id="compile.classpath">
+ <fileset dir="${catalina.home}/bin">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement location="${catalina.home}/lib"/>
+ <fileset dir="${catalina.home}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
+ <target name="compile">
+ <mkdir dir="${classes}"/>
+ <javac source="1.5" target="1.5" destdir="${classes}" srcdir="${src}">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <target name="dist" depends="compile">
+ <jar jarfile="${build}/installertest.war" basedir="${java.build}"
+ manifest="${web}/META-INF/MANIFEST.MF"/>
+ <jar jarfile="${build}/installertest.war" basedir="${web}"
+ update="true"/>
+ </target>
+
+ <target name="clean">
+ <delete dir="${java.build}"/>
+ <delete file="${build}/installertest.war"/>
+ </target>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/build/readme.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,41 @@
+Building
+--------
+
+Requirements:
+ * Apache Ant.
+ * Apache Tomcat. (Tested with 6.0.26)
+
+Change "catalina.home" property in build.xml file to match your Tomcat
+installation directory. Default is as follows:
+
+ <property name="catalina.home" value="C:/apps/apache-tomcat-6.0.26"/>
+
+To compile the project and to create .war archive just use either of following
+commands:
+
+ ant
+ ant dist
+
+To compile only use:
+
+ ant compile
+
+And to clean all build artifacts use:
+
+ ant clean
+
+Deployment
+----------
+
+After build is complete, "installertest.war" file is created into the "build"
+directory. Deploy it to Tomcat instance as any other .war file. For HTTP
+authentication tests it is assumed that user named "guest" with password
+"guest" and with role "guest" exits.
+
+Running the tests
+-----------------
+
+Before running tests add option "-server=server_ip_address:port" to
+NotificationPosterTest, DownloaderTest and InstallerEngineTest
+test suites in jiut.bat (for S60) or in build.xml (for Linux)
+in "javainstaller\installer\tsrc\build" directory.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,8 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Jar-Size: 1511
+MIDlet-Jar-URL: HelloWorld.jar
+MIDlet-Name: HelloWorld
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
\ No newline at end of file
Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_8mb.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,10 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Jar-Size: 7867927
+MIDlet-Jar-URL: HelloWorld_8mb.jar
+MIDlet-Name: HelloWorld_8mb
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Install-Notify: http://<SERVER><CONTEXT>/notify?tID=900_success
+MIDlet-Delete-Notify: http://<SERVER><CONTEXT>/notify?tID=912_deletion
Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_8mb.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_ota.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,10 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Jar-Size: 1511
+MIDlet-Jar-URL: HelloWorld.jar
+MIDlet-Name: HelloWorld
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Install-Notify: http://<SERVER><CONTEXT>/notify?tID=900_success
+MIDlet-Delete-Notify: http://<SERVER><CONTEXT>/notify?tID=912_deletion
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_redirect.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,9 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Jar-Size: 1719
+MIDlet-Jar-URL: http://<SERVER><CONTEXT>/redirect?name=HelloWorld_redirect.jar
+MIDlet-Name: HelloWorld_redirect
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
+MIDlet-Install-Notify: http://<SERVER><CONTEXT>/notify?tID=900_success
Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_redirect.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/META-INF/MANIFEST.MF Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/META-INF/context.xml Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+-->
+<Context docBase="installertest" path="/installertest">
+</Context>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/WEB-INF/web.xml Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
+ <display-name>installertest</display-name>
+
+ <servlet>
+ <description></description>
+ <display-name>redirect</display-name>
+ <servlet-name>redirect</servlet-name>
+ <servlet-class>com.nokia.mj.impl.installer.testserver.RedirectServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>redirect</servlet-name>
+ <url-pattern>/redirect</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <description></description>
+ <display-name>jad</display-name>
+ <servlet-name>jad</servlet-name>
+ <servlet-class>com.nokia.mj.impl.installer.testserver.JadServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>jad</servlet-name>
+ <url-pattern>*.jad</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <description></description>
+ <display-name>notify</display-name>
+ <servlet-name>notify</servlet-name>
+ <servlet-class>com.nokia.mj.impl.installer.testserver.NotifyServlet</servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>notify</servlet-name>
+ <url-pattern>/notify</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name></web-resource-name>
+ <url-pattern>/httpauth/*</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>guest</role-name>
+ </auth-constraint>
+ </security-constraint>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>httpauth</realm-name>
+ </login-config>
+
+ <security-role>
+ <role-name>guest</role-name>
+ </security-role>
+
+</web-app>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/content/httpauth/HelloWorld_http_auth.jad Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,8 @@
+MIDlet-1: HelloWorld, , helloworld.HelloWorld
+MIDlet-Jar-Size: 1721
+MIDlet-Jar-URL: HelloWorld_http_auth.jar
+MIDlet-Name: HelloWorld_http_auth
+MIDlet-Vendor: Nokia
+MIDlet-Version: 1.0
+MicroEdition-Configuration: CLDC-1.0
+MicroEdition-Profile: MIDP-2.0
\ No newline at end of file
Binary file javamanager/javainstaller/installer/tsrc/testserver/content/httpauth/HelloWorld_http_auth.jar has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/JadServlet.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.mj.impl.installer.testserver;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class JadServlet
+ */
+public class JadServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ protected void processRequest(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ ServletContext context = getServletContext();
+ String localPath = context.getRealPath(request.getServletPath());
+
+ response.setContentType("text/vnd.sun.j2me.app-descriptor");
+
+ BufferedReader in = null;
+ ServletOutputStream out = null;
+
+ try
+ {
+ in = new BufferedReader(new FileReader(localPath));
+ out = response.getOutputStream();
+
+ String line = in.readLine();
+ while (line != null)
+ {
+ if (line.startsWith("MIDlet-Jar-URL:")
+ || line.startsWith("MIDlet-Install-Notify:")
+ || line.startsWith("MIDlet-Delete-Notify:"))
+ {
+ line = line.replaceAll("<SERVER>", request.getServerName()
+ + ":" + request.getServerPort());
+ line = line.replaceAll("<CONTEXT>",
+ request.getContextPath());
+ }
+ out.println(line);
+ line = in.readLine();
+ }
+ }
+ catch (FileNotFoundException e)
+ {
+ response.sendError(HttpServletResponse.SC_NOT_FOUND,
+ request.getServletPath());
+ }
+ finally
+ {
+ if (out != null)
+ {
+ out.close();
+ }
+ if (in != null)
+ {
+ in.close();
+ }
+ }
+ }
+
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/NotifyServlet.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.mj.impl.installer.testserver;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class NotifyServlet
+ */
+public class NotifyServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ protected void processRequest(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ response.setStatus(HttpServletResponse.SC_OK);
+ }
+
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/RedirectServlet.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.mj.impl.installer.testserver;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class RedirectServlet
+ */
+public class RedirectServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ protected void processRequest(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ int redirectCount = 1;
+ String redirectUrl = "http://" + request.getServerName() + ":"
+ + request.getServerPort()
+ + request.getContextPath();
+
+ String countParam = request.getParameter("count");
+ String nameParam = request.getParameter("name");
+
+ if (countParam != null)
+ {
+ try
+ {
+ redirectCount = Integer.parseInt(countParam);
+ }
+ catch (NumberFormatException nfe)
+ {
+ }
+ }
+
+ if (redirectCount > 1)
+ {
+ redirectUrl += request.getServletPath() + "?count="
+ + (redirectCount - 1) + "&name=";
+ }
+ else
+ {
+ redirectUrl += "/";
+ }
+
+ redirectUrl += nameParam;
+ response.sendRedirect(redirectUrl);
+ }
+
+ protected void doGet(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+ protected void doPost(HttpServletRequest request,
+ HttpServletResponse response)
+ throws ServletException, IOException
+ {
+ processRequest(request, response);
+ }
+
+}
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java Fri Jul 09 16:35:45 2010 +0300
@@ -385,6 +385,13 @@
}
/**
+ * Executes given Runnable synchronously in the UI thread.
+ */
+ public void syncExec(Runnable aRunnable)
+ {
+ }
+
+ /**
* Writes an info log entry to JavaInstaller log.
*
* @param aMsg message to be logged
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiFactory.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiFactory.java Fri Jul 09 16:35:45 2010 +0300
@@ -50,9 +50,9 @@
installerUi = (InstallerUi)clazz.newInstance();
installerUi.init(aMode, aListener);
}
- catch (Exception ex)
+ catch (Throwable t)
{
- logError("Instantiating " + className + " failed", ex);
+ logError("Instantiating " + className + " failed", t);
}
return installerUi;
}
--- a/javamanager/javainstaller/javainstaller.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/javainstaller.pro Fri Jul 09 16:35:45 2010 +0300
@@ -16,5 +16,6 @@
TEMPLATE = subdirs
SUBDIRS += installerui/build/javainstallerui.pro
SUBDIRS += installer/build/javainstaller.pro
+SUBDIRS += installcopier/build/javainstallcopier.pro
BLD_INF_RULES.prj_extensions += "$${LITERAL_HASH}include \"javasifplugin/build/bld.inf\""
BLD_INF_RULES.prj_extensions += "prj_extensions"
--- a/javamanager/javainstaller/javasifplugin/build/javasifplugin.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/javasifplugin/build/javasifplugin.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -42,6 +42,7 @@
// Sources
SOURCEPATH ../src
+SOURCE asyncwaitcallback.cpp
SOURCE javasifplugin.cpp
SOURCE proxy.cpp
SOURCE resultsserver.cpp
@@ -52,14 +53,14 @@
USERINCLUDE ../inc
USERINCLUDE ../../../../inc
-SYSTEMINCLUDE ../../../../inc
-SYSTEMINCLUDE /epoc32/include/mw/usif
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets
// Libraries
LIBRARY apgrfx.lib
LIBRARY apmime.lib
LIBRARY ecom.lib
LIBRARY efsrv.lib
+LIBRARY hbwidgets.lib
LIBRARY sif.lib
LIBRARY javacomms.lib
-LIBRARY javaruntimestarterutils.lib
\ No newline at end of file
+LIBRARY javaruntimestarterutils.lib
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/javasifplugin/inc/asyncwaitcallback.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,78 @@
+/*
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This class implements general wait object for calling a desired
+* callback function after asynchronous notification
+*
+*/
+
+#ifndef ASYNCWAITCALLBACK_H
+#define ASYNCWAITCALLBACK_H
+
+#include <e32base.h>
+
+namespace java
+{
+namespace installer
+{
+
+/**
+ * This class implements wait object for calling a desired
+ * callback function after rendezvous returns specified
+ * reason code from the process that this object is listening to.
+ */
+NONSHARABLE_CLASS(CAsyncWaitCallBack) : public CActive
+{
+public: // Constructors and destructor
+
+ static CAsyncWaitCallBack* NewL(TCallBack aCallBack);
+
+ // Destructor.
+ virtual ~CAsyncWaitCallBack();
+
+public: // From base classes
+
+ // from base class CActive
+
+ void RunL();
+
+ void DoCancel();
+
+public:
+
+ void Wait(RProcess aProcessToListen, TInt aActivatingReasonCode);
+
+private:
+
+ // Constructor.
+ CAsyncWaitCallBack();
+
+ // 2nd phase constructor.
+ void ConstructL(TCallBack aCallBack);
+
+private: // Data
+
+ // Callback member
+ TCallBack iCallBack;
+
+ // When request completes with this status code,
+ // callback is called.
+ TInt iActivatingReasonCode;
+
+ RProcess iProcessToListen;
+};
+
+} // installer
+} // java
+
+#endif // ASYNCWAITCALLBACK_H
--- a/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/javasifplugin/inc/javasifplugin.h Fri Jul 09 16:35:45 2010 +0300
@@ -22,8 +22,10 @@
#define JAVASIFPLUGIN_H
#include <e32base.h>
+#include <hbdevicenotificationdialogsymbian.h>
#include <usif/sif/sifplugin.h>
+#include "asyncwaitcallback.h"
#include "f32file.h"
class ResultsServer;
@@ -196,6 +198,11 @@
virtual void CancelOperation();
+ /**
+ * Hides 'preparing installation' dialog.
+ */
+ void HidePrepInstDialogL();
+
private:
/**
@@ -296,6 +303,11 @@
COpaqueNamedParams& aResults,
TRequestStatus& aStatus);
+ /**
+ * Creates 'preparing installation' dialog.
+ */
+ void CreatePrepInstDialogL();
+
private: // Data
RFs mRFs;
@@ -304,6 +316,9 @@
COpaqueNamedParams* mDummyResults;
CComponentInfo* mDummyInfo;
+
+ CHbDeviceNotificationDialogSymbian* mPrepInstDialog;
+ CAsyncWaitCallBack* mWaitToHideDialog;
};
} // Installer
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/javasifplugin/src/asyncwaitcallback.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This class implements general wait object for calling a desired
+ * callback function after asynchronous notification
+ *
+*/
+
+#include "asyncwaitcallback.h"
+#include "logger.h"
+
+using namespace java::installer;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+CAsyncWaitCallBack* CAsyncWaitCallBack::NewL(TCallBack aCallBack)
+{
+ CAsyncWaitCallBack* self = new(ELeave) CAsyncWaitCallBack();
+ CleanupStack::PushL(self);
+ self->ConstructL(aCallBack);
+ CleanupStack::Pop(self);
+ return self;
+}
+
+CAsyncWaitCallBack::CAsyncWaitCallBack():
+ CActive(CActive::EPriorityStandard), iActivatingReasonCode(0)
+{
+}
+
+CAsyncWaitCallBack::~CAsyncWaitCallBack()
+{
+}
+
+void CAsyncWaitCallBack::ConstructL(TCallBack aCallBack)
+{
+ iCallBack = aCallBack;
+ CActiveScheduler::Add(this);
+}
+
+void CAsyncWaitCallBack::RunL()
+{
+ // Execute callback only if the request completed with correct
+ // status code
+ if (iStatus == iActivatingReasonCode)
+ {
+ ILOG1(EJavaInstaller,
+ "CAsyncWaitCallBack called with notif code %d",
+ iStatus.Int());
+ iCallBack.CallBack();
+ }
+ else
+ {
+ WLOG1(EJavaInstaller,
+ "CAsyncWaitCallBack was called with unexpected notif code %d, reactivate",
+ iStatus.Int());
+ // Reactivate wait
+ iProcessToListen.Rendezvous(iStatus);
+ SetActive();
+ }
+}
+
+void CAsyncWaitCallBack::DoCancel()
+{
+ iProcessToListen.RendezvousCancel(iStatus);
+}
+
+void CAsyncWaitCallBack::Wait(RProcess aProcessToListen, TInt aActivatingReasonCode)
+{
+ iActivatingReasonCode = aActivatingReasonCode;
+ iProcessToListen = aProcessToListen;
+ iProcessToListen.Rendezvous(iStatus);
+ SetActive();
+}
+
--- a/javamanager/javainstaller/javasifplugin/src/javasifplugin.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/javasifplugin/src/javasifplugin.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -49,6 +49,7 @@
_LIT(KPrivateDataCage, "\\private\\");
_LIT(KInboxDataCage, "\\private\\1000484b\\");
_LIT(KJavaInstallerProcess, "Installer*");
+_LIT(KJavaInstallCopierProcess, "javainstallcopier.exe");
_LIT(KJavaInstallerDataCage, "\\private\\102033e6\\");
_LIT(KJavaInstallerTmp, "\\private\\102033E6\\installer\\tmp\\");
_LIT(KAnyExtension, ".*");
@@ -93,7 +94,18 @@
// Java Installer is executed with same Uid as Java Runtime
_LIT_SECURE_ID(KJavaInstallerSecureID, KJavaMidpSecureId);
-
+/**
+ * This function is called to hide the 'Preparing Installation' dialog.
+ */
+LOCAL_C TInt HidePrepInstDialog(TAny* aPlugin)
+{
+ CJavaSifPlugin *pPlugin = (CJavaSifPlugin *)aPlugin;
+ if (NULL != pPlugin)
+ {
+ TRAP_IGNORE(pPlugin->HidePrepInstDialogL());
+ }
+ return KErrNone;
+}
// ============================ MEMBER FUNCTIONS ===============================
@@ -126,6 +138,15 @@
delete mDummyInfo;
mDummyInfo = NULL;
+
+ delete mPrepInstDialog;
+ mPrepInstDialog = NULL;
+
+ if (mWaitToHideDialog)
+ {
+ delete mWaitToHideDialog;
+ mWaitToHideDialog = NULL;
+ }
}
CJavaSifPlugin::CJavaSifPlugin()
@@ -139,6 +160,7 @@
mResultsServer = NULL;
mDummyResults = COpaqueNamedParams::NewL(); // codescanner::forgottoputptroncleanupstack
mDummyInfo = CComponentInfo::NewL();
+ mWaitToHideDialog = NULL;
}
void CJavaSifPlugin::GetComponentInfo(
@@ -277,7 +299,16 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- mHandlesToClose.Append(rJavaInstaller);
+ err = mHandlesToClose.Append(rJavaInstaller);
+ if ( err )
+ {
+ rJavaInstaller.Close();
+ ELOG1(EJavaInstaller, "CJavaSifPlugin::GetComponentInfo mHandles"
+ "ToClose.Append failed with error %d", err);
+ TRequestStatus *statusPtr(&aStatus);
+ User::RequestComplete(statusPtr, err);
+ return;
+ }
}
void CJavaSifPlugin::Install(
@@ -352,6 +383,17 @@
commandLine.Append(KSilent);
}
+ else
+ {
+ // Uncomment this to enable 'preparing installation' dialog.
+ //TRAP(err, CreatePrepInstDialogL());
+ //if (KErrNone != err)
+ //{
+ // WLOG1(EJavaInstaller,
+ // "CJavaSifPlugin::Install Creating preparing installation dialog failed, err=%d",
+ // err);
+ //}
+ }
BuildInstallCommandLine(commandLine, aArguments);
@@ -440,11 +482,41 @@
return;
}
+ if (!silentInstall)
+ {
+ TRAP(err, mWaitToHideDialog =
+ CAsyncWaitCallBack::NewL(TCallBack(HidePrepInstDialog, this)));
+ if (KErrNone == err)
+ {
+ // The active object will wait until JavaInstaller process calls Rendezvous.
+ // If JavaInstaller specifies reason code EJavaInstaller, then
+ // the active object will call callback function that will hide the
+ // 'Preparing installation' dialog. If reason code is not EJavaInstaller,
+ // the wait object will automatically wait for the next rendezvous.
+ mWaitToHideDialog->Wait( rJavaInstaller, EJavaInstaller );
+ }
+ else
+ {
+ ELOG1(EJavaInstaller, "CJavaSifPlugin::Install: Creating "
+ "mWaitToHideDialog failed, err %d", err);
+ }
+ }
rJavaInstaller.Resume();
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- mHandlesToClose.Append(rJavaInstaller);
+ err = mHandlesToClose.Append(rJavaInstaller);
+ if ( err )
+ {
+ rJavaInstaller.Close();
+ ELOG1(EJavaInstaller, "CJavaSifPlugin::Install mHandles"
+ "ToClose.Append failed with error %d", err);
+ TRAP_IGNORE(aResults.AddIntL(KSifOutParam_ErrCategory, ELowMemory));
+ TRequestStatus *statusPtr(&aStatus);
+ User::RequestComplete(statusPtr, err);
+ return;
+ }
+
}
void CJavaSifPlugin::Uninstall(
@@ -539,7 +611,17 @@
// Do NOT close rJavaInstaller now -> the caller gets notification when the
// process actually closes.
- mHandlesToClose.Append(rJavaInstaller);
+ err = mHandlesToClose.Append(rJavaInstaller);
+ if ( err )
+ {
+ rJavaInstaller.Close();
+ ELOG1(EJavaInstaller, "CJavaSifPlugin::Uninstall mHandles"
+ "ToClose.Append failed with error %d", err);
+ TRAP_IGNORE(aResults.AddIntL(KSifOutParam_ErrCategory, ELowMemory));
+ TRequestStatus *statusPtr(&aStatus);
+ User::RequestComplete(statusPtr, err);
+ return;
+ }
}
void CJavaSifPlugin::Activate(
@@ -659,18 +741,36 @@
// to Java Installer tmp dir.)
TParse fp;
mRFs.Parse(aFileName, fp);
-
- CFileMan* fm = CFileMan::NewL(mRFs);
TFileName filesToCopy = fp.DriveAndPath();
filesToCopy.Append(fp.Name());
filesToCopy.Append(KAnyExtension);
- TInt err = fm->Copy(filesToCopy, KJavaInstallerTmp, CFileMan::ERecurse);
- delete fm;
- if (KErrNone != err)
+
+ // Use JavaInstallCopier.exe to copy the files.
+ RProcess rJavaInstallCopier;
+ TInt err = rJavaInstallCopier.Create(
+ KJavaInstallCopierProcess, filesToCopy);
+ if (KErrNone == err)
{
+ TRequestStatus status;
+ rJavaInstallCopier.Logon(status);
+ rJavaInstallCopier.Resume();
+ User::WaitForRequest(status); // codescanner::userWaitForRequest
+ err = rJavaInstallCopier.ExitReason();
+ rJavaInstallCopier.Close();
+ if (KErrNone != err)
+ {
+ ELOG1(EJavaInstaller,
+ "CJavaSifPlugin::CopyFilesIfNeededL: copying files "
+ "to JavaInstaller data cage failed, err=%d", err);
+ User::Leave(err);
+ }
+ }
+ else
+ {
+ rJavaInstallCopier.Close();
ELOG1(EJavaInstaller,
- "CJavaSifPlugin::CopyFilesIfNeededL: copying files "
- "to Java Installer data cage failed, err=%d", err);
+ "CJavaSifPlugin::CopyFilesIfNeededL: starting "
+ "JavaInstallCopier failed, err=%d", err);
User::Leave(err);
}
@@ -803,13 +903,8 @@
}
// AskUser is not supported
-
-
- // TODO: activate this code block when KSifInParam_UpgradeData has been
- // defined in sifcommon.h
-/*
- // KSifInParam_UpgradeData Yes/No/AskUser -> -upgrade_data=yes|no
- intValue = GetPositiveIntParam(KSifInParam_UpgradeData, aArguments);
+ // KSifInParam_AllowUpgradeData Yes/No/AskUser -> -upgrade_data=yes|no
+ intValue = GetPositiveIntParam(KSifInParam_AllowUpgradeData, aArguments);
if (intValue == 0) // Yes
{
aCommandLine.Append(KUpgradeData);
@@ -821,7 +916,6 @@
aCommandLine.Append(KNo);
}
// AskUser is not supported
-*/
// KSifInParam_AllowUntrusted Yes/No/AskUser -> -untrusted=yes|no
intValue = GetPositiveIntParam(KSifInParam_AllowUntrusted, aArguments);
@@ -1101,5 +1195,34 @@
return EFalse;
}
+/**
+ * Creates 'preparing installation' dialog.
+ */
+void CJavaSifPlugin::CreatePrepInstDialogL()
+{
+ ILOG(EJavaInstaller, "CJavaSifPlugin::CreatePrepInstDialogL creating dialog");
+ mPrepInstDialog = CHbDeviceNotificationDialogSymbian::NewL();
+ _LIT(KPrepInstText, "Preparing installation...");
+ mPrepInstDialog->SetTitleL(KPrepInstText);
+ mPrepInstDialog->SetTimeout(20*1000); // ms
+ mPrepInstDialog->ShowL();
+ ILOG(EJavaInstaller, "CJavaSifPlugin::CreatePrepInstDialogL dialog created");
+}
+
+void CJavaSifPlugin::HidePrepInstDialogL()
+{
+ ILOG(EJavaInstaller, "CJavaSifPlugin::HidePrepInstDialogL hiding dialog");
+ // Stop further timed calls
+ if (mWaitToHideDialog)
+ {
+ mWaitToHideDialog->Cancel();
+ }
+ // Close wait dialog.
+ if (mPrepInstDialog)
+ {
+ mPrepInstDialog->Close();
+ }
+ ILOG(EJavaInstaller, "CJavaSifPlugin::HidePrepInstDialogL dialog hidden");
+}
// End of File
--- a/javamanager/javainstaller/javasifplugin/tsrc/src.s60/main.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/javasifplugin/tsrc/src.s60/main.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -591,7 +591,13 @@
// TEMP TEST
// This thread does not have active scheduler,
// create and install it
- CActiveScheduler* as = new(ELeave) CActiveScheduler();
+ CActiveScheduler* as = new CActiveScheduler();
+ if (NULL == as)
+ {
+ ELOG(EJavaConverters,
+ "testsifapi: cancelFunction: Cannot create active scheduler");
+ return 1;
+ }
CActiveScheduler::Install(as);
// Wait for 6 seconds so that the operation to be cancelled
--- a/javamanager/javainstaller/subsystem.mk Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javainstaller/subsystem.mk Fri Jul 09 16:35:45 2010 +0300
@@ -23,9 +23,14 @@
ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
NONQTSUBSYSTEMS = javasifplugin/build
SYMBIAN_ONLY = javasifplugin/build
+ COMPONENTS += installcopier/build
else
NONQTSUBSYSTEMS = appinstuiplugin/build
SYMBIAN_ONLY = appinstuiplugin/build
+ifndef RD_JAVA_S60_RELEASE_5_0_IAD
+ NONQTSUBSYSTEMS += iconsizenotifplugin/build
+ SYMBIAN_ONLY += iconsizenotifplugin/build
+endif
endif
LINUX_ONLY =
--- a/javamanager/javamanager.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javamanager.pro Fri Jul 09 16:35:45 2010 +0300
@@ -18,6 +18,7 @@
SUBDIRS += debugapi/build/debugapi.pro
SUBDIRS += javalauncher/build/javalauncher.pro
SUBDIRS += javaupgradeapp/build/javaupgradeapp.pro
+SUBDIRS += javasettings_qt/build/javaapplicationsettingsview.pro
SUBDIRS += javacaptain
SUBDIRS += javainstaller
SUBDIRS += javaregistry
--- a/javamanager/javarecognizer/build/recjar.mmp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javarecognizer/build/recjar.mmp Fri Jul 09 16:35:45 2010 +0300
@@ -32,7 +32,11 @@
// Use bytepair compression to enable code paging
PAGED
+APP_LAYER_SYSTEMINCLUDE
+
USERINCLUDE ../inc
+USERINCLUDE ../../../inc
+
SOURCEPATH ../src
SOURCE recjar.cpp
@@ -40,9 +44,6 @@
TARGET recjar.rsc
END
-SYSTEMINCLUDE ../../../inc
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE /epoc32/include/ecom
LIBRARY euser.lib apmime.lib efsrv.lib
--- a/javamanager/javaregistry/build/eabi/javaregistryclientu.def Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javaregistry/build/eabi/javaregistryclientu.def Fri Jul 09 16:35:45 2010 +0300
@@ -209,4 +209,12 @@
_ZNK4Java7Manager8Registry34CWriteableJavaRegistryPackageEntry17UsedUserDiskSpaceEv @ 208 NONAME
_ZNK4Java7Manager8Registry34CWriteableJavaRegistryPackageEntry14IsPreinstalledEv @ 209 NONAME
_ZNK4Java25CJavaRegistryPackageEntry14IsPreinstalledEv @ 210 NONAME
+ _ZN4Java14CJavaAttributeD0Ev @ 211 NONAME
+ _ZN4Java14CJavaAttributeD1Ev @ 212 NONAME
+ _ZN4Java14CJavaAttributeD2Ev @ 213 NONAME
+ _ZN4Java18CJavaRegistryEntryD0Ev @ 214 NONAME
+ _ZN4Java18CJavaRegistryEntryD1Ev @ 215 NONAME
+ _ZN4Java18CJavaRegistryEntryD2Ev @ 216 NONAME
+ _ZThn4_N4Java14CJavaAttributeD0Ev @ 217 NONAME
+ _ZThn4_N4Java14CJavaAttributeD1Ev @ 218 NONAME
--- a/javamanager/javaregistry/client/src/writeablejavaregistry.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javaregistry/client/src/writeablejavaregistry.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -363,9 +363,17 @@
if (KErrNotFound == err)
{
+ // reset the error flag
+ err = KErrNone;
if (IsPresent((*iter)))
{
- aUids.Append(uid);
+ err = aUids.Append(uid);
+ }
+ if (err)
+ {
+ ELOG1(EJavaStorage, "Failed to add Uid to container. "
+ "( error code = %d )", err);
+
}
}
}
@@ -414,7 +422,7 @@
}
}
}
- catch (ExceptionBase)
+ catch (ExceptionBase& ee)
{
ELOG1WSTR(EJavaStorage, "MediaId conversion failed: '%s'", value);
}
--- a/javamanager/javaregistry/client/src/writeablejavaregistryentry.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javaregistry/client/src/writeablejavaregistryentry.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -379,7 +379,7 @@
regAttr = CJavaAttribute::NewL(
nameBuf->Des(), valueBuf->Des(), trusted);
- iAttributes.Append(regAttr);
+ iAttributes.AppendL(regAttr);
nameBuf.reset(0);
valueBuf.reset(0);
--- a/javamanager/javaregistry/legacy/server/src/javaregstore.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javaregistry/legacy/server/src/javaregstore.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -543,7 +543,7 @@
{
if (IsPresentL((*iter)))
{
- aUids.Append(uid);
+ aUids.AppendL(uid);
}
}
}
@@ -765,7 +765,7 @@
TInt err = uidToTUid(appUid, converted);
if (KErrNone == err)
{
- uids.Append(converted);
+ uids.AppendL(converted);
}
else
{
Binary file javamanager/javaregistry/tsrc/data/HelloWorld2.jar has changed
--- a/javamanager/javasettings/appsettingsview_qt/build/javaapplicationsettingsview.pro Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-TEMPLATE = lib
-TARGET = javaapplicationsettingsview
-CONFIG += qt hb stl plugin
-LIBS += -ljavastorage -lcmapplsettingsui -ljavaconnectionmanager -lqtbearer -ljavautils
-TRANSLATIONS = javaruntimeapplicationsettings.ts
-
-INCLUDEPATH += ../inc ../../../../inc
-SOURCES += ..\src\javaapplicationsettingsview.cpp ..\src\javaapplicationsettingsview_p.cpp ..\src\javaapplicationsettings.cpp
-HEADERS += ..\src\javaapplicationsettingsview.h ..\src\javaapplicationsettingsview_p.h ..\src\javaapplicationsettings.h
-
-symbian : plugin {
- TARGET.EPOCALLOWDLLDATA = 1
- TARGET.CAPABILITY = ALL -TCB
- PLUGIN_STUB_PATH = /resource/qt/plugins/appsettings
- pluginstub.sources = $${TARGET}.dll
- pluginstub.path = $$PLUGIN_STUB_PATH
- DEPLOYMENT += pluginstub
- qtplugins.path = $$PLUGIN_STUB_PATH
- qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
- for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)"
-
- include(../../../../build/symbian_uids.pri)
-
-}
-
-# Workaround for RVCT 4.0 QT/Symbian incmpatibility
-MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
--- a/javamanager/javasettings/appsettingsview_qt/inc/applicationsettingsview.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef APPLICATIONSETTINGSVIEW_H
-#define APPLICATIONSETTINGSVIEW_H
-
-#include <hbview.h>
-#include <QtPlugin>
-
-class ApplicationSettingsView: public HbView
-{
-public:
-
- /*
- * Base constructor
- */
- explicit ApplicationSettingsView() : HbView() {}
-
- /*
- * Destructor
- */
- virtual ~ApplicationSettingsView() {}
-
-public slots:
- /*
- * Initializas the view with application specific info
- *
- * @param aAppUid Identifier for the application
- *
- */
- void initialize(const QString& aAppUid);
-
-};
-
-Q_DECLARE_INTERFACE(ApplicationSettingsView,
- "com.nokia.ApplicationLibrary.ApplicationSettingsView/1.0");
-
-#endif // APPLICATIONSETTINGSVIEW_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "javaapplicationsettings.h"
-
-JavaApplicationSettings::JavaApplicationSettings():
- iName(QString("")),
- iValues(QStringList()),
- iId(0), iCurrentValue(0),
- iColumnName(L""),
- iTableName(""),
- iStorageValuesFilter(L""),
- iValuesColumnName(L""),
- iFilterColumnName(L""),
- iFilterColumnValue(L""),
- connectedToUi(false)
-{
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues):
- iName(aName),
- iValues(aValues),
- iId(0),
- iCurrentValue(0),
- iColumnName(L""),
- iTableName(""),
- iStorageValuesFilter(L""),
- iValuesColumnName(L""),
- iFilterColumnName(L""),
- iFilterColumnValue(L""),
- connectedToUi(false)
-{
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues):
- iName(aName),
- iValues(aValues),
- iId(0),
- iCurrentValue(0),
- iColumnName(aColumnName),
- iTableName(aTableName),
- iStorageValues(aStorageValues),
- iStorageValuesFilter(L""),
- iValuesColumnName(L""),
- iFilterColumnName(L""),
- iFilterColumnValue(L""),
- connectedToUi(false)
-{
-}
-
-JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues, const std::wstring& aFilterColumnName, const std::wstring& aFilterColumnValue, const std::wstring& aValuesColumnName):
- iName(aName),
- iValues(aValues),
- iId(0),
- iCurrentValue(0),
- iColumnName(aColumnName),
- iTableName(aTableName),
- iStorageValues(aStorageValues),
- iStorageValuesFilter(L""),
- iValuesColumnName(aValuesColumnName),
- iFilterColumnName(aFilterColumnName),
- iFilterColumnValue(aFilterColumnValue),
- connectedToUi(false)
-{
-}
-
-void JavaApplicationSettings::setCurrentValue(int aCurrentValue)
-{
- iCurrentValue = aCurrentValue;
-}
-
-void JavaApplicationSettings::connectToUi()
-{
- connectedToUi = true;
-}
-
-void JavaApplicationSettings::disconnectFromUi()
-{
- connectedToUi = false;
-}
-
-bool JavaApplicationSettings::isConnectedToUi()
-{
- return connectedToUi;
-}
-
-int JavaApplicationSettings::getCurrentValue()
-{
- return iCurrentValue;
-}
-
-const QString& JavaApplicationSettings::getValue(int aValueIndex)
-{
- static const QString null;
- if (aValueIndex >= 0 && aValueIndex < iValues.size())
- return iValues[aValueIndex];
- return null;
-}
-
-void JavaApplicationSettings::removeValue(int aValueIndex)
-{
- if (aValueIndex >= 0 && aValueIndex < iStorageValues.size())
- iStorageValues.erase(iStorageValues.begin() + aValueIndex);
- if (aValueIndex >= 0 && aValueIndex < iValues.size())
- iValues.erase(iValues.begin() + aValueIndex);
-}
-
-int JavaApplicationSettings::getValue(const QString& aValue)
-{
- int value = -1;
- for (int i = 0; i < iValues.size(); i++)
- {
- if (iValues[i] == aValue)
- {
- return i;
- }
- }
- return value;
-}
-
-void JavaApplicationSettings::setId(HbDataFormModelItem * aId)
-{
- iId = aId;
-}
-
-HbDataFormModelItem * JavaApplicationSettings::getId()
-{
- return iId;
-}
-
-const QString& JavaApplicationSettings::getName() const
-{
- return iName;
-}
-
-const QStringList& JavaApplicationSettings::getValues() const
-{
- return iValues;
-}
-
-const QList<JavaApplicationSettings*>& JavaApplicationSettings::getHighRiskList() const
-{
- return iHighRiskList;
-}
-
-void JavaApplicationSettings::setHighRiskList(const QList<JavaApplicationSettings*>& aHighRiskList)
-{
- iHighRiskList = aHighRiskList;
-}
-
-const QList<JavaApplicationSettings*>& JavaApplicationSettings::getMutuallyExclusiveList() const
-{
- return iMutuallyExclusiveList;
-}
-
-void JavaApplicationSettings::setMutuallyExclusiveList(const QList<JavaApplicationSettings*>& aMutuallyExclusiveList)
-{
- iMutuallyExclusiveList = aMutuallyExclusiveList;
-}
-
-const std::wstring& JavaApplicationSettings::getColumnName()
-{
- return iColumnName;
-}
-
-const std::wstring& JavaApplicationSettings::getValuesColumnName()
-{
- return iValuesColumnName;
-}
-
-const std::string& JavaApplicationSettings::getTableName()
-{
- return iTableName;
-}
-
-const std::vector<std::wstring>& JavaApplicationSettings::getStorageValues()
-{
- return iStorageValues;
-}
-
-void JavaApplicationSettings::setStorageValuesFilter(const std::wstring& aStorageValuesFilter)
-{
- iStorageValuesFilter = aStorageValuesFilter;
-}
-
-const std::wstring& JavaApplicationSettings::getStorageValuesFilter()
-{
- return iStorageValuesFilter;
-}
-
-const std::wstring& JavaApplicationSettings::getFilterColumnName()
-{
- return iFilterColumnName;
-}
-
-const std::wstring& JavaApplicationSettings::getFilterColumnValue()
-{
- return iFilterColumnValue;
-}
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGS_H
-#define JAVAAPPLICATIONSETTINGS_H
-
-#include <string>
-#include <vector>
-#include <QString>
-#include <QStringList>
-#include <hbdataformmodelitem.h>
-#include <cmapplsettingsui.h>
-
-class JavaApplicationSettings
-{
-public:
-
- struct NetworkConnection
- {
- QString name;
- uint id;
- CmApplSettingsUi::SelectionType type;
- };
-
- JavaApplicationSettings(const QString&,
- const QStringList&);
- JavaApplicationSettings(const QString&,
- const QStringList&,
- const std::wstring&,
- const std::string&,
- const std::vector<std::wstring>&);
- JavaApplicationSettings(const QString&,
- const QStringList&,
- const std::wstring&,
- const std::string&,
- const std::vector<std::wstring>&,
- const std::wstring&,
- const std::wstring&,
- const std::wstring&);
- JavaApplicationSettings();
-
- const QString& getName() const;
- const QStringList& getValues() const;
- void setCurrentValue(int);
- int getCurrentValue();
- const QString& getValue(int);
- int getValue(const QString&);
- void removeValue(int);
- void setId(HbDataFormModelItem *);
- HbDataFormModelItem * getId();
- const QList<JavaApplicationSettings*>& getHighRiskList() const;
- void setHighRiskList(const QList<JavaApplicationSettings*>&);
- const QList<JavaApplicationSettings*>& getMutuallyExclusiveList() const;
- void setMutuallyExclusiveList(const QList<JavaApplicationSettings*>&);
- const std::wstring& getColumnName();
- const std::string& getTableName();
- const std::wstring& getValuesColumnName();
- const std::wstring& getFilterColumnName();
- const std::wstring& getFilterColumnValue();
- const std::vector<std::wstring>& getStorageValues();
- void setStorageValuesFilter(const std::wstring&);
- const std::wstring& getStorageValuesFilter();
- void connectToUi();
- void disconnectFromUi();
- bool isConnectedToUi();
-
-private:
- QString iName;
- QStringList iValues;
- HbDataFormModelItem * iId;
- QList<JavaApplicationSettings*> iHighRiskList;
- QList<JavaApplicationSettings*> iMutuallyExclusiveList;
- int iCurrentValue;
- std::wstring iColumnName;
- std::string iTableName;
- std::vector<std::wstring> iStorageValues;
- std::wstring iStorageValuesFilter;
- std::wstring iValuesColumnName;
- std::wstring iFilterColumnName;
- std::wstring iFilterColumnValue;
- bool connectedToUi;
-};
-
-#endif // JAVAAPPLICATIONSETTINGS_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include "javaapplicationsettingsview.h"
-#include "javaapplicationsettingsview_p.h"
-
-JavaApplicationSettingsView::JavaApplicationSettingsView() :
- ApplicationSettingsView()
-{
-}
-
-void JavaApplicationSettingsView::initialize(const QString& aApplication)
-{
- d_ptr = new JavaApplicationSettingsViewPrivate(aApplication);
- d_ptr->init(this);
-}
-
-JavaApplicationSettingsView::~JavaApplicationSettingsView()
-{
- delete d_ptr;
-}
-
-Q_EXPORT_PLUGIN2(javaapplicationsettingsview, JavaApplicationSettingsView);
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGSVIEW_H
-#define JAVAAPPLICATIONSETTINGSVIEW_H
-
-#include "applicationsettingsview.h"
-
-class JavaApplicationSettingsViewPrivate;
-
-class JavaApplicationSettingsView: public ApplicationSettingsView
-{
- Q_OBJECT
- Q_INTERFACES(ApplicationSettingsView)
-
-public:
- explicit JavaApplicationSettingsView();
- virtual ~JavaApplicationSettingsView();
-
-public slots:
- void initialize(const QString&);
-
-signals:
- void aboutToClose();
-
-private:
- Q_DISABLE_COPY(JavaApplicationSettingsView)
- Q_DECLARE_PRIVATE_D(d_ptr, JavaApplicationSettingsView)
- Q_PRIVATE_SLOT(d_func(), void _q_settingsChanged(const QString &newValue))
- Q_PRIVATE_SLOT(d_func(), void _q_settingsChanged(bool))
- Q_PRIVATE_SLOT(d_func(), void _q_dataItemDisplayed(const QModelIndex))
-
-private:
- JavaApplicationSettingsViewPrivate * d_ptr;
-};
-
-
-#endif // JAVAAPPLICATIONSETTINGSVIEW_H
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1104 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#include <hbmessagebox.h>
-#include <hbdataformviewitem.h>
-#include <hbcombobox.h>
-#include <hbpushbutton.h>
-#include <hbdataform.h>
-#include <hbdataformmodel.h>
-#include <hbdataformmodelitem.h>
-#include <hblabel.h>
-#include <hbaction.h>
-#include <QApplication>
-#include <QTranslator>
-#include <qnetworkconfigmanager.h>
-#include <qnetworkconfiguration.h>
-#include <algorithm>
-
-#include "javaapplicationsettings.h"
-#include "javaapplicationsettingsview.h"
-#include "javaapplicationsettingsview_p.h"
-#include "connectionmanager.h"
-#include "javacommonutils.h"
-
-#include "securitystoragedatadefs.h"
-#include "javastoragenames.h"
-
-QTM_USE_NAMESPACE
-
-using namespace java::storage;
-using namespace java::util;
-using namespace std;
-
-const wchar_t ON_SCREEN_KEYPAD_VALUE_NO[] = L"0";
-const wchar_t ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS[] = L"1";
-const wchar_t ON_SCREEN_KEYPAD_VALUE_NAVIGATION[] = L"2";
-
-JavaApplicationSettingsViewPrivate::JavaApplicationSettingsViewPrivate(const QString& aJavaAppUid):
- mainForm(0), model(0), generalSettingsGroup(0), securitySettingsGroup(0), netConnSettingsUi(0), asyncToSyncCallEventLoop(0), secWarningAccepted(false), defaultConnId(0)
-{
- // init storage
- iStorage.reset(JavaStorage::createInstance());
- try
- {
- iStorage->open();
- }
- catch (JavaStorageException& aJse) {}
-
- QTranslator translator;
- // load the correct translation of the localized strings for the cmmanager.
- // Load this one first since it contains the smallest amount of strings
- // (so it's ok to be searched last)
- installTranslator("cmapplsettingsui");
- installTranslator("cmmanager");
- // load the correct translation of the localized strings for the java settings
- // Current solution reads it from Z only (this does not work with IAD)
- // -> check if translator can handle path without drive letter (e.g. the resource
- // is loaded from the same drive where the DLL is loaded)
- installTranslator("javaruntimeapplicationsettings");
- // init strings
- BLANKET = QString(hbTrId("txt_java_sett_setlabel_permission_val_blanket"));
- SESSION = QString(hbTrId("txt_java_sett_setlabel_permission_val_session"));
- ONESHOT = QString(hbTrId("txt_java_sett_setlabel_permission_val_oneshot"));
- DENIED = QString(hbTrId("txt_java_sett_setlabel_permission_val_no"));
- SECURITY_LEVEL = QString(hbTrId("txt_java_sett_setlabel_security_level"));
- USER_DEFINED = QString(hbTrId("txt_java_sett_setlabel_security_level_val_user_defined"));
- SENSITIVE_SETTINGS = QString(hbTrId("txt_java_sett_info_query_perm_sec"));
- SENSITIVE_SETTINGS_NET_USAGE = QString(hbTrId("txt_java_sett_info_query_perm_net"));
- MUTUALLY_EXCLUSIVE_SETTINGS = QString(hbTrId("txt_java_sett_info_query_perm_warn"));
- OK = QString(hbTrId("txt_java_sett_button_settings_ok"));
- CANCEL = QString(hbTrId("txt_java_sett_button_settings_cancel"));
- SECURITY_WARNING_TITLE = QString(hbTrId("txt_java_sett_title_note_security_warn"));
- NET_ACCESS = QString(hbTrId("txt_java_sett_setlabel_net_access"));
- LOW_LEVEL_NET_ACCESS = QString(hbTrId("txt_java_sett_setlabel_low_level_net_access"));
- NETWORK_CONNECTION = QString(hbTrId("txt_occ_title_network_connection"));
- SETTINGS_TITLE = QString(hbTrId("txt_java_sett_title_settings"));
- SETTINGS_NOT_AVAILABLE = QString(hbTrId("txt_java_sett_info_settings_not_available"));
-
- // init the suite UID from the application UID
- readSuiteUid(aJavaAppUid);
- if (iSuiteUid.size() <= 0)
- {
- return;
- }
-
- // init access point settings ui
- netConnSettingsUi = new CmApplSettingsUi(this);
- asyncToSyncCallEventLoop = new QEventLoop();
-
- // read all settings
- readAllSettings();
-
- // init form
- mainForm = new HbDataForm();
- mainForm->setHeading(QString::fromStdWString(readFromStorage(PACKAGE_NAME, L"", L"", APPLICATION_PACKAGE_TABLE)));
- model = new HbDataFormModel();
-
- // init settings
- generalSettingsGroup = model->appendDataFormGroup(
- QString(hbTrId("txt_java_sett_subtitle_general")), model->invisibleRootItem());
- initSettings(generalSettings, generalSettingsGroup);
- // append the security settings only if there are any user settings
- if (extraSettings.size() > 0)
- {
- securitySettingsGroup = model->appendDataFormGroup(
- QString(hbTrId("txt_java_sett_subtitle_security")), model->invisibleRootItem());
- initSettings(securitySettings, securitySettingsGroup);
-
- // if security warnings is user defined -> add the extra settings, expand
- if (securitySettings[0].getCurrentValue() == 1)
- {
- securityWarningsChanged(USER_DEFINED);
- }
- }
-
- // link form and model
- mainForm->setModel(model);
- mainForm->setExpanded(model->indexFromItem(generalSettingsGroup), true);
- if (extraSettings.size() > 0)
- {
- mainForm->setExpanded(model->indexFromItem(securitySettingsGroup), (securitySettings[0].getCurrentValue() == 1));
- }
-}
-
-void JavaApplicationSettingsViewPrivate::init(JavaApplicationSettingsView* aPublicView)
-{
- iPublicView = aPublicView;
-
- if (mainForm)
- {
- // do the connect for the main form
- iPublicView->connect(mainForm, SIGNAL(itemShown(const QModelIndex)),
- iPublicView, SLOT(_q_dataItemDisplayed(const QModelIndex)));
-
- // set the form as view's widget
- iPublicView->setWidget(mainForm);
- }
- else
- {
- // no settings available
- HbLabel* label = new HbLabel(SETTINGS_NOT_AVAILABLE, iPublicView);
- label->setAlignment(Qt::AlignVCenter);
- }
-
- // set title
- iPublicView->setTitle(SETTINGS_TITLE);
-}
-
-JavaApplicationSettingsViewPrivate::~JavaApplicationSettingsViewPrivate()
-{
- delete mainForm;
- delete model;
- delete netConnSettingsUi;
- delete asyncToSyncCallEventLoop;
- foreach (QTranslator *translator, translators) {
- qApp->removeTranslator(translator);
- }
- qDeleteAll(translators);
- translators.clear();
-}
-
-void JavaApplicationSettingsViewPrivate::readAllSettings()
-{
- // general settings
- QStringList settingsValues;
- vector<wstring> storageValues;
- if (!findFromStorage(VALUE, NAME, L"Nokia-MIDlet-On-Screen-Keypad", APPLICATION_PACKAGE_ATTRIBUTES_TABLE))
- {
- // if the on screen keypad is predefined, it should not be changable by user
- // -> right now it is not added to settings list. It should be changed so that
- // the setting should not be editable by user
- settingsValues<<QString(hbTrId("txt_java_sett_setlabel_osk_val_no"))<<QString(hbTrId("txt_java_sett_setlabel_osk_val_game"))<<QString(hbTrId("txt_java_sett_setlabel_osk_val_navigation"));
- storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NO);
- storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS);
- storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NAVIGATION);
- generalSettings.append(JavaApplicationSettings(QString(hbTrId("txt_java_sett_setlabel_osk")), settingsValues, ON_SCREEN_KEYPAD, MIDP_PACKAGE_TABLE, storageValues));
- readFromStorage(generalSettings[0]);
- }
- settingsValues = QStringList();
- initNetworkConnection();
- settingsValues<<netConn.name;
- generalSettings.append(JavaApplicationSettings(NETWORK_CONNECTION, settingsValues));
- netSettIndex = generalSettings.size() - 1;
-
- // security settings
- settingsValues = QStringList();
- storageValues.clear();
- settingsValues<<QString(hbTrId("txt_java_sett_setlabel_security_level_val_default"))<<USER_DEFINED;
- storageValues.push_back(SECURITY_WARNINGS_DEFAULT_MODE);
- storageValues.push_back(SECURITY_WARNINGS_USER_DEFINED_MODE);
- securitySettings.append(JavaApplicationSettings(SECURITY_LEVEL, settingsValues, SECURITY_WARNINGS, MIDP_PACKAGE_TABLE, storageValues));
- readFromStorage(securitySettings[0]);
-
- // extra settings
- settingsValues = QStringList();
- storageValues.clear();
- settingsValues<<ONESHOT<<SESSION<<BLANKET<<DENIED;
- storageValues.push_back(ONESHOT_INTERACTION_MODE);
- storageValues.push_back(SESSION_INTERACTION_MODE);
- storageValues.push_back(BLANKET_INTERACTION_MODE);
- storageValues.push_back(DENIED_INTERACTION_MODE);
- // init the known localized settings names
- QHash<QString, QString> localizedSettingsNames;
- localizedSettingsNames[QString::fromStdWString(NET_ACCESS_SETTINGS)] = NET_ACCESS;
- localizedSettingsNames[QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)] = LOW_LEVEL_NET_ACCESS;
- localizedSettingsNames[QString::fromStdWString(MESSAGING_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_messaging"));
- localizedSettingsNames[QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_restricted_messaging"));
- localizedSettingsNames[QString::fromStdWString(CALL_CONTROL_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_call_control"));
- localizedSettingsNames[QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_local_conn"));
- localizedSettingsNames[QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_mm_record"));
- localizedSettingsNames[QString::fromStdWString(WRITE_USER_DATA_ACCESS_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_write_data"));
- localizedSettingsNames[QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_read_data"));
- localizedSettingsNames[QString::fromStdWString(LOCATION_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_location"));
- localizedSettingsNames[QString::fromStdWString(LANDMARK_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_landmarks"));
- localizedSettingsNames[QString::fromStdWString(AUTHENTICATION_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_auth"));
- localizedSettingsNames[QString::fromStdWString(SMART_CARD_COMMUNICATION_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_smartcard"));
- localizedSettingsNames[QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_app_auto_invoc"));
- localizedSettingsNames[QString::fromStdWString(BROADCAST_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_broadcast"));
- localizedSettingsNames[QString::fromStdWString(NFC_WRITE_ACCESS_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_nfc_write_access"));
- localizedSettingsNames[QString::fromStdWString(URL_START_SETTINGS)] = QString(hbTrId("txt_java_sett_setlabel_url_start"));
- vector<IndexedSettingsName> allSecuritySettings = readFromStorage(FUNCTION_GROUP, MIDP_FUNC_GRP_SETTINGS_TABLE, MIDP_PERMISSIONS_TABLE);
- // sort the security settings according to how they should be displayed
- std::sort(allSecuritySettings.begin(), allSecuritySettings.end(), AscendingSort());
- QHash<QString, int> settingsIndexes;
- for(int i=0; i<allSecuritySettings.size(); i++)
- {
- QString rawSettingsName = QString::fromStdWString(allSecuritySettings[i].name);
- QString localizedSettingsName = rawSettingsName;
- if (localizedSettingsNames.contains(rawSettingsName))
- localizedSettingsName = localizedSettingsNames.value(rawSettingsName);
- extraSettings.append(JavaApplicationSettings(
- localizedSettingsName, settingsValues, CURRENT_SETTING,
- MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP,
- allSecuritySettings[i].name, ALLOWED_SETTINGS));
- readFromStorage(extraSettings[i]);
- settingsIndexes[rawSettingsName] = i;
- }
-
- // configure the high risk lists
- QList<JavaApplicationSettings*> highRiskList;
- QStringList highRiskSettingsNames;
- highRiskSettingsNames
- <<QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)
- <<QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS);
- configureList(highRiskList, highRiskSettingsNames, settingsIndexes);
- // net access with multimedia and read user data
- attachList(QString::fromStdWString(NET_ACCESS_SETTINGS),highRiskList, settingsIndexes);
- // low level net access with multimedia and read user data
- attachList(QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS),highRiskList, settingsIndexes);
- // messaging with multimedia and read user data
- attachList(QString::fromStdWString(MESSAGING_SETTINGS),highRiskList, settingsIndexes);
- // restricted messaging with multimedia and read user data
- attachList(QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS),highRiskList, settingsIndexes);
- // call control with multimedia and read user data
- attachList(QString::fromStdWString(CALL_CONTROL_SETTINGS),highRiskList, settingsIndexes);
- // local connectivity with multimedia and read user data
- attachList(QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS),highRiskList, settingsIndexes);
- // multimedia with net access, low level net access, messaging,
- // restricted messaging, call control and local connectivity
- highRiskList.clear();
- highRiskSettingsNames.clear();
- highRiskSettingsNames
- <<QString::fromStdWString(NET_ACCESS_SETTINGS)
- <<QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)
- <<QString::fromStdWString(MESSAGING_SETTINGS)
- <<QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)
- <<QString::fromStdWString(CALL_CONTROL_SETTINGS)
- <<QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)
- <<QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS);
- configureList(highRiskList, highRiskSettingsNames, settingsIndexes);
- attachList(QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS),highRiskList, settingsIndexes);
- // read user data with net access, low level net access, messaging,
- // restricted messaging, call control and local connectivity
- attachList(QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS),highRiskList, settingsIndexes);
-
- // configure the mutually exclusive list
- QList<JavaApplicationSettings*> mutuallyExclusiveList;
- QStringList mutuallyExclusiveSettingsNames;
- mutuallyExclusiveSettingsNames
- <<QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS);
- configureList(mutuallyExclusiveList, mutuallyExclusiveSettingsNames, settingsIndexes);
- //net access with application auto invocation
- attachList(QString::fromStdWString(NET_ACCESS_SETTINGS),mutuallyExclusiveList, settingsIndexes, false /* is high risk list */);
- //low level net access with application auto invocation
- attachList(QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS),mutuallyExclusiveList, settingsIndexes, false /* is high risk list */);
- //application auto invocation with net access and low level net access
- mutuallyExclusiveList.clear();
- mutuallyExclusiveSettingsNames.clear();
- mutuallyExclusiveSettingsNames
- <<QString::fromStdWString(NET_ACCESS_SETTINGS)
- <<QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS);
- configureList(mutuallyExclusiveList, mutuallyExclusiveSettingsNames, settingsIndexes);
- attachList(QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS),mutuallyExclusiveList, settingsIndexes, false /* is high risk list */);
-}
-
-void JavaApplicationSettingsViewPrivate::initSettings(QVector<JavaApplicationSettings>& settings, HbDataFormModelItem * parent)
-{
- for (int i=0; i<settings.size(); i++)
- {
- HbDataFormModelItem * appSettings = NULL;
- int currentValue = 0;
- switch(settings[i].getValues().size())
- {
- case 1:
- appSettings = model->appendDataFormItem(
- HbDataFormModelItem::ToggleValueItem,
- settings[i].getName(), parent);
- appSettings->setContentWidgetData(QString("text"), settings[i].getValues()[0]);
- appSettings->setContentWidgetData(QString("additionalText"), settings[i].getValues()[0]);
- break;
- case 2:
- appSettings = model->appendDataFormItem(
- HbDataFormModelItem::ToggleValueItem,
- settings[i].getName(), parent);
- currentValue = settings[i].getCurrentValue();
- if (currentValue < 0)
- {
- currentValue = 0;
- }
- // make it a toogle button (-> get rid of the "pressed" ui effect)
- appSettings->setContentWidgetData(QString("text"), settings[i].getValues()[currentValue]);
- appSettings->setContentWidgetData(QString("additionalText"),settings[i].getValues()[1 - currentValue]);
- break;
- default:
- appSettings = model->appendDataFormItem(
- HbDataFormModelItem::ComboBoxItem,
- settings[i].getName(), parent);
- appSettings->setContentWidgetData(QString("items"), settings[i].getValues());
- appSettings->setContentWidgetData(QString("currentIndex"),settings[i].getCurrentValue());
- }
- settings[i].setId(appSettings);
- }
-}
-
-void JavaApplicationSettingsViewPrivate::writeSettings(JavaApplicationSettings& settings, const QString &aNewValue)
-{
- QStringList values = settings.getValues();
- int currentValue = settings.getCurrentValue();
- int newValue = settings.getValue(aNewValue);
- if (newValue != -1 && currentValue != newValue)
- {
- // handle blanket settings
- if (aNewValue == BLANKET)
- {
- // check blanket settings
- if (!blanketAllowed(settings))
- {
- // change back to the old value
- HbComboBox * settingsCombo = static_cast<HbComboBox*>(itemToWidget(settings.getId()));
- settingsCombo->setCurrentIndex(currentValue);
- return;
- }
- }
- settings.setCurrentValue(newValue);
- writeToStorage(settings);
- }
-}
-
-bool JavaApplicationSettingsViewPrivate::blanketAllowed(const JavaApplicationSettings &settings)
-{
- // handle the high risk items
- QList<JavaApplicationSettings*> highRiskList = settings.getHighRiskList();
- if (highRiskList.size() > 0)
- {
- // go through the list and see if any of the setings are in blanket
- for (int i=0; i<highRiskList.size(); i++)
- {
- if (highRiskList[i]->getValue(highRiskList[i]->getCurrentValue())
- == BLANKET)
- {
- QString secWarning = SENSITIVE_SETTINGS;
- QString LOCAL_CONNECTIVITY = QString(hbTrId("txt_java_sett_setlabel_local_conn"));
- if (settings.getName() != LOCAL_CONNECTIVITY
- && highRiskList[i]->getName() != LOCAL_CONNECTIVITY)
- {
- secWarning = SENSITIVE_SETTINGS_NET_USAGE;
- }
- if (!securityWarningAccepted(
- secWarning,OK,CANCEL ,SECURITY_WARNING_TITLE))
- {
- return false;
- }
- break;
- }
- }
- }
- // handle the mutually exclusive rules
- QList<JavaApplicationSettings*> mutuallyExclusiveList = settings
- .getMutuallyExclusiveList();
- if (mutuallyExclusiveList.size() > 0)
- {
- // go through the list and see if any of the setings are in blanket
- for (int i=0; i<mutuallyExclusiveList.size(); i++)
- {
- if (mutuallyExclusiveList[i]->getValue(
- mutuallyExclusiveList[i]->getCurrentValue()) == BLANKET)
- {
- bool isBlanketAllowed = securityWarningAccepted(
- MUTUALLY_EXCLUSIVE_SETTINGS, OK, CANCEL, SECURITY_WARNING_TITLE);
- if (isBlanketAllowed)
- {
- // change the current value to the maximum allowed
- bool isBlanket = true;
- do
- {
- if (isBlanket)
- {
- QStringList allowedValues = mutuallyExclusiveList[i]->getValues();
- int selectedValue = mutuallyExclusiveList[i]->getCurrentValue();
- // select the maximum allowed value
- for (int j=0; j<allowedValues.size(); j++)
- {
- if (allowedValues[j] == SESSION)
- {
- selectedValue = j;
- break;
- }
- if (allowedValues[j] == ONESHOT)
- {
- selectedValue = j;
- }
- else if (allowedValues[j] == DENIED
- && allowedValues[selectedValue] == BLANKET)
- {
- selectedValue = j;
- }
- }
- // set the maximum allowed value
- mutuallyExclusiveList[i]->setCurrentValue(selectedValue);
- HbComboBox * settingsCombo = static_cast<HbComboBox*>(itemToWidget(
- mutuallyExclusiveList[i]->getId()));
- settingsCombo->setCurrentIndex(selectedValue);
- writeToStorage(*mutuallyExclusiveList[i]);
- }
- i++;
- // end of list?
- if (i >= mutuallyExclusiveList.size())
- {
- break;
- }
- // move on into the list
- isBlanket = (mutuallyExclusiveList[i]->getValue(
- mutuallyExclusiveList[i]->getCurrentValue()) == BLANKET);
- }
- while (true);
- }
- return isBlanketAllowed;
- }
- }
- }
- return true;
-}
-
-void JavaApplicationSettingsViewPrivate::_q_settingsChanged(bool)
-{
- HbPushButton * sender = static_cast<HbPushButton*>(iPublicView->sender());
- if (sender)
- {
- JavaApplicationSettings* settings = findSettings(sender);
- if (settings->getName() == SECURITY_LEVEL)
- {
- QString newValue = settings->getValue(1 - settings->getCurrentValue());
- securityWarningsChanged(newValue);
- writeSettings(*settings, newValue);
- }
- else if (settings->getName() == NETWORK_CONNECTION)
- {
- handleNetworkSettings();
- }
- }
-}
-void JavaApplicationSettingsViewPrivate::_q_settingsChanged(const QString &newValue)
-{
- HbComboBox * sender = static_cast<HbComboBox*>(iPublicView->sender());
- if (sender)
- {
- JavaApplicationSettings* settings = findSettings(sender);
- if (settings != NULL)
- {
- // any other settings are treated same
- writeSettings(*settings, newValue);
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::securityWarningsChanged(const QString &newValue)
-{
- if (newValue == USER_DEFINED)
- {
- // append the extra settings and values
- for (int i=0; i<extraSettings.size(); i++)
- {
- if (extraSettings[i].getCurrentValue() >= 0 && extraSettings[i].getId() == 0)
- {
- HbDataFormModelItem * appSettings = model->appendDataFormItem(
- HbDataFormModelItem::ComboBoxItem,
- extraSettings[i].getName(), securitySettingsGroup);
- extraSettings[i].setId(appSettings);
- // when settings the items, the settingsChanged signal gets emitted with the first value
- // as being the current value. This signal should be discarded (the first value is just
- // an intermediate value towards the actual current value which gets set shortly).
- // Therefore set the first value as the current value (this way the settingsChanged
- // signal gets discarded) and change the current value back to the real current value
- int currentValue = extraSettings[i].getCurrentValue();
- extraSettings[i].setCurrentValue(0);
- appSettings->setContentWidgetData(QString("items"), extraSettings[i].getValues());
- extraSettings[i].setCurrentValue(currentValue);
- appSettings->setContentWidgetData(QString("currentIndex"),extraSettings[i].getCurrentValue());
- }
- }
- }
- else
- {
- // remove the extra settings
- for (int i=0; i<extraSettings.size(); i++)
- {
- if (extraSettings[i].getId())
- {
- HbComboBox * extraSettingsId = static_cast<HbComboBox*>(itemToWidget(extraSettings[i].getId()));
- if (extraSettingsId)
- {
- iPublicView->disconnect(extraSettingsId, 0, 0, 0);
- model->removeItem(model->indexFromItem(extraSettings[i].getId()));
- extraSettings[i].setId(0);
- extraSettings[i].disconnectFromUi();
- }
- }
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::handleNetworkSettings()
-{
- // init flags to show destinations and connection methods
- QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
- listItems |= CmApplSettingsUi::ShowDestinations;
- listItems |= CmApplSettingsUi::ShowConnectionMethods;
-
- // empty filter -> all bearer types included
- QSet<CmApplSettingsUi::BearerTypeFilter> filter;
- // reset the result
- netConnSelection.result = netConn.type;
- netConnSelection.id = netConn.id;
- // init settings ui with destinations, filter and initial selection
- netConnSettingsUi->setOptions(listItems, filter);
- netConnSettingsUi->setSelection(netConnSelection);
- // Connect the setting ui's signal with own slot where the netConnSelection is stored
- connect(netConnSettingsUi, SIGNAL(finished(uint)), this, SLOT(netConnSelected(uint)));
- // launch the setting ui
- netConnSettingsUi->open();
-}
-
-void JavaApplicationSettingsViewPrivate::_q_dataItemDisplayed(const QModelIndex dataItemIndex)
-{
- HbDataFormModelItem *item = static_cast<HbDataFormModel*>(
- mainForm->model())->itemFromIndex(dataItemIndex);
- int itemType = item->data(HbDataFormModelItem::ItemTypeRole).toInt();
- HbComboBox * comboBox = NULL;
- HbPushButton * pushButton = NULL;
- HbWidget * widget = (qobject_cast<HbDataFormViewItem *>
- (mainForm->itemByIndex(dataItemIndex)))->dataItemContentWidget();
- JavaApplicationSettings* settings = findSettings(widget);
- if (settings == NULL)
- {
- // stop right here
- return;
- }
- switch(HbDataFormModelItem::DataItemType(itemType))
- {
- case HbDataFormModelItem::ComboBoxItem:
- comboBox = static_cast<HbComboBox*>(widget);
- if (settings->isConnectedToUi())
- {
- // need to do a reconnect: disconnect followed by a connect
- iPublicView->disconnect(comboBox,
- SIGNAL(currentIndexChanged(const QString &)),
- iPublicView,
- SLOT(_q_settingsChanged(const QString &)));
- }
- iPublicView->connect(comboBox,
- SIGNAL(currentIndexChanged(const QString &)),
- iPublicView, SLOT(_q_settingsChanged(const QString &)),
- Qt::UniqueConnection);
- break;
- case HbDataFormModelItem::ToggleValueItem:
- pushButton = static_cast< HbPushButton*>(widget);
- if (settings->isConnectedToUi())
- {
- // need to do a reconnect: disconnect followed by a connect
- iPublicView->disconnect(pushButton,
- SIGNAL(clicked(bool)),
- iPublicView,
- SLOT(_q_settingsChanged(bool)));
- }
- iPublicView->connect(pushButton,
- SIGNAL(clicked(bool)),
- iPublicView, SLOT(_q_settingsChanged(bool)),
- Qt::UniqueConnection);
- break;
- }
- settings->connectToUi();
-}
-
-void JavaApplicationSettingsViewPrivate::netConnSelected(uint netConnSelectionStatus)
-{
- if (netConnSelectionStatus == CmApplSettingsUi::ApplSettingsErrorNone)
- {
- netConnSelection = netConnSettingsUi->selection();
- // store the selection
- if (netConnSelection.id != netConn.id
- && netConnSelection.id != defaultConnId)
- {
- TRAPD(err,
- switch(netConnSelection.result)
- {
- case CmApplSettingsUi::SelectionTypeDestination:
- ConnectionManager::setDestinationNetworkIdL(iSuiteUid, netConnSelection.id);
- break;
- case CmApplSettingsUi::SelectionTypeConnectionMethod:
- ConnectionManager::setApnIdL(iSuiteUid, netConnSelection.id);
- break;
- }
- );
- if (err == KErrNone)
- {
- netConn.id = netConnSelection.id;
- netConn.type = netConnSelection.result;
- readNetworkConnectionName();
- generalSettings[netSettIndex].getId()->setContentWidgetData(QString("text"), netConn.name);
- generalSettings[netSettIndex].getId()->setContentWidgetData(QString("additionalText"), netConn.name);
- }
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::securityWarningDismissed(HbAction* action)
-{
- HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
- secWarningAccepted = (action == dlg->actions().at(0));
- asyncToSyncCallEventLoop->exit();
-}
-
-void JavaApplicationSettingsViewPrivate::initNetworkConnection()
-{
- TRAP_IGNORE(
- netConn.id = ConnectionManager::getDestinationNetworkIdL(iSuiteUid);
- if (netConn.id == (uint)KJavaNetworkAccessNotSpecified)
- {
- netConn.id = ConnectionManager::getApnIdL(iSuiteUid);
- }
- );
- QNetworkConfigurationManager manager;
- QNetworkConfiguration defaultCfg = manager.defaultConfiguration();
- defaultConnId = defaultCfg.identifier().toInt();
- QNetworkConfiguration cfg = manager.configurationFromIdentifier(
- QString::number(netConn.id));
- if (!cfg.isValid())
- {
- cfg = defaultCfg;
- }
- netConn.name = QString(hbTrId(cfg.name().toUtf8()));
-}
-
-void JavaApplicationSettingsViewPrivate::readNetworkConnectionName()
-{
- QNetworkConfigurationManager manager;
- QNetworkConfiguration cfg = manager.configurationFromIdentifier(
- QString::number(netConn.id));
- if (!cfg.isValid())
- {
- cfg = manager.defaultConfiguration();
- }
- netConn.name = QString(hbTrId(cfg.name().toUtf8()));
-}
-
-JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbWidget* id)
-{
- JavaApplicationSettings* settings = findSettings(id, generalSettings);
- if (settings == NULL)
- {
- settings = findSettings(id, securitySettings);
- if (settings == NULL)
- {
- settings = findSettings(id, extraSettings);
- }
- }
- return settings;
-}
-
-JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbWidget* id, QVector<JavaApplicationSettings>& allSettings)
-{
- for (int i=0; i<allSettings.size(); i++)
- {
- if (itemToWidget(allSettings[i].getId()) == id)
- {
- return &allSettings[i];
- }
- }
- return NULL;
-}
-
-HbWidget * JavaApplicationSettingsViewPrivate::itemToWidget(const HbDataFormModelItem * item)
-{
- HbDataFormViewItem * viewItem = qobject_cast<HbDataFormViewItem *> (mainForm->itemByIndex(
- model->indexFromItem(item)));
- if (viewItem)
- {
- return static_cast<HbWidget*>(viewItem->dataItemContentWidget());
- }
- return NULL;
-}
-
-bool JavaApplicationSettingsViewPrivate::securityWarningAccepted(const QString& text, const QString& acceptActionLabel, const QString& rejectActionLabel, const QString& headingText)
-{
- HbMessageBox securityWarning(HbMessageBox::MessageTypeQuestion);
- securityWarning.setDismissPolicy(HbDialog::NoDismiss);
- securityWarning.setTimeout(HbDialog::NoTimeout);
- securityWarning.setIconVisible(false);
- securityWarning.setText(text);
- securityWarning.addAction(new HbAction(
- acceptActionLabel, &securityWarning));
- securityWarning.addAction(new HbAction(
- rejectActionLabel, &securityWarning));
- securityWarning.setHeadingWidget(new HbLabel(headingText));
- securityWarning.open(this, SLOT(securityWarningDismissed(HbAction*)));
- asyncToSyncCallEventLoop->exec();
- return secWarningAccepted;
-}
-
-void JavaApplicationSettingsViewPrivate::configureList(QList<JavaApplicationSettings*>& list, const QStringList& settingsNames, const QHash<QString, int>& settingsIndexes)
-{
- for(int i=0; i<settingsNames.size(); i++)
- {
- if (settingsIndexes.contains(settingsNames[i]))
- {
- list << &(extraSettings[settingsIndexes.value(settingsNames[i])]);
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::attachList(const QString& settingsName, const QList<JavaApplicationSettings*>& list, const QHash<QString, int>& settingsIndexes, bool isHighRiskList)
-{
- if (settingsIndexes.contains(settingsName))
- {
- if (isHighRiskList)
- {
- extraSettings[settingsIndexes.value(settingsName)].setHighRiskList(list);
- }
- else
- {
- extraSettings[settingsIndexes.value(settingsName)].setMutuallyExclusiveList(list);
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::installTranslator(const QString& translationFileName)
-{
- QTranslator* translator = new QTranslator;
-
- // load the correct translation of the localized strings for the java settings
- // Current solution reads it from Z only (this does not work with IAD)
- // -> check if translator can handle path without drive letter (e.g. the resource
- // is loaded from the same drive where the DLL is loaded)
- if (translator->load("z:/resource/qt/translations/"
- + translationFileName + "_" + QLocale::system().name()))
- {
- translators.append(translator);
- qApp->installTranslator(translator);
- }
- else
- {
- delete translator;
- translator = NULL;
- }
-}
-
-void JavaApplicationSettingsViewPrivate::readFromStorage(JavaApplicationSettings& settings)
-{
- if (settings.getColumnName().size() > 0
- && settings.getTableName().size() > 0)
- {
- wstring value = L"";
-
- JavaStorageApplicationEntry_t query;
- JavaStorageApplicationList_t queryResult;
- JavaStorageEntry attr;
- attr.setEntry(ID, iSuiteUid);
- query.insert(attr);
- if (settings.getFilterColumnName().size() > 0)
- {
- attr.setEntry(settings.getFilterColumnName(), settings.getFilterColumnValue());
- query.insert(attr);
- }
- attr.setEntry(settings.getColumnName(), L"");
- query.insert(attr);
- if (settings.getValuesColumnName().size() > 0)
- {
- attr.setEntry(settings.getValuesColumnName(), L"");
- query.insert(attr);
- }
-
- try
- {
- iStorage->search(settings.getTableName(), query, queryResult);
- }
- catch (JavaStorageException& aJse)
- {
- // Don't leave. Set defaults.
- }
-
- if (settings.getValuesColumnName().size() > 0)
- {
- findEntry(queryResult, settings.getValuesColumnName(), value);
- if (value.size() > 0)
- {
- settings.setStorageValuesFilter(value);
- filterSecuritySettings(settings);
- }
- }
-
- value = L"";
- findEntry(queryResult, settings.getColumnName(), value);
-
- if (value.size() > 0)
- {
- vector<wstring> storageValues = settings.getStorageValues();
- for (int i=0; i<storageValues.size(); i++)
- {
- if (storageValues[i] == value)
- {
- settings.setCurrentValue(i);
- break;
- }
- }
- }
- }
-}
-
-void JavaApplicationSettingsViewPrivate::filterSecuritySettings(JavaApplicationSettings& settings)
-{
- std::wstring allowedModes = settings.getStorageValuesFilter();
- if (allowedModes.size() <= 0)
- {
- return;
- }
- // The allowed modes info is stored as a 4-bit constant:
- // X(oneshot)X(session)X(blanket)X(no)
- // e.g. 1011 (=11) means that oneshot, blanket and no are allowed.
- // The following constants are used to encode/decode the allowed modes
- // into/from a 4-bit number
- int INTERACTION_MODE_DENIED = 1;
- int INTERACTION_MODE_BLANKET = 2;
- int INTERACTION_MODE_SESSION = 4;
- int INTERACTION_MODE_ONESHOT = 8;
- TInt allowedInteractionModes = JavaCommonUtils::wstringToInt(allowedModes);
- int index = 0;
- int tmp = allowedInteractionModes & INTERACTION_MODE_ONESHOT;
- if (tmp <= 0)
- {
- settings.removeValue(index);
- index--;
- }
- index++;
- tmp = allowedInteractionModes & INTERACTION_MODE_SESSION;
- if (tmp <= 0)
- {
- settings.removeValue(index);
- index--;
- }
- index++;
- tmp = allowedInteractionModes & INTERACTION_MODE_BLANKET;
- if (tmp <= 0)
- {
- settings.removeValue(index);
- index--;
- }
- index++;
- tmp = allowedInteractionModes & INTERACTION_MODE_DENIED;
- if (tmp <= 0)
- {
- settings.removeValue(index);
- }
-}
-
-void JavaApplicationSettingsViewPrivate::writeToStorage(JavaApplicationSettings& settings)
-{
- if (settings.getTableName().size() <= 0
- || settings.getColumnName().size() <= 0)
- {
- // storage details are not provided -> no point in going further
- return;
- }
- JavaStorageApplicationEntry_t oldEntry;
- JavaStorageEntry attr;
- attr.setEntry(ID, iSuiteUid);
- oldEntry.insert(attr);
- JavaStorageApplicationEntry_t entry;
- if (settings.getFilterColumnName().size() > 0)
- {
- attr.setEntry(settings.getFilterColumnName(), settings.getFilterColumnValue());
- oldEntry.insert(attr);
- }
- attr.setEntry(settings.getColumnName(), settings.getStorageValues()[settings.getCurrentValue()]);
- entry.insert(attr);
-
- try
- {
- iStorage->update(settings.getTableName(), entry, oldEntry);
- }
- catch (JavaStorageException& aJse)
- {
- }
-}
-
-void JavaApplicationSettingsViewPrivate::findEntry(const JavaStorageApplicationList_t& queryResult,
- const std::wstring& eName,
- std::wstring& eValue)
-{
- if (queryResult.size() > 0)
- {
- JavaStorageApplicationEntry_t entry = queryResult.front();
- JavaStorageEntry findPattern;
- findPattern.setEntry(eName, L"");
- JavaStorageApplicationEntry_t::const_iterator findIterator =
- entry.find(findPattern);
- if (findIterator != entry.end())
- {
- eValue = findIterator->entryValue();
- }
- }
-}
-
-bool JavaApplicationSettingsViewPrivate::findFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
-{
- wstring value = readFromStorage(aColumnName, aColumnFilterName, aColumnFilterValue, aTableName);
-
- return (value.size() > 0);
-}
-
-wstring JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
-{
- wstring value = L"";
-
- JavaStorageApplicationEntry_t query;
- JavaStorageApplicationList_t queryResult;
- JavaStorageEntry attr;
- attr.setEntry(ID, iSuiteUid);
- query.insert(attr);
- if (aColumnFilterName.size() > 0)
- {
- attr.setEntry(aColumnFilterName, aColumnFilterValue);
- query.insert(attr);
- }
- attr.setEntry(aColumnName, L"");
- query.insert(attr);
-
- try
- {
- iStorage->search(aTableName, query, queryResult);
- }
- catch (JavaStorageException& aJse)
- {
- // Don't leave. Set defaults.
- }
-
- findEntry(queryResult, aColumnName, value);
-
- return value;
-}
-
-vector<IndexedSettingsName> JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::string& aPrimaryTableName, const std::string& aSecondaryTableName)
-{
- vector<IndexedSettingsName> values;
-
- // hash for associating settings names with display indexes:
- // a settings with lower index is shown before a settings
- // with a higher index
- QHash<QString, int> settingsNamesIndexes;
- settingsNamesIndexes[QString::fromStdWString(NET_ACCESS_SETTINGS)] = 0;
- settingsNamesIndexes[QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)] = 1;
- settingsNamesIndexes[QString::fromStdWString(MESSAGING_SETTINGS)] = 2;
- settingsNamesIndexes[QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)] = 3;
- settingsNamesIndexes[QString::fromStdWString(CALL_CONTROL_SETTINGS)] = 4;
- settingsNamesIndexes[QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)] = 5;
- settingsNamesIndexes[QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)] = 6;
- settingsNamesIndexes[QString::fromStdWString(WRITE_USER_DATA_ACCESS_SETTINGS)] = 7;
- settingsNamesIndexes[QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS)] = 8;
- settingsNamesIndexes[QString::fromStdWString(LOCATION_SETTINGS)] = 9;
- settingsNamesIndexes[QString::fromStdWString(LANDMARK_SETTINGS)] = 10;
- settingsNamesIndexes[QString::fromStdWString(AUTHENTICATION_SETTINGS)] = 11;
- settingsNamesIndexes[QString::fromStdWString(SMART_CARD_COMMUNICATION_SETTINGS)] = 12;
- settingsNamesIndexes[QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS)] = 13;
- settingsNamesIndexes[QString::fromStdWString(BROADCAST_SETTINGS)] = 14;
- settingsNamesIndexes[QString::fromStdWString(NFC_WRITE_ACCESS_SETTINGS)] = 15;
- settingsNamesIndexes[QString::fromStdWString(URL_START_SETTINGS)] = 16;
- int last_index = 16;
-
- JavaStorageApplicationEntry_t query;
- JavaStorageApplicationList_t queryResult;
- JavaStorageEntry attr;
- attr.setEntry(ID, iSuiteUid);
- query.insert(attr);
- attr.setEntry(aColumnName, L"");
- query.insert(attr);
-
- try
- {
- iStorage->search(aPrimaryTableName, query, queryResult);
-
- JavaStorageApplicationList_t::const_iterator iterator;
- JavaStorageApplicationList_t secondaryQueryResult;
- for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++)
- {
- std::wstring name = L"";
- JavaStorageApplicationEntry_t entry = (*iterator);
- JavaStorageEntry findPattern;
- findPattern.setEntry(aColumnName, L"");
- JavaStorageApplicationEntry_t::const_iterator findIterator =
- entry.find(findPattern);
- if (findIterator != entry.end())
- {
- name = findIterator->entryValue();
- }
- if (name.size() > 0)
- {
- entry.clear();
- query.clear();
- attr.setEntry(ID, iSuiteUid);
- query.insert(attr);
- attr.setEntry(aColumnName, name);
- query.insert(attr);
- secondaryQueryResult.clear();
- iStorage->search(aSecondaryTableName, query, secondaryQueryResult);
- if (secondaryQueryResult.size() > 0)
- {
- IndexedSettingsName value;
- value.name = name;
- value.index = last_index + 1;
- if (settingsNamesIndexes.contains(QString::fromStdWString(name)))
- {
- value.index = settingsNamesIndexes.value(QString::fromStdWString(name));
- }
- values.push_back(value);
- }
- }
- }
- }
- catch (JavaStorageException& aJse)
- {
- // Don't leave. Set defaults.
- }
-
- return values;
-}
-
-void JavaApplicationSettingsViewPrivate::readSuiteUid(const QString& aAppUid)
-{
- iSuiteUid = L"";
- bool ok;
- int tmp = aAppUid.toInt( &ok, 10 );
- if (!ok)
- {
- return;
- }
- wstring appUid = L"";
- appUid.append(L"[").append(QString("%1").arg(tmp, 0, 16).toStdWString()).append(L"]");
-
- JavaStorageApplicationEntry_t query;
- JavaStorageApplicationList_t queryResult;
- JavaStorageEntry attr;
- attr.setEntry(ID, appUid);
- query.insert(attr);
- attr.setEntry(PACKAGE_ID, L"");
- query.insert(attr);
- try
- {
- iStorage->search(APPLICATION_TABLE, query, queryResult);
- }
- catch (JavaStorageException& aJse)
- {
- // Don't leave. Set defaults.
- }
- findEntry(queryResult, PACKAGE_ID, iSuiteUid);
-}
-
-
-#ifdef WIN32
-#include "./moc/moc_javaapplicationsettingsview.cpp"
-#else
-#include "moc_javaapplicationsettingsview.cpp"
-#endif
--- a/javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-#ifndef JAVAAPPLICATIONSETTINGSVIEW_P_H
-#define JAVAAPPLICATIONSETTINGSVIEW_P_H
-
-#include <QVector>
-#include <QList>
-#include <QTranslator>
-#include <QModelIndex>
-#include <QEventLoop>
-#include <memory>
-#include <cmapplsettingsui.h>
-#include "javaapplicationsettings.h"
-#include "javastorage.h"
-
-class HbWidget;
-class HbPushButton;
-class HbDataForm;
-class HbDataFormModel;
-class HbDataFormModelItem;
-class JavaApplicationSettingsView;
-class HbAction;
-
-struct IndexedSettingsName
-{
- std::wstring name;
- int index;
-};
-
-struct AscendingSort
-{
- bool operator()(const IndexedSettingsName& i1, const IndexedSettingsName& i2)
- {
- return i1.index < i2.index;
- }
-};
-
-class JavaApplicationSettingsViewPrivate: public QObject
-{
- Q_OBJECT
-
-public:
- JavaApplicationSettingsViewPrivate(const QString& aApplication);
- virtual ~JavaApplicationSettingsViewPrivate();
- void init(JavaApplicationSettingsView*);
-
- // slots
- void _q_settingsChanged(const QString &newValue);
- void _q_settingsChanged(bool);
- void _q_dataItemDisplayed(const QModelIndex);
-
-private slots:
- void netConnSelected(uint netConnSelectionStatus);
- void securityWarningDismissed(HbAction*);
-
-private:
- void readAllSettings();
- void initSettings(QVector<JavaApplicationSettings>& settings, HbDataFormModelItem * parent);
- void writeSettings(JavaApplicationSettings& settings, const QString &newValue);
- void securityWarningsChanged(const QString &);
- bool blanketAllowed(const JavaApplicationSettings &settings);
- HbWidget * itemToWidget(const HbDataFormModelItem *);
- JavaApplicationSettings* findSettings(HbWidget* id);
- JavaApplicationSettings* findSettings(HbWidget* id, QVector<JavaApplicationSettings>& settings);
- void readFromStorage(JavaApplicationSettings& settings);
- void writeToStorage(JavaApplicationSettings& settings);
- bool findFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&);
- std::wstring readFromStorage(const std::wstring&, const std::wstring&, const std::wstring&, const std::string&);
- std::vector<IndexedSettingsName> readFromStorage(const std::wstring& aColumnName, const std::string& aTableName);
- void filterSecuritySettings(JavaApplicationSettings& settings);
- void findEntry(const java::storage::JavaStorageApplicationList_t&, const std::wstring&, std::wstring& eValue);
- void readSuiteUid(const QString& aAppUid);
- bool securityWarningAccepted(const QString& text, const QString& acceptActionLabel, const QString& rejectActionLabel, const QString& headingText);
- void handleNetworkSettings();
- void readNetworkConnectionName();
- void initNetworkConnection();
- void configureList(QList<JavaApplicationSettings*>&, const QStringList&, const QHash<QString, int>&);
- void attachList(const QString& settingsName, const QList<JavaApplicationSettings*>&, const QHash<QString, int>&, bool isHighRiskList = true);
- void installTranslator(const QString& translationFileName);
-
-private:
- HbDataForm * mainForm;
- HbDataFormModel *model;
- HbDataFormModelItem * generalSettingsGroup;
- HbDataFormModelItem * securitySettingsGroup;
- QVector<JavaApplicationSettings> generalSettings;
- QVector<JavaApplicationSettings> securitySettings;
- QVector<JavaApplicationSettings> extraSettings;
- JavaApplicationSettingsView* iPublicView;
- std::auto_ptr<java::storage::JavaStorage> iStorage;
- std::wstring iSuiteUid;
- QString BLANKET,SESSION,ONESHOT,DENIED,SECURITY_LEVEL,USER_DEFINED,SENSITIVE_SETTINGS,SENSITIVE_SETTINGS_NET_USAGE,MUTUALLY_EXCLUSIVE_SETTINGS,OK,CANCEL,SECURITY_WARNING_TITLE,NET_ACCESS,LOW_LEVEL_NET_ACCESS,NETWORK_CONNECTION,NETWORK_CONNECTION_CHANGE,SETTINGS_TITLE,SETTINGS_NOT_AVAILABLE;
- CmApplSettingsUi* netConnSettingsUi;
- CmApplSettingsUi::SettingSelection netConnSelection;
- JavaApplicationSettings::NetworkConnection netConn;
- int netSettIndex;
- QEventLoop* asyncToSyncCallEventLoop;
- bool secWarningAccepted;
- int defaultConnId;
- QList<QTranslator *> translators;
-};
-
-
-#endif // JAVAAPPLICATIONSETTINGSVIEW_P_H
--- a/javamanager/javasettings/javasettings.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javasettings/javasettings.pro Fri Jul 09 16:35:45 2010 +0300
@@ -14,5 +14,4 @@
# Description: Generated file - do not edit manually
#
TEMPLATE = subdirs
-SUBDIRS += appsettingsview_qt/build/javaapplicationsettingsview.pro
BLD_INF_RULES.prj_extensions += "prj_extensions"
--- a/javamanager/javasettings/subsystem.mk Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/javasettings/subsystem.mk Fri Jul 09 16:35:45 2010 +0300
@@ -17,10 +17,7 @@
include $(JAVA_SRC_ROOT)/build/Makefile.defs
-ifdef RD_JAVA_APPLICATION_SETTINGS_QT
-COMPONENTS += appsettingsview_qt/build
-SYMBIAN_ONLY += appsettingsview_qt/build
-else
+ifndef RD_JAVA_APPLICATION_SETTINGS_QT
ifndef RD_JAVA_S60_RELEASE_5_0_IAD
NONQTSUBSYSTEMS += appmngrplugin/build
SYMBIAN_ONLY += appmngrplugin/build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/build/javaapplicationsettingsview.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+TEMPLATE = lib
+TARGET = javaapplicationsettingsview
+CONFIG += qt hb stl plugin mobility
+MOBILITY += bearer
+LIBS += -ljavastorage -lcmapplsettingsui -ljavaconnectionmanager -ljavautils
+TRANSLATIONS = javaruntimeapplicationsettings.ts
+
+INCLUDEPATH += ../../../inc
+SOURCES += ..\src\javaapplicationsettingsview.cpp ..\src\javaapplicationsettingsview_p.cpp ..\src\javaapplicationsettings.cpp
+HEADERS += ..\src\javaapplicationsettingsview.h ..\src\javaapplicationsettingsview_p.h ..\src\javaapplicationsettings.h
+
+symbian : plugin {
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.CAPABILITY = ALL -TCB
+ PLUGIN_STUB_PATH = /resource/qt/plugins/appsettings
+ pluginstub.sources = $${TARGET}.dll
+ pluginstub.path = $$PLUGIN_STUB_PATH
+ DEPLOYMENT += pluginstub
+ qtplugins.path = $$PLUGIN_STUB_PATH
+ qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
+ for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin z:$$qtplugins.path/$$basename(qtplugin)"
+
+ include(../../../build/symbian_uids.pri)
+
+}
+
+# Workaround for RVCT 4.0 QT/Symbian incmpatibility
+MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/applicationsettingsview.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef APPLICATIONSETTINGSVIEW_H
+#define APPLICATIONSETTINGSVIEW_H
+
+#include <hbview.h>
+#include <QtPlugin>
+
+class ApplicationSettingsView: public HbView
+{
+public:
+
+ /*
+ * Base constructor
+ */
+ explicit ApplicationSettingsView() : HbView() {}
+
+ /*
+ * Destructor
+ */
+ virtual ~ApplicationSettingsView() {}
+
+public slots:
+ /*
+ * Initializas the view with application specific info
+ *
+ * @param aAppUid Identifier for the application
+ *
+ */
+ void initialize(const QString& aAppUid);
+
+};
+
+Q_DECLARE_INTERFACE(ApplicationSettingsView,
+ "com.nokia.ApplicationLibrary.ApplicationSettingsView/1.0");
+
+#endif // APPLICATIONSETTINGSVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettings.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,214 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "javaapplicationsettings.h"
+
+using namespace java::settings;
+
+JavaApplicationSettings::JavaApplicationSettings():
+ mName(),
+ mValues(),
+ mId(0),
+ mCurrentValue(0),
+ mColumnName(),
+ mTableName(),
+ mStorageValuesFilter(),
+ mValuesColumnName(),
+ mFilterColumnName(),
+ mFilterColumnValue(),
+ mConnectedToUi(false)
+{
+}
+
+JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues):
+ mName(aName),
+ mValues(aValues),
+ mId(0),
+ mCurrentValue(0),
+ mColumnName(),
+ mTableName(),
+ mStorageValuesFilter(),
+ mValuesColumnName(),
+ mFilterColumnName(),
+ mFilterColumnValue(),
+ mConnectedToUi(false)
+{
+}
+
+JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues):
+ mName(aName),
+ mValues(aValues),
+ mId(0),
+ mCurrentValue(0),
+ mColumnName(aColumnName),
+ mTableName(aTableName),
+ mStorageValues(aStorageValues),
+ mStorageValuesFilter(),
+ mValuesColumnName(),
+ mFilterColumnName(),
+ mFilterColumnValue(),
+ mConnectedToUi(false)
+{
+}
+
+JavaApplicationSettings::JavaApplicationSettings(const QString& aName, const QStringList& aValues, const std::wstring& aColumnName, const std::string& aTableName, const std::vector<std::wstring>& aStorageValues, const std::wstring& aFilterColumnName, const std::wstring& aFilterColumnValue, const std::wstring& aValuesColumnName):
+ mName(aName),
+ mValues(aValues),
+ mId(0),
+ mCurrentValue(0),
+ mColumnName(aColumnName),
+ mTableName(aTableName),
+ mStorageValues(aStorageValues),
+ mStorageValuesFilter(),
+ mValuesColumnName(aValuesColumnName),
+ mFilterColumnName(aFilterColumnName),
+ mFilterColumnValue(aFilterColumnValue),
+ mConnectedToUi(false)
+{
+}
+
+void JavaApplicationSettings::setCurrentValue(int aCurrentValue)
+{
+ mCurrentValue = aCurrentValue;
+}
+
+void JavaApplicationSettings::connectToUi()
+{
+ mConnectedToUi = true;
+}
+
+void JavaApplicationSettings::disconnectFromUi()
+{
+ mConnectedToUi = false;
+}
+
+bool JavaApplicationSettings::isConnectedToUi()
+{
+ return mConnectedToUi;
+}
+
+int JavaApplicationSettings::getCurrentValue()
+{
+ return mCurrentValue;
+}
+
+const QString JavaApplicationSettings::getValue(int aValueIndex)
+{
+ if (aValueIndex >= 0 && aValueIndex < mValues.size())
+ return mValues[aValueIndex];
+ return QString::null;
+}
+
+void JavaApplicationSettings::removeValue(int aValueIndex)
+{
+ if (aValueIndex >= 0 && aValueIndex < mStorageValues.size())
+ mStorageValues.erase(mStorageValues.begin() + aValueIndex);
+ if (aValueIndex >= 0 && aValueIndex < mValues.size())
+ mValues.erase(mValues.begin() + aValueIndex);
+}
+
+int JavaApplicationSettings::getValueIndex(const QString& aValue)
+{
+ int value = -1;
+ for (int i = 0; i < mValues.size(); i++)
+ {
+ if (mValues[i] == aValue)
+ {
+ return i;
+ }
+ }
+ return value;
+}
+
+void JavaApplicationSettings::setId(HbDataFormModelItem * aId)
+{
+ mId = aId;
+}
+
+HbDataFormModelItem * JavaApplicationSettings::getId()
+{
+ return mId;
+}
+
+const QString& JavaApplicationSettings::getName() const
+{
+ return mName;
+}
+
+const QStringList& JavaApplicationSettings::getValues() const
+{
+ return mValues;
+}
+
+const QList<JavaApplicationSettings*>& JavaApplicationSettings::getHighRiskList() const
+{
+ return mHighRiskList;
+}
+
+void JavaApplicationSettings::setHighRiskList(const QList<JavaApplicationSettings*>& aHighRiskList)
+{
+ mHighRiskList = aHighRiskList;
+}
+
+const QList<JavaApplicationSettings*>& JavaApplicationSettings::getMutuallyExclusiveList() const
+{
+ return mMutuallyExclusiveList;
+}
+
+void JavaApplicationSettings::setMutuallyExclusiveList(const QList<JavaApplicationSettings*>& aMutuallyExclusiveList)
+{
+ mMutuallyExclusiveList = aMutuallyExclusiveList;
+}
+
+const std::wstring& JavaApplicationSettings::getColumnName()
+{
+ return mColumnName;
+}
+
+const std::wstring& JavaApplicationSettings::getValuesColumnName()
+{
+ return mValuesColumnName;
+}
+
+const std::string& JavaApplicationSettings::getTableName()
+{
+ return mTableName;
+}
+
+const std::vector<std::wstring>& JavaApplicationSettings::getStorageValues()
+{
+ return mStorageValues;
+}
+
+void JavaApplicationSettings::setStorageValuesFilter(const std::wstring& aStorageValuesFilter)
+{
+ mStorageValuesFilter = aStorageValuesFilter;
+}
+
+const std::wstring& JavaApplicationSettings::getStorageValuesFilter()
+{
+ return mStorageValuesFilter;
+}
+
+const std::wstring& JavaApplicationSettings::getFilterColumnName()
+{
+ return mFilterColumnName;
+}
+
+const std::wstring& JavaApplicationSettings::getFilterColumnValue()
+{
+ return mFilterColumnValue;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettings.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef JAVAAPPLICATIONSETTINGS_H
+#define JAVAAPPLICATIONSETTINGS_H
+
+#include <string>
+#include <vector>
+#include <QString>
+#include <QStringList>
+#include <hbdataformmodelitem.h>
+#include <cmapplsettingsui.h>
+
+namespace java
+{
+namespace settings
+{
+
+/**
+ * Encapsulation of java settings:
+ * - name (as localized string displayed to user)
+ * - values (as a list of localized strings displayed to user)
+ * - current value (one of the values)
+ * - storage details (name of table, name of column, storage values)
+ * MIDP spec sets requirements for some combinations of settings:
+ * - some combinations of settings values are considered as sensitive,
+ * since they can cause privacy exposure or network costs. Whenever
+ * such a combination is about to be set, the user needs to be
+ * notified about possible consequences
+ * - such combinations of settings values are forbidden (mutually exclusive)
+ * Each setting is initialized with a list of sensitive settings counterparts
+ * and mutually exclusive counterparts respectively
+ */
+class JavaApplicationSettings
+{
+public:
+
+ struct NetworkConnection
+ {
+ QString name;
+ uint id;
+ CmApplSettingsUi::SelectionType type;
+ };
+
+ JavaApplicationSettings(const QString& aName,
+ const QStringList& aValues);
+ JavaApplicationSettings(const QString& aName,
+ const QStringList& aValues,
+ const std::wstring& aColumnName,
+ const std::string& aTableName,
+ const std::vector<std::wstring>& aStorageValues);
+ JavaApplicationSettings(const QString& aName,
+ const QStringList& aValues,
+ const std::wstring& aColumnName,
+ const std::string& aTableName,
+ const std::vector<std::wstring>& aStorageValues,
+ const std::wstring& aFilterColumnName,
+ const std::wstring& aFilterColumnValue,
+ const std::wstring& aValuesColumnName);
+ JavaApplicationSettings();
+
+ const QString& getName() const;
+ const QStringList& getValues() const;
+ void setCurrentValue(int aCurrentValue);
+ int getCurrentValue();
+ const QString getValue(int aValueIndex);
+ int getValueIndex(const QString& aValue);
+ void removeValue(int aValueIndex);
+ void setId(HbDataFormModelItem * aId);
+ HbDataFormModelItem * getId();
+ const QList<JavaApplicationSettings*>& getHighRiskList() const;
+ void setHighRiskList(const QList<JavaApplicationSettings*>& aHighRiskList);
+ const QList<JavaApplicationSettings*>& getMutuallyExclusiveList() const;
+ void setMutuallyExclusiveList(const QList<JavaApplicationSettings*>& aMutuallyExclusiveList);
+ const std::wstring& getColumnName();
+ const std::string& getTableName();
+ const std::wstring& getValuesColumnName();
+ const std::wstring& getFilterColumnName();
+ const std::wstring& getFilterColumnValue();
+ const std::vector<std::wstring>& getStorageValues();
+ void setStorageValuesFilter(const std::wstring& aStorageValuesFilter);
+ const std::wstring& getStorageValuesFilter();
+ void connectToUi();
+ void disconnectFromUi();
+ bool isConnectedToUi();
+
+private:
+ QString mName;
+ QStringList mValues;
+ HbDataFormModelItem * mId;
+ QList<JavaApplicationSettings*> mHighRiskList;
+ QList<JavaApplicationSettings*> mMutuallyExclusiveList;
+ int mCurrentValue;
+ std::wstring mColumnName;
+ std::string mTableName;
+ std::vector<std::wstring> mStorageValues;
+ std::wstring mStorageValuesFilter;
+ std::wstring mValuesColumnName;
+ std::wstring mFilterColumnName;
+ std::wstring mFilterColumnValue;
+ bool mConnectedToUi;
+};
+
+} // namespace settings
+} // namespace java
+
+#endif // JAVAAPPLICATIONSETTINGS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettingsview.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "javaapplicationsettingsview.h"
+#include "javaapplicationsettingsview_p.h"
+
+using namespace java::settings;
+
+JavaApplicationSettingsView::JavaApplicationSettingsView() :
+ ApplicationSettingsView()
+{
+}
+
+void JavaApplicationSettingsView::initialize(const QString& aApplication)
+{
+ d_ptr = new JavaApplicationSettingsViewPrivate(aApplication);
+ d_ptr->init(this);
+}
+
+JavaApplicationSettingsView::~JavaApplicationSettingsView()
+{
+ delete d_ptr;
+}
+
+Q_EXPORT_PLUGIN2(javaapplicationsettingsview, JavaApplicationSettingsView);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettingsview.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef JAVAAPPLICATIONSETTINGSVIEW_H
+#define JAVAAPPLICATIONSETTINGSVIEW_H
+
+#include "applicationsettingsview.h"
+
+namespace java
+{
+namespace settings
+{
+
+/**
+ * Realization of the p-impl pattern: settings view consists of a public part (
+ * implementing the ApplicationSettingsView interface) and the private part
+ * (containing the private details). The public part simply maintains a pointer
+ * to the private part thus enabling further changes into the private part without
+ * any risk of breaking the public part
+ */
+class JavaApplicationSettingsViewPrivate;
+
+class JavaApplicationSettingsView: public ApplicationSettingsView
+{
+ Q_OBJECT
+ Q_INTERFACES(ApplicationSettingsView)
+
+public:
+ explicit JavaApplicationSettingsView();
+ virtual ~JavaApplicationSettingsView();
+
+public slots:
+ void initialize(const QString&);
+
+signals:
+ void aboutToClose();
+
+private:
+ Q_DISABLE_COPY(JavaApplicationSettingsView)
+ Q_DECLARE_PRIVATE_D(d_ptr, JavaApplicationSettingsView)
+ Q_PRIVATE_SLOT(d_func(), void _q_settingsChanged(const QString & aNewValue))
+ Q_PRIVATE_SLOT(d_func(), void _q_settingsChanged(bool aNewValue))
+ Q_PRIVATE_SLOT(d_func(), void _q_dataItemDisplayed(const QModelIndex aDataItemIndex))
+
+private:
+ // the pointer to the private counterpart
+ JavaApplicationSettingsViewPrivate * d_ptr;
+};
+
+} // namespace settings
+} // namespace java
+
+
+#endif // JAVAAPPLICATIONSETTINGSVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettingsview_p.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,1158 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <hbmessagebox.h>
+#include <hbdataformviewitem.h>
+#include <hbcombobox.h>
+#include <hbpushbutton.h>
+#include <hbdataform.h>
+#include <hbdataformmodel.h>
+#include <hbdataformmodelitem.h>
+#include <hblabel.h>
+#include <hbaction.h>
+#include <QApplication>
+#include <QTranslator>
+#include <QLibraryInfo>
+#include <qnetworkconfigmanager.h>
+#include <qnetworkconfiguration.h>
+#include <algorithm>
+
+#include "javaapplicationsettings.h"
+#include "javaapplicationsettingsview.h"
+#include "javaapplicationsettingsview_p.h"
+#include "connectionmanager.h"
+#include "javacommonutils.h"
+
+#include "securitystoragedatadefs.h"
+#include "javastoragenames.h"
+
+#include "logger.h"
+
+QTM_USE_NAMESPACE
+
+using namespace java::settings;
+using namespace java::storage;
+using namespace java::util;
+using namespace std;
+
+const wchar_t ON_SCREEN_KEYPAD_VALUE_NO[] = L"0";
+const wchar_t ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS[] = L"1";
+const wchar_t ON_SCREEN_KEYPAD_VALUE_NAVIGATION[] = L"2";
+
+JavaApplicationSettingsViewPrivate::JavaApplicationSettingsViewPrivate(const QString& aJavaAppUid):
+ mMainForm(0), mModel(0), mGeneralSettingsGroup(0), mSecuritySettingsGroup(0), mNetConnSettingsUi(0), mAsyncToSyncCallEventLoop(0), mSecWarningAccepted(false), mDefaultConnId(0)
+{
+ // init common values
+ init();
+
+ // init the suite UID from the application UID
+ readSuiteUid(aJavaAppUid);
+ if (mSuiteUid.size() <= 0)
+ {
+ ELOG1(EJavaSettings, "No suite found with uid %S", aJavaAppUid.toStdWString().c_str());
+ return;
+ }
+ ELOG1(EJavaSettings, "Initializing settings for suite %S", mSuiteUid.c_str());
+
+ // init access point settings ui
+ mNetConnSettingsUi = new CmApplSettingsUi(this);
+ mAsyncToSyncCallEventLoop = new QEventLoop();
+
+ // read all settings
+ readAllSettings();
+
+ // init form
+ mMainForm = new HbDataForm();
+ mMainForm->setHeading(QString::fromStdWString(readFromStorage(PACKAGE_NAME, L"", L"", APPLICATION_PACKAGE_TABLE)));
+ mModel = new HbDataFormModel();
+
+ // init settings
+ mGeneralSettingsGroup = mModel->appendDataFormGroup(
+ QString(hbTrId(ID_GENERAL_GROUP_TITLE)), mModel->invisibleRootItem());
+ initSettings(mGeneralSettings, mGeneralSettingsGroup);
+ // append the security settings only if there are any user settings
+ if (mExtraSettings.size() > 0)
+ {
+ mSecuritySettingsGroup = mModel->appendDataFormGroup(
+ QString(hbTrId(ID_SECURITY_GROUP_TITLE)), mModel->invisibleRootItem());
+ initSettings(mSecuritySettings, mSecuritySettingsGroup);
+
+ // if security warnings is user defined -> add the extra settings, expand
+ if (mSecuritySettings[0].getCurrentValue() == 1)
+ {
+ securityWarningsChanged(TXT_USER_DEFINED);
+ }
+ }
+
+ // link form and model
+ mMainForm->setModel(mModel);
+ mMainForm->setExpanded(mModel->indexFromItem(mGeneralSettingsGroup), true);
+ if (mExtraSettings.size() > 0)
+ {
+ mMainForm->setExpanded(mModel->indexFromItem(mSecuritySettingsGroup), (mSecuritySettings[0].getCurrentValue() == 1));
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::init(JavaApplicationSettingsView* aPublicView)
+{
+ mPublicView = aPublicView;
+
+ if (mMainForm)
+ {
+ // do the connect for the main form
+ mPublicView->connect(mMainForm, SIGNAL(itemShown(const QModelIndex)),
+ mPublicView, SLOT(_q_dataItemDisplayed(const QModelIndex)));
+
+ // set the form as view's widget
+ mPublicView->setWidget(mMainForm);
+ }
+ else
+ {
+ // no settings available
+ HbLabel* label = new HbLabel(TXT_SETTINGS_NOT_AVAILABLE, mPublicView);
+ label->setAlignment(Qt::AlignVCenter);
+ }
+
+ // set title
+ mPublicView->setTitle(TXT_SETTINGS_TITLE);
+}
+
+JavaApplicationSettingsViewPrivate::~JavaApplicationSettingsViewPrivate()
+{
+ delete mMainForm;
+ delete mModel;
+ delete mNetConnSettingsUi;
+ delete mAsyncToSyncCallEventLoop;
+ foreach (QTranslator *translator, mTranslators) {
+ qApp->removeTranslator(translator);
+ }
+ qDeleteAll(mTranslators);
+ mTranslators.clear();
+}
+
+void JavaApplicationSettingsViewPrivate::readAllSettings()
+{
+ // general settings
+ initGeneralSettings();
+
+ // security settings
+ initSecuritySettings();
+}
+
+void JavaApplicationSettingsViewPrivate::init()
+{
+ // init storage
+ try
+ {
+ mStorage.reset(JavaStorage::createInstance());
+ mStorage->open();
+ }
+ catch (JavaStorageException& aJse)
+ {
+ ELOG1(EJavaSettings, "Error while opening the storage %S", aJse.toString().c_str());
+ }
+
+ QTranslator translator;
+ // load the correct translation of the localized strings for the cmmanager.
+ // Load this one first since it contains the smallest amount of strings
+ // (so it's ok to be searched last)
+ installTranslator("cmapplsettingsui");
+ installTranslator("cmmanager");
+ // load the correct translation of the localized strings for the java settings
+ // Current solution reads it from Z only (this does not work with IAD)
+ // -> check if translator can handle path without drive letter (e.g. the resource
+ // is loaded from the same drive where the DLL is loaded)
+ installTranslator("javaruntimeapplicationsettings");
+ // init strings
+ TXT_BLANKET = QString(hbTrId(ID_BLANKET));
+ TXT_SESSION = QString(hbTrId(ID_SESSION));
+ TXT_ONESHOT = QString(hbTrId(ID_ONESHOT));
+ TXT_DENIED = QString(hbTrId(ID_DENIED));
+ TXT_SECURITY_LEVEL = QString(hbTrId(ID_SECURITY_LEVEL));
+ TXT_USER_DEFINED = QString(hbTrId(ID_USER_DEFINED));
+ TXT_SENSITIVE_SETTINGS = QString(hbTrId(ID_SENSITIVE_SETTINGS));
+ TXT_SENSITIVE_SETTINGS_NET_USAGE = QString(hbTrId(ID_SENSITIVE_SETTINGS_NET_USAGE));
+ TXT_MUTUALLY_EXCLUSIVE_SETTINGS = QString(hbTrId(ID_MUTUALLY_EXCLUSIVE_SETTINGS));
+ TXT_OK = QString(hbTrId(ID_OK));
+ TXT_CANCEL = QString(hbTrId(ID_CANCEL));
+ TXT_SECURITY_WARNING_TITLE = QString(hbTrId(ID_SECURITY_WARNING_TITLE));
+ TXT_NET_ACCESS = QString(hbTrId(ID_NET_ACCESS));
+ TXT_LOW_LEVEL_NET_ACCESS = QString(hbTrId(ID_LOW_LEVEL_NET_ACCESS));
+ TXT_NETWORK_CONNECTION = QString(hbTrId(ID_NETWORK_CONNECTION));
+ TXT_SETTINGS_TITLE = QString(hbTrId(ID_SETTINGS_TITLE));
+ TXT_SETTINGS_NOT_AVAILABLE = QString(hbTrId(ID_SETTINGS_NOT_AVAILABLE));
+
+ // init the known localized settings names
+ mLocalizedSettingsNames[QString::fromStdWString(NET_ACCESS_SETTINGS)] = TXT_NET_ACCESS;
+ mLocalizedSettingsNames[QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)] = TXT_LOW_LEVEL_NET_ACCESS;
+ mLocalizedSettingsNames[QString::fromStdWString(MESSAGING_SETTINGS)] = QString(hbTrId(ID_MESSAGING));
+ mLocalizedSettingsNames[QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)] = QString(hbTrId(ID_RESTRICTED_MESSAGING));
+ mLocalizedSettingsNames[QString::fromStdWString(CALL_CONTROL_SETTINGS)] = QString(hbTrId(ID_CALL_CONTROL));
+ mLocalizedSettingsNames[QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)] = QString(hbTrId(ID_LOCAL_CONNECTIVITY));
+ mLocalizedSettingsNames[QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)] = QString(hbTrId(ID_MULTIMEDIA_RECORDING));
+ mLocalizedSettingsNames[QString::fromStdWString(WRITE_USER_DATA_ACCESS_SETTINGS)] = QString(hbTrId(ID_WRITE_USER_DATA_ACCESS));
+ mLocalizedSettingsNames[QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS)] = QString(hbTrId(ID_READ_USER_DATA_ACCESS));
+ mLocalizedSettingsNames[QString::fromStdWString(LOCATION_SETTINGS)] = QString(hbTrId(ID_LOCATION));
+ mLocalizedSettingsNames[QString::fromStdWString(LANDMARK_SETTINGS)] = QString(hbTrId(ID_LANDMARK));
+ mLocalizedSettingsNames[QString::fromStdWString(AUTHENTICATION_SETTINGS)] = QString(hbTrId(ID_AUTHENTICATION));
+ mLocalizedSettingsNames[QString::fromStdWString(SMART_CARD_COMMUNICATION_SETTINGS)] = QString(hbTrId(ID_SMART_CARD_COMMUNICATION));
+ mLocalizedSettingsNames[QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS)] = QString(hbTrId(ID_APPLICATION_AUTO_INVOCATION));
+ mLocalizedSettingsNames[QString::fromStdWString(BROADCAST_SETTINGS)] = QString(hbTrId(ID_BROADCAST));
+ mLocalizedSettingsNames[QString::fromStdWString(NFC_WRITE_ACCESS_SETTINGS)] = QString(hbTrId(ID_NFC_WRITE_ACCESS));
+ mLocalizedSettingsNames[QString::fromStdWString(URL_START_SETTINGS)] = QString(hbTrId(ID_URL_START));
+ // init the display indexes associated with each settings
+ mSettingsNamesIndexes[QString::fromStdWString(NET_ACCESS_SETTINGS)] = NET_ACCESS_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)] = LOW_LEVEL_NET_ACCESS_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(MESSAGING_SETTINGS)] = MESSAGING_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)] = RESTRICTED_MESSAGING_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(CALL_CONTROL_SETTINGS)] = CALL_CONTROL_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)] = LOCAL_CONNECTIVITY_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)] = MULTIMEDIA_RECORDING_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(WRITE_USER_DATA_ACCESS_SETTINGS)] = WRITE_USER_DATA_ACCESS_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS)] = READ_USER_DATA_ACCESS_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(LOCATION_SETTINGS)] = LOCATION_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(LANDMARK_SETTINGS)] = LANDMARK_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(AUTHENTICATION_SETTINGS)] = AUTHENTICATION_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(SMART_CARD_COMMUNICATION_SETTINGS)] = SMART_CARD_COMMUNICATION_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS)] = APPLICATION_AUTO_INVOCATION_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(BROADCAST_SETTINGS)] = BROADCAST_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(NFC_WRITE_ACCESS_SETTINGS)] = NFC_WRITE_ACCESS_SETTINGS_INDEX;
+ mSettingsNamesIndexes[QString::fromStdWString(URL_START_SETTINGS)] = URL_START_SETTINGS_INDEX;
+}
+
+
+void JavaApplicationSettingsViewPrivate::initGeneralSettings()
+{
+ QStringList settingsValues;
+ vector<wstring> storageValues;
+ if (!isInStorage(VALUE, NAME, L"Nokia-MIDlet-On-Screen-Keypad", APPLICATION_PACKAGE_ATTRIBUTES_TABLE))
+ {
+ // if the on screen keypad is predefined, it should not be changable by user
+ // -> right now it is not added to settings list. It should be changed so that
+ // the setting should not be editable by user
+ settingsValues<<QString(hbTrId(ID_OSK_NO))<<QString(hbTrId(ID_OSK_GAME))<<QString(hbTrId(ID_OSK_NAVIGATION));
+ storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NO);
+ storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_GAMEACTIONS);
+ storageValues.push_back(ON_SCREEN_KEYPAD_VALUE_NAVIGATION);
+ mGeneralSettings.append(JavaApplicationSettings(QString(hbTrId(ID_OSK)), settingsValues, ON_SCREEN_KEYPAD, MIDP_PACKAGE_TABLE, storageValues));
+ readFromStorage(mGeneralSettings[0]);
+ }
+ settingsValues = QStringList();
+ initNetworkConnection();
+ settingsValues<<mNetConn.name;
+ mGeneralSettings.append(JavaApplicationSettings(TXT_NETWORK_CONNECTION, settingsValues));
+ mNetSettIndex = mGeneralSettings.size() - 1;
+}
+
+void JavaApplicationSettingsViewPrivate::initSecuritySettings()
+{
+ QStringList settingsValues;
+ vector<wstring> storageValues;
+ settingsValues = QStringList();
+ storageValues.clear();
+ settingsValues<<QString(hbTrId(ID_SECURITY_LEVEL_DEFAULT))<<TXT_USER_DEFINED;
+ storageValues.push_back(SECURITY_WARNINGS_DEFAULT_MODE);
+ storageValues.push_back(SECURITY_WARNINGS_USER_DEFINED_MODE);
+ mSecuritySettings.append(JavaApplicationSettings(TXT_SECURITY_LEVEL, settingsValues, SECURITY_WARNINGS, MIDP_PACKAGE_TABLE, storageValues));
+ readFromStorage(mSecuritySettings[0]);
+
+ // extra settings
+ settingsValues = QStringList();
+ storageValues.clear();
+ settingsValues<<TXT_ONESHOT<<TXT_SESSION<<TXT_BLANKET<<TXT_DENIED;
+ storageValues.push_back(ONESHOT_INTERACTION_MODE);
+ storageValues.push_back(SESSION_INTERACTION_MODE);
+ storageValues.push_back(BLANKET_INTERACTION_MODE);
+ storageValues.push_back(DENIED_INTERACTION_MODE);
+ vector<IndexedSettingsName> allSecuritySettings = readFromStorage(FUNCTION_GROUP, MIDP_FUNC_GRP_SETTINGS_TABLE, MIDP_PERMISSIONS_TABLE);
+ // sort the security settings according to how they should be displayed
+ std::sort(allSecuritySettings.begin(), allSecuritySettings.end(), AscendingSort());
+ for(int i=0; i<allSecuritySettings.size(); i++)
+ {
+ QString rawSettingsName = QString::fromStdWString(allSecuritySettings[i].name);
+ QString localizedSettingsName = rawSettingsName;
+ if (mLocalizedSettingsNames.contains(rawSettingsName))
+ localizedSettingsName = mLocalizedSettingsNames.value(rawSettingsName);
+ mExtraSettings.append(JavaApplicationSettings(
+ localizedSettingsName, settingsValues, CURRENT_SETTING,
+ MIDP_FUNC_GRP_SETTINGS_TABLE, storageValues, FUNCTION_GROUP,
+ allSecuritySettings[i].name, ALLOWED_SETTINGS));
+ readFromStorage(mExtraSettings[i]);
+ mSettingsIndexes[rawSettingsName] = i;
+ }
+
+ // configure the high risk lists
+ configureLists();
+}
+
+void JavaApplicationSettingsViewPrivate::configureLists()
+{
+ QList<JavaApplicationSettings*> highRiskList;
+ QStringList highRiskSettingsNames;
+ highRiskSettingsNames
+ <<QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS)
+ <<QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS);
+ configureList(highRiskList, highRiskSettingsNames, mSettingsIndexes);
+ // net access with multimedia and read user data
+ attachList(QString::fromStdWString(NET_ACCESS_SETTINGS),highRiskList, mSettingsIndexes);
+ // low level net access with multimedia and read user data
+ attachList(QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS),highRiskList, mSettingsIndexes);
+ // messaging with multimedia and read user data
+ attachList(QString::fromStdWString(MESSAGING_SETTINGS),highRiskList, mSettingsIndexes);
+ // restricted messaging with multimedia and read user data
+ attachList(QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS),highRiskList, mSettingsIndexes);
+ // call control with multimedia and read user data
+ attachList(QString::fromStdWString(CALL_CONTROL_SETTINGS),highRiskList, mSettingsIndexes);
+ // local connectivity with multimedia and read user data
+ attachList(QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS),highRiskList, mSettingsIndexes);
+ // multimedia with net access, low level net access, messaging,
+ // restricted messaging, call control and local connectivity
+ highRiskList.clear();
+ highRiskSettingsNames.clear();
+ highRiskSettingsNames
+ <<QString::fromStdWString(NET_ACCESS_SETTINGS)
+ <<QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS)
+ <<QString::fromStdWString(MESSAGING_SETTINGS)
+ <<QString::fromStdWString(RESTRICTED_MESSAGING_SETTINGS)
+ <<QString::fromStdWString(CALL_CONTROL_SETTINGS)
+ <<QString::fromStdWString(LOCAL_CONNECTIVITY_SETTINGS)
+ <<QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS);
+ configureList(highRiskList, highRiskSettingsNames, mSettingsIndexes);
+ attachList(QString::fromStdWString(MULTIMEDIA_RECORDING_SETTINGS),highRiskList, mSettingsIndexes);
+ // read user data with net access, low level net access, messaging,
+ // restricted messaging, call control and local connectivity
+ attachList(QString::fromStdWString(READ_USER_DATA_ACCESS_SETTINGS),highRiskList, mSettingsIndexes);
+
+ // configure the mutually exclusive list
+ QList<JavaApplicationSettings*> mutuallyExclusiveList;
+ QStringList mutuallyExclusiveSettingsNames;
+ mutuallyExclusiveSettingsNames
+ <<QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS);
+ configureList(mutuallyExclusiveList, mutuallyExclusiveSettingsNames, mSettingsIndexes);
+ //net access with application auto invocation
+ attachList(QString::fromStdWString(NET_ACCESS_SETTINGS),mutuallyExclusiveList, mSettingsIndexes, false /* is high risk list */);
+ //low level net access with application auto invocation
+ attachList(QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS),mutuallyExclusiveList, mSettingsIndexes, false /* is high risk list */);
+ //application auto invocation with net access and low level net access
+ mutuallyExclusiveList.clear();
+ mutuallyExclusiveSettingsNames.clear();
+ mutuallyExclusiveSettingsNames
+ <<QString::fromStdWString(NET_ACCESS_SETTINGS)
+ <<QString::fromStdWString(LOW_LEVEL_NET_ACCESS_SETTINGS);
+ configureList(mutuallyExclusiveList, mutuallyExclusiveSettingsNames, mSettingsIndexes);
+ attachList(QString::fromStdWString(APPLICATION_AUTO_INVOCATION_SETTINGS),mutuallyExclusiveList, mSettingsIndexes, false /* is high risk list */);
+}
+
+void JavaApplicationSettingsViewPrivate::initSettings(QVector<JavaApplicationSettings>& aSettings, HbDataFormModelItem * aParent)
+{
+ for (int i=0; i<aSettings.size(); i++)
+ {
+ HbDataFormModelItem * appSettings = NULL;
+ int currentValue = 0;
+ switch(aSettings[i].getValues().size())
+ {
+ case 1:
+ appSettings = mModel->appendDataFormItem(
+ HbDataFormModelItem::ToggleValueItem,
+ aSettings[i].getName(), aParent);
+ // make it a toogle button (-> get rid of the "pressed" ui effect)
+ if (appSettings)
+ {
+ appSettings->setContentWidgetData(QString("text"), aSettings[i].getValues()[0]);
+ appSettings->setContentWidgetData(QString("additionalText"), aSettings[i].getValues()[0]);
+ }
+ break;
+ case 2:
+ appSettings = mModel->appendDataFormItem(
+ HbDataFormModelItem::ToggleValueItem,
+ aSettings[i].getName(), aParent);
+ if (appSettings)
+ {
+ currentValue = aSettings[i].getCurrentValue();
+ if (currentValue < 0)
+ {
+ currentValue = 0;
+ }
+ appSettings->setContentWidgetData(QString("text"), aSettings[i].getValues()[currentValue]);
+ appSettings->setContentWidgetData(QString("additionalText"),aSettings[i].getValues()[1 - currentValue]);
+ }
+ break;
+ default:
+ appSettings = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,
+ aSettings[i].getName(), aParent);
+ if (appSettings)
+ {
+ appSettings->setContentWidgetData(QString("items"), aSettings[i].getValues());
+ appSettings->setContentWidgetData(QString("currentIndex"),aSettings[i].getCurrentValue());
+ }
+ }
+ aSettings[i].setId(appSettings);
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::writeSettings(JavaApplicationSettings& aSettings, const QString &aNewValue)
+{
+ QStringList values = aSettings.getValues();
+ int currentValue = aSettings.getCurrentValue();
+ int newValue = aSettings.getValueIndex(aNewValue);
+ if (newValue != -1 && currentValue != newValue)
+ {
+ // handle blanket settings
+ if (aNewValue == TXT_BLANKET)
+ {
+ // check blanket settings
+ if (!isBlanketAllowed(aSettings))
+ {
+ // change back to the old value
+ HbComboBox * settingsCombo = static_cast<HbComboBox*>(itemToWidget(aSettings.getId()));
+ if (settingsCombo)
+ {
+ settingsCombo->setCurrentIndex(currentValue);
+ }
+ return;
+ }
+ }
+ aSettings.setCurrentValue(newValue);
+ writeToStorage(aSettings);
+ }
+}
+
+bool JavaApplicationSettingsViewPrivate::isBlanketAllowed(const JavaApplicationSettings& aSettings)
+{
+ // handle the high risk items
+ QList<JavaApplicationSettings*> highRiskList = aSettings.getHighRiskList();
+ // go through the list and see if any of the setings are in blanket
+ for (int i=0; i<highRiskList.size(); i++)
+ {
+ if (highRiskList[i] &&
+ highRiskList[i]->getValue(highRiskList[i]->getCurrentValue())
+ == TXT_BLANKET)
+ {
+ QString secWarning = TXT_SENSITIVE_SETTINGS;
+ QString LOCAL_CONNECTIVITY = QString(hbTrId(ID_LOCAL_CONNECTIVITY));
+ if (aSettings.getName() != LOCAL_CONNECTIVITY
+ && highRiskList[i]->getName() != LOCAL_CONNECTIVITY)
+ {
+ secWarning = TXT_SENSITIVE_SETTINGS_NET_USAGE;
+ }
+ if (!isSecurityWarningAccepted(
+ secWarning,TXT_OK,TXT_CANCEL ,TXT_SECURITY_WARNING_TITLE))
+ {
+ LOG3(EJavaSettings, EInfo,"User did not accept the high risk due to having both \"%S\" and \"%S\" set to \"%S\"", aSettings.getName().toStdWString().c_str(), highRiskList[i]->getName().toStdWString().c_str(), TXT_BLANKET.toStdWString().c_str());
+ return false;
+ }
+ LOG3(EJavaSettings, EInfo,"User accepted the high risk due to having both \"%S\" and \"%S\" set to \"%S\"", aSettings.getName().toStdWString().c_str(), highRiskList[i]->getName().toStdWString().c_str(), TXT_BLANKET.toStdWString().c_str());
+ break;
+ }
+ }
+ // handle the mutually exclusive rules
+ QList<JavaApplicationSettings*> mutuallyExclusiveList = aSettings
+ .getMutuallyExclusiveList();
+ // go through the list and see if any of the setings are in blanket
+ for (int i=0; i<mutuallyExclusiveList.size(); i++)
+ {
+ if (mutuallyExclusiveList[i] && mutuallyExclusiveList[i]->getValue(
+ mutuallyExclusiveList[i]->getCurrentValue()) == TXT_BLANKET)
+ {
+ bool isBlanketAllowed = isSecurityWarningAccepted(
+ TXT_MUTUALLY_EXCLUSIVE_SETTINGS, TXT_OK, TXT_CANCEL, TXT_SECURITY_WARNING_TITLE);
+ if (isBlanketAllowed)
+ {
+ // change the current value to the maximum allowed
+ bool isBlanket = true;
+ do
+ {
+ if (isBlanket)
+ {
+ QStringList allowedValues = mutuallyExclusiveList[i]->getValues();
+ int selectedValue = mutuallyExclusiveList[i]->getCurrentValue();
+ // select the maximum allowed value
+ for (int j=0; j<allowedValues.size(); j++)
+ {
+ if (allowedValues[j] == TXT_SESSION)
+ {
+ selectedValue = j;
+ break;
+ }
+ if (allowedValues[j] == TXT_ONESHOT)
+ {
+ selectedValue = j;
+ }
+ else if (allowedValues[j] == TXT_DENIED
+ && allowedValues[selectedValue] == TXT_BLANKET)
+ {
+ selectedValue = j;
+ }
+ }
+ // set the maximum allowed value
+ mutuallyExclusiveList[i]->setCurrentValue(selectedValue);
+ HbComboBox * settingsCombo = static_cast<HbComboBox*>(itemToWidget(
+ mutuallyExclusiveList[i]->getId()));
+ if (settingsCombo)
+ {
+ settingsCombo->setCurrentIndex(selectedValue);
+ }
+ writeToStorage(*mutuallyExclusiveList[i]);
+ LOG4(EJavaSettings, EInfo,"Changing \"%S\" to \"%S\" led to changing \"%S\" to \"%S\" due to mutually exclusive rules", aSettings.getName().toStdWString().c_str(), TXT_BLANKET.toStdWString().c_str(), mutuallyExclusiveList[i]->getName().toStdWString().c_str(), allowedValues[selectedValue].toStdWString().c_str());
+ }
+ i++;
+ // end of list?
+ if (i >= mutuallyExclusiveList.size())
+ {
+ break;
+ }
+ // move on into the list
+ isBlanket = (mutuallyExclusiveList[i]->getValue(
+ mutuallyExclusiveList[i]->getCurrentValue()) == TXT_BLANKET);
+ }
+ while (true);
+ }
+ else
+ {
+ LOG1(EJavaSettings, EInfo,"User did not accept changes in \"%S\" due to mutually exclusive rules", mutuallyExclusiveList[i]->getName().toStdWString().c_str());
+ }
+ return isBlanketAllowed;
+ }
+ }
+ return true;
+}
+
+void JavaApplicationSettingsViewPrivate::_q_settingsChanged(bool)
+{
+ HbPushButton * sender = static_cast<HbPushButton*>(mPublicView->sender());
+ if (sender)
+ {
+ JavaApplicationSettings* settings = findSettings(sender);
+ if (settings == NULL)
+ {
+ return;
+ }
+ if (settings->getName() == TXT_SECURITY_LEVEL)
+ {
+ QString newValue = settings->getValue(1 - settings->getCurrentValue());
+ securityWarningsChanged(newValue);
+ writeSettings(*settings, newValue);
+ }
+ else if (settings->getName() == TXT_NETWORK_CONNECTION)
+ {
+ handleNetworkSettings();
+ }
+ }
+}
+void JavaApplicationSettingsViewPrivate::_q_settingsChanged(const QString& aNewValue)
+{
+ HbComboBox * sender = static_cast<HbComboBox*>(mPublicView->sender());
+ if (sender)
+ {
+ JavaApplicationSettings* settings = findSettings(sender);
+ if (settings != NULL)
+ {
+ // any other settings are treated same
+ writeSettings(*settings, aNewValue);
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::securityWarningsChanged(const QString& aNewValue)
+{
+ if (aNewValue == TXT_USER_DEFINED)
+ {
+ // append the extra settings and values
+ for (int i=0; i<mExtraSettings.size(); i++)
+ {
+ if (mExtraSettings[i].getCurrentValue() >= 0 && mExtraSettings[i].getId() == 0)
+ {
+ HbDataFormModelItem * appSettings = mModel->appendDataFormItem(
+ HbDataFormModelItem::ComboBoxItem,
+ mExtraSettings[i].getName(), mSecuritySettingsGroup);
+ if (appSettings)
+ {
+ mExtraSettings[i].setId(appSettings);
+ // when settings the items, the settingsChanged signal gets emitted with the first value
+ // as being the current value. This signal should be discarded (the first value is just
+ // an intermediate value towards the actual current value which gets set shortly).
+ // Therefore set the first value as the current value (this way the settingsChanged
+ // signal gets discarded) and change the current value back to the real current value
+ int currentValue = mExtraSettings[i].getCurrentValue();
+ mExtraSettings[i].setCurrentValue(0);
+ appSettings->setContentWidgetData(QString("items"), mExtraSettings[i].getValues());
+ mExtraSettings[i].setCurrentValue(currentValue);
+ appSettings->setContentWidgetData(QString("currentIndex"),mExtraSettings[i].getCurrentValue());
+ }
+ }
+ }
+ }
+ else
+ {
+ // remove the extra settings
+ for (int i=0; i<mExtraSettings.size(); i++)
+ {
+ if (mExtraSettings[i].getId())
+ {
+ HbComboBox * extraSettingsId = static_cast<HbComboBox*>(itemToWidget(mExtraSettings[i].getId()));
+ if (extraSettingsId)
+ {
+ mPublicView->disconnect(extraSettingsId, 0, 0, 0);
+ mModel->removeItem(mModel->indexFromItem(mExtraSettings[i].getId()));
+ mExtraSettings[i].setId(0);
+ mExtraSettings[i].disconnectFromUi();
+ }
+ }
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::handleNetworkSettings()
+{
+ // init flags to show destinations and connection methods
+ QFlags<CmApplSettingsUi::SelectionDialogItems> listItems;
+ listItems |= CmApplSettingsUi::ShowDestinations;
+ listItems |= CmApplSettingsUi::ShowConnectionMethods;
+
+ // empty filter -> all bearer types included
+ QSet<CmApplSettingsUi::BearerTypeFilter> filter;
+ // reset the result
+ mNetConnSelection.result = mNetConn.type;
+ mNetConnSelection.id = mNetConn.id;
+ // init settings ui with destinations, filter and initial selection
+ mNetConnSettingsUi->setOptions(listItems, filter);
+ mNetConnSettingsUi->setSelection(mNetConnSelection);
+ // Connect the setting ui's signal with own slot where the mNetConnSelection is stored
+ connect(mNetConnSettingsUi, SIGNAL(finished(uint)), this, SLOT(netConnSelected(uint)));
+ // launch the setting ui
+ mNetConnSettingsUi->open();
+}
+
+void JavaApplicationSettingsViewPrivate::_q_dataItemDisplayed(const QModelIndex aDataItemIndex)
+{
+ HbDataFormModelItem *item = static_cast<HbDataFormModel*>(
+ mMainForm->model())->itemFromIndex(aDataItemIndex);
+ if (item == NULL)
+ {
+ return;
+ }
+ int itemType = item->data(HbDataFormModelItem::ItemTypeRole).toInt();
+ HbComboBox * comboBox = NULL;
+ HbPushButton * pushButton = NULL;
+ HbWidget * widget = (qobject_cast<HbDataFormViewItem *>
+ (mMainForm->itemByIndex(aDataItemIndex)))->dataItemContentWidget();
+ JavaApplicationSettings* settings = findSettings(widget);
+ if (settings == NULL)
+ {
+ // stop right here
+ return;
+ }
+ switch(HbDataFormModelItem::DataItemType(itemType))
+ {
+ case HbDataFormModelItem::ComboBoxItem:
+ comboBox = static_cast<HbComboBox*>(widget);
+ if (settings->isConnectedToUi())
+ {
+ // need to do a reconnect: disconnect followed by a connect
+ mPublicView->disconnect(comboBox,
+ SIGNAL(currentIndexChanged(const QString &)),
+ mPublicView,
+ SLOT(_q_settingsChanged(const QString &)));
+ }
+ mPublicView->connect(comboBox,
+ SIGNAL(currentIndexChanged(const QString &)),
+ mPublicView, SLOT(_q_settingsChanged(const QString &)),
+ Qt::UniqueConnection);
+ break;
+ case HbDataFormModelItem::ToggleValueItem:
+ pushButton = static_cast< HbPushButton*>(widget);
+ if (settings->isConnectedToUi())
+ {
+ // need to do a reconnect: disconnect followed by a connect
+ mPublicView->disconnect(pushButton,
+ SIGNAL(clicked(bool)),
+ mPublicView,
+ SLOT(_q_settingsChanged(bool)));
+ }
+ mPublicView->connect(pushButton,
+ SIGNAL(clicked(bool)),
+ mPublicView, SLOT(_q_settingsChanged(bool)),
+ Qt::UniqueConnection);
+ break;
+ }
+ settings->connectToUi();
+}
+
+void JavaApplicationSettingsViewPrivate::netConnSelected(uint aNetConnSelectionStatus)
+{
+ if (aNetConnSelectionStatus == CmApplSettingsUi::ApplSettingsErrorNone)
+ {
+ mNetConnSelection = mNetConnSettingsUi->selection();
+ // store the selection
+ if (mNetConnSelection.id != mNetConn.id
+ && mNetConnSelection.id != mDefaultConnId)
+ {
+ TRAPD(err,
+ switch(mNetConnSelection.result)
+ {
+ case CmApplSettingsUi::SelectionTypeDestination:
+ ConnectionManager::setDestinationNetworkIdL(mSuiteUid, mNetConnSelection.id);
+ break;
+ case CmApplSettingsUi::SelectionTypeConnectionMethod:
+ ConnectionManager::setApnIdL(mSuiteUid, mNetConnSelection.id);
+ break;
+ }
+ );
+ if (err == KErrNone)
+ {
+ mNetConn.id = mNetConnSelection.id;
+ mNetConn.type = mNetConnSelection.result;
+ readNetworkConnectionName();
+ mGeneralSettings[mNetSettIndex].getId()->setContentWidgetData(QString("text"), mNetConn.name);
+ mGeneralSettings[mNetSettIndex].getId()->setContentWidgetData(QString("additionalText"), mNetConn.name);
+ }
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::securityWarningDismissed(HbAction* aDismissAction)
+{
+ HbMessageBox *dlg = static_cast<HbMessageBox*>(sender());
+ mSecWarningAccepted = (aDismissAction == dlg->actions().at(0));
+ mAsyncToSyncCallEventLoop->exit();
+}
+
+void JavaApplicationSettingsViewPrivate::initNetworkConnection()
+{
+ TRAP_IGNORE(
+ mNetConn.id = ConnectionManager::getDestinationNetworkIdL(mSuiteUid);
+ if (mNetConn.id == (uint)KJavaNetworkAccessNotSpecified)
+ {
+ mNetConn.id = ConnectionManager::getApnIdL(mSuiteUid);
+ }
+ );
+ QNetworkConfigurationManager manager;
+ QNetworkConfiguration defaultCfg = manager.defaultConfiguration();
+ mDefaultConnId = defaultCfg.identifier().toInt();
+ QNetworkConfiguration cfg = manager.configurationFromIdentifier(
+ QString::number(mNetConn.id));
+ if (!cfg.isValid())
+ {
+ cfg = defaultCfg;
+ }
+ mNetConn.name = QString(hbTrId(cfg.name().toUtf8()));
+}
+
+void JavaApplicationSettingsViewPrivate::readNetworkConnectionName()
+{
+ QNetworkConfigurationManager manager;
+ QNetworkConfiguration cfg = manager.configurationFromIdentifier(
+ QString::number(mNetConn.id));
+ if (!cfg.isValid())
+ {
+ cfg = manager.defaultConfiguration();
+ }
+ mNetConn.name = QString(hbTrId(cfg.name().toUtf8()));
+}
+
+JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbWidget* aId)
+{
+ JavaApplicationSettings* settings = findSettings(aId, mGeneralSettings);
+ if (settings == NULL)
+ {
+ settings = findSettings(aId, mSecuritySettings);
+ if (settings == NULL)
+ {
+ settings = findSettings(aId, mExtraSettings);
+ }
+ }
+ return settings;
+}
+
+JavaApplicationSettings* JavaApplicationSettingsViewPrivate::findSettings(HbWidget* aId, QVector<JavaApplicationSettings>& aAllSettings)
+{
+ for (int i=0; i<aAllSettings.size(); i++)
+ {
+ if (itemToWidget(aAllSettings[i].getId()) == aId)
+ {
+ return &aAllSettings[i];
+ }
+ }
+ return NULL;
+}
+
+HbWidget * JavaApplicationSettingsViewPrivate::itemToWidget(const HbDataFormModelItem * aItem)
+{
+ HbDataFormViewItem * viewItem = qobject_cast<HbDataFormViewItem *> (mMainForm->itemByIndex(
+ mModel->indexFromItem(aItem)));
+ if (viewItem)
+ {
+ return static_cast<HbWidget*>(viewItem->dataItemContentWidget());
+ }
+ return NULL;
+}
+
+bool JavaApplicationSettingsViewPrivate::isSecurityWarningAccepted(const QString& aText, const QString& aAcceptActionLabel, const QString& aRejectActionLabel, const QString& aHeadingText)
+{
+ HbMessageBox securityWarning(HbMessageBox::MessageTypeQuestion);
+ securityWarning.setDismissPolicy(HbDialog::NoDismiss);
+ securityWarning.setTimeout(HbDialog::NoTimeout);
+ securityWarning.setIconVisible(false);
+ securityWarning.setText(aText);
+ securityWarning.addAction(new HbAction(
+ aAcceptActionLabel, &securityWarning));
+ securityWarning.addAction(new HbAction(
+ aRejectActionLabel, &securityWarning));
+ securityWarning.setHeadingWidget(new HbLabel(aHeadingText));
+ securityWarning.open(this, SLOT(securityWarningDismissed(HbAction*)));
+ mAsyncToSyncCallEventLoop->exec();
+ return mSecWarningAccepted;
+}
+
+void JavaApplicationSettingsViewPrivate::configureList(QList<JavaApplicationSettings*>& aList, const QStringList& aSettingsNames, const QHash<QString, int>& aSettingsIndexes)
+{
+ for(int i=0; i<aSettingsNames.size(); i++)
+ {
+ if (aSettingsIndexes.contains(aSettingsNames[i]))
+ {
+ aList << &(mExtraSettings[aSettingsIndexes.value(aSettingsNames[i])]);
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::attachList(const QString& aSettingsName, const QList<JavaApplicationSettings*>& aList, const QHash<QString, int>& aSettingsIndexes, bool aIsHighRiskList)
+{
+ if (aSettingsIndexes.contains(aSettingsName))
+ {
+ if (aIsHighRiskList)
+ {
+ mExtraSettings[aSettingsIndexes.value(aSettingsName)].setHighRiskList(aList);
+ }
+ else
+ {
+ mExtraSettings[aSettingsIndexes.value(aSettingsName)].setMutuallyExclusiveList(aList);
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::installTranslator(const QString& aTranslationFileName)
+{
+ QTranslator* translator = new QTranslator;
+
+ // load the correct translation of the localized strings for the java settings
+ if (translator->load(
+ aTranslationFileName + "_" + QLocale::system().name(),
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath)))
+ {
+ mTranslators.append(translator);
+ qApp->installTranslator(translator);
+ }
+ else
+ {
+ delete translator;
+ translator = NULL;
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::readFromStorage(JavaApplicationSettings& aSettings)
+{
+ if (aSettings.getColumnName().size() > 0
+ && aSettings.getTableName().size() > 0)
+ {
+ wstring value = L"";
+
+ JavaStorageApplicationEntry_t query;
+ JavaStorageApplicationList_t queryResult;
+ JavaStorageEntry attr;
+ attr.setEntry(ID, mSuiteUid);
+ query.insert(attr);
+ if (aSettings.getFilterColumnName().size() > 0)
+ {
+ attr.setEntry(aSettings.getFilterColumnName(), aSettings.getFilterColumnValue());
+ query.insert(attr);
+ }
+ attr.setEntry(aSettings.getColumnName(), L"");
+ query.insert(attr);
+ if (aSettings.getValuesColumnName().size() > 0)
+ {
+ attr.setEntry(aSettings.getValuesColumnName(), L"");
+ query.insert(attr);
+ }
+
+ try
+ {
+ mStorage->search(aSettings.getTableName(), query, queryResult);
+ }
+ catch (JavaStorageException& aJse)
+ {
+ // Don't leave. Set defaults.
+ ELOG1(EJavaSettings, "Error while reading from storage %S", aJse.toString().c_str());
+ }
+
+ if (aSettings.getValuesColumnName().size() > 0)
+ {
+ findEntry(queryResult, aSettings.getValuesColumnName(), value);
+ if (value.size() > 0)
+ {
+ aSettings.setStorageValuesFilter(value);
+ filterSecuritySettings(aSettings);
+ }
+ }
+
+ value = L"";
+ findEntry(queryResult, aSettings.getColumnName(), value);
+
+ if (value.size() > 0)
+ {
+ vector<wstring> storageValues = aSettings.getStorageValues();
+ for (int i=0; i<storageValues.size(); i++)
+ {
+ if (storageValues[i] == value)
+ {
+ aSettings.setCurrentValue(i);
+ break;
+ }
+ }
+ LOG2(EJavaSettings, EInfo,"Setting \"%S\" initialized to \"%S\"", aSettings.getName().toStdWString().c_str(), aSettings.getValue(aSettings.getCurrentValue()).toStdWString().c_str());
+ }
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::filterSecuritySettings(JavaApplicationSettings& aSettings)
+{
+ std::wstring allowedModes = aSettings.getStorageValuesFilter();
+ if (allowedModes.size() <= 0)
+ {
+ return;
+ }
+ // The allowed modes info is stored as a 4-bit constant:
+ // X(oneshot)X(session)X(blanket)X(no)
+ // e.g. 1011 (=11) means that oneshot, blanket and no are allowed.
+ // The following constants are used to encode/decode the allowed modes
+ // into/from a 4-bit number
+ int INTERACTION_MODE_DENIED = 1;
+ int INTERACTION_MODE_BLANKET = 2;
+ int INTERACTION_MODE_SESSION = 4;
+ int INTERACTION_MODE_ONESHOT = 8;
+ TInt allowedInteractionModes = JavaCommonUtils::wstringToInt(allowedModes);
+ int index = 0;
+ int tmp = allowedInteractionModes & INTERACTION_MODE_ONESHOT;
+ if (tmp <= 0)
+ {
+ aSettings.removeValue(index);
+ index--;
+ }
+ index++;
+ tmp = allowedInteractionModes & INTERACTION_MODE_SESSION;
+ if (tmp <= 0)
+ {
+ aSettings.removeValue(index);
+ index--;
+ }
+ index++;
+ tmp = allowedInteractionModes & INTERACTION_MODE_BLANKET;
+ if (tmp <= 0)
+ {
+ aSettings.removeValue(index);
+ index--;
+ }
+ index++;
+ tmp = allowedInteractionModes & INTERACTION_MODE_DENIED;
+ if (tmp <= 0)
+ {
+ aSettings.removeValue(index);
+ }
+}
+
+void JavaApplicationSettingsViewPrivate::writeToStorage(JavaApplicationSettings& aSettings)
+{
+ if (aSettings.getTableName().size() <= 0
+ || aSettings.getColumnName().size() <= 0)
+ {
+ // storage details are not provided -> no point in going further
+ return;
+ }
+ JavaStorageApplicationEntry_t oldEntry;
+ JavaStorageEntry attr;
+ attr.setEntry(ID, mSuiteUid);
+ oldEntry.insert(attr);
+ JavaStorageApplicationEntry_t entry;
+ if (aSettings.getFilterColumnName().size() > 0)
+ {
+ attr.setEntry(aSettings.getFilterColumnName(), aSettings.getFilterColumnValue());
+ oldEntry.insert(attr);
+ }
+ attr.setEntry(aSettings.getColumnName(), aSettings.getStorageValues()[aSettings.getCurrentValue()]);
+ entry.insert(attr);
+
+ try
+ {
+ mStorage->update(aSettings.getTableName(), entry, oldEntry);
+ }
+ catch (JavaStorageException& aJse)
+ {
+ ELOG1(EJavaSettings, "Error while writing into storage %S", aJse.toString().c_str());
+ }
+ LOG2(EJavaSettings, EInfo,"Setting \"%S\" changed to \"%S\"", aSettings.getName().toStdWString().c_str(), aSettings.getValue(aSettings.getCurrentValue()).toStdWString().c_str());
+
+}
+
+void JavaApplicationSettingsViewPrivate::findEntry(const JavaStorageApplicationList_t& aQueryResult,
+ const std::wstring& aName,
+ std::wstring& aValue)
+{
+ if (aQueryResult.size() > 0)
+ {
+ JavaStorageApplicationEntry_t entry = aQueryResult.front();
+ JavaStorageEntry findPattern;
+ findPattern.setEntry(aName, L"");
+ JavaStorageApplicationEntry_t::const_iterator findIterator =
+ entry.find(findPattern);
+ if (findIterator != entry.end())
+ {
+ aValue = findIterator->entryValue();
+ }
+ }
+}
+
+bool JavaApplicationSettingsViewPrivate::isInStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
+{
+ wstring value = readFromStorage(aColumnName, aColumnFilterName, aColumnFilterValue, aTableName);
+
+ return (value.size() > 0);
+}
+
+wstring JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName)
+{
+ wstring value = L"";
+
+ JavaStorageApplicationEntry_t query;
+ JavaStorageApplicationList_t queryResult;
+ JavaStorageEntry attr;
+ attr.setEntry(ID, mSuiteUid);
+ query.insert(attr);
+ if (aColumnFilterName.size() > 0)
+ {
+ attr.setEntry(aColumnFilterName, aColumnFilterValue);
+ query.insert(attr);
+ }
+ attr.setEntry(aColumnName, L"");
+ query.insert(attr);
+
+ try
+ {
+ mStorage->search(aTableName, query, queryResult);
+ }
+ catch (JavaStorageException& aJse)
+ {
+ // Don't leave. Set defaults.
+ }
+
+ findEntry(queryResult, aColumnName, value);
+
+ return value;
+}
+
+vector<IndexedSettingsName> JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::string& aPrimaryTableName, const std::string& aSecondaryTableName)
+{
+ vector<IndexedSettingsName> values;
+
+ JavaStorageApplicationEntry_t query;
+ JavaStorageApplicationList_t queryResult;
+ JavaStorageEntry attr;
+ attr.setEntry(ID, mSuiteUid);
+ query.insert(attr);
+ attr.setEntry(aColumnName, L"");
+ query.insert(attr);
+
+ try
+ {
+ mStorage->search(aPrimaryTableName, query, queryResult);
+
+ JavaStorageApplicationList_t::const_iterator iterator;
+ JavaStorageApplicationList_t secondaryQueryResult;
+ for (iterator = queryResult.begin(); iterator != queryResult.end(); iterator++)
+ {
+ std::wstring name = L"";
+ JavaStorageApplicationEntry_t entry = (*iterator);
+ JavaStorageEntry findPattern;
+ findPattern.setEntry(aColumnName, L"");
+ JavaStorageApplicationEntry_t::const_iterator findIterator =
+ entry.find(findPattern);
+ if (findIterator != entry.end())
+ {
+ name = findIterator->entryValue();
+ }
+ if (name.size() > 0)
+ {
+ entry.clear();
+ query.clear();
+ attr.setEntry(ID, mSuiteUid);
+ query.insert(attr);
+ attr.setEntry(aColumnName, name);
+ query.insert(attr);
+ secondaryQueryResult.clear();
+ mStorage->search(aSecondaryTableName, query, secondaryQueryResult);
+ if (secondaryQueryResult.size() > 0)
+ {
+ IndexedSettingsName value;
+ value.name = name;
+ value.index = LAST_SETTINGS_INDEX + 1;
+ if (mSettingsNamesIndexes.contains(QString::fromStdWString(name)))
+ {
+ value.index = mSettingsNamesIndexes.value(QString::fromStdWString(name));
+ }
+ values.push_back(value);
+ }
+ }
+ }
+ }
+ catch (JavaStorageException& aJse)
+ {
+ // Don't leave. Set defaults.
+ }
+
+ return values;
+}
+
+void JavaApplicationSettingsViewPrivate::readSuiteUid(const QString& aAppUid)
+{
+ mSuiteUid = L"";
+ bool ok;
+ int tmp = aAppUid.toInt( &ok, 10 );
+ if (!ok)
+ {
+ return;
+ }
+ wstring appUid = L"";
+ appUid.append(L"[").append(QString("%1").arg(tmp, 0, 16).toStdWString()).append(L"]");
+
+ JavaStorageApplicationEntry_t query;
+ JavaStorageApplicationList_t queryResult;
+ JavaStorageEntry attr;
+ attr.setEntry(ID, appUid);
+ query.insert(attr);
+ attr.setEntry(PACKAGE_ID, L"");
+ query.insert(attr);
+ try
+ {
+ mStorage->search(APPLICATION_TABLE, query, queryResult);
+ }
+ catch (JavaStorageException& aJse)
+ {
+ // Don't leave. Set defaults.
+ ELOG1(EJavaSettings, "Error while reading from storage %S", aJse.toString().c_str());
+ }
+ findEntry(queryResult, PACKAGE_ID, mSuiteUid);
+}
+
+#include "moc_javaapplicationsettingsview.cpp"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javasettings_qt/src/javaapplicationsettingsview_p.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,229 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef JAVAAPPLICATIONSETTINGSVIEW_P_H
+#define JAVAAPPLICATIONSETTINGSVIEW_P_H
+
+#include <QVector>
+#include <QList>
+#include <QTranslator>
+#include <QModelIndex>
+#include <QEventLoop>
+#include <memory>
+#include <cmapplsettingsui.h>
+#include "javaapplicationsettings.h"
+#include "javastorage.h"
+
+class HbWidget;
+class HbPushButton;
+class HbDataForm;
+class HbDataFormModel;
+class HbDataFormModelItem;
+class HbAction;
+
+namespace java
+{
+namespace settings
+{
+
+// constants used for retrieving the translations of different texts via hbTrId function
+const char* const ID_BLANKET = "txt_java_sett_setlabel_permission_val_blanket";
+const char* const ID_SESSION = "txt_java_sett_setlabel_permission_val_session";
+const char* const ID_ONESHOT = "txt_java_sett_setlabel_permission_val_oneshot";
+const char* const ID_DENIED = "txt_java_sett_setlabel_permission_val_no";
+const char* const ID_SECURITY_LEVEL = "txt_java_sett_setlabel_security_level";
+const char* const ID_USER_DEFINED = "txt_java_sett_setlabel_security_level_val_user_defined";
+const char* const ID_SENSITIVE_SETTINGS = "txt_java_sett_info_query_perm_sec";
+const char* const ID_SENSITIVE_SETTINGS_NET_USAGE = "txt_java_sett_info_query_perm_net";
+const char* const ID_MUTUALLY_EXCLUSIVE_SETTINGS = "txt_java_sett_info_query_perm_warn";
+const char* const ID_OK = "txt_java_sett_button_settings_ok";
+const char* const ID_CANCEL = "txt_java_sett_button_settings_cancel";
+const char* const ID_SECURITY_WARNING_TITLE = "txt_java_sett_title_note_security_warn";
+const char* const ID_NET_ACCESS = "txt_java_sett_setlabel_net_access";
+const char* const ID_LOW_LEVEL_NET_ACCESS = "txt_java_sett_setlabel_low_level_net_access";
+const char* const ID_NETWORK_CONNECTION = "txt_occ_title_network_connection";
+const char* const ID_SETTINGS_TITLE = "txt_java_sett_title_settings";
+const char* const ID_SETTINGS_NOT_AVAILABLE = "txt_java_sett_info_settings_not_available";
+const char* const ID_GENERAL_GROUP_TITLE = "txt_java_sett_subtitle_general";
+const char* const ID_SECURITY_GROUP_TITLE = "txt_java_sett_subtitle_security";
+const char* const ID_OSK_NO = "txt_java_sett_setlabel_osk_val_no";
+const char* const ID_OSK_GAME = "txt_java_sett_setlabel_osk_val_game";
+const char* const ID_OSK_NAVIGATION = "txt_java_sett_setlabel_osk_val_navigation";
+const char* const ID_OSK = "txt_java_sett_setlabel_osk";
+const char* const ID_SECURITY_LEVEL_DEFAULT = "txt_java_sett_setlabel_security_level_val_default";
+const char* const ID_MESSAGING = "txt_java_sett_setlabel_messaging";
+const char* const ID_RESTRICTED_MESSAGING = "txt_java_sett_setlabel_restricted_messaging";
+const char* const ID_CALL_CONTROL = "txt_java_sett_setlabel_call_control";
+const char* const ID_LOCAL_CONNECTIVITY = "txt_java_sett_setlabel_local_conn";
+const char* const ID_MULTIMEDIA_RECORDING = "txt_java_sett_setlabel_mm_record";
+const char* const ID_WRITE_USER_DATA_ACCESS = "txt_java_sett_setlabel_write_data";
+const char* const ID_READ_USER_DATA_ACCESS = "txt_java_sett_setlabel_read_data";
+const char* const ID_LOCATION = "txt_java_sett_setlabel_location";
+const char* const ID_LANDMARK = "txt_java_sett_setlabel_landmarks";
+const char* const ID_AUTHENTICATION = "txt_java_sett_setlabel_auth";
+const char* const ID_SMART_CARD_COMMUNICATION = "txt_java_sett_setlabel_smartcard";
+const char* const ID_APPLICATION_AUTO_INVOCATION = "txt_java_sett_setlabel_app_auto_invoc";
+const char* const ID_BROADCAST = "txt_java_sett_setlabel_broadcast";
+const char* const ID_NFC_WRITE_ACCESS = "txt_java_sett_setlabel_nfc_write_access";
+const char* const ID_URL_START = "txt_java_sett_setlabel_url_start";
+
+class JavaApplicationSettingsView;
+
+// this structures are used for ensuring the settings are always
+// displayed in same order: each setting has associated an index
+// - the lower the index is the higher in the list the setting is
+// displayed
+enum SettingsIndexes
+{
+ NET_ACCESS_SETTINGS_INDEX,
+ LOW_LEVEL_NET_ACCESS_SETTINGS_INDEX,
+ MESSAGING_SETTINGS_INDEX,
+ RESTRICTED_MESSAGING_SETTINGS_INDEX,
+ CALL_CONTROL_SETTINGS_INDEX,
+ LOCAL_CONNECTIVITY_SETTINGS_INDEX,
+ MULTIMEDIA_RECORDING_SETTINGS_INDEX,
+ WRITE_USER_DATA_ACCESS_SETTINGS_INDEX,
+ READ_USER_DATA_ACCESS_SETTINGS_INDEX,
+ LOCATION_SETTINGS_INDEX,
+ LANDMARK_SETTINGS_INDEX,
+ AUTHENTICATION_SETTINGS_INDEX,
+ SMART_CARD_COMMUNICATION_SETTINGS_INDEX,
+ APPLICATION_AUTO_INVOCATION_SETTINGS_INDEX,
+ BROADCAST_SETTINGS_INDEX,
+ NFC_WRITE_ACCESS_SETTINGS_INDEX,
+ URL_START_SETTINGS_INDEX,
+ LAST_SETTINGS_INDEX,
+};
+struct IndexedSettingsName
+{
+ std::wstring name;
+ int index;
+};
+struct AscendingSort
+{
+ bool operator()(const IndexedSettingsName& i1, const IndexedSettingsName& i2)
+ {
+ return i1.index < i2.index;
+ }
+};
+
+/**
+ * The Ui is build around the Orbit's HbDataForm, with one group for the general settings
+ * (including network settings and On screen keypad settings) and another group for
+ * security settings (including the security warnings mode and the actual security settings).
+ * The items inside the group are either of type tooglebutton (network settings and security
+ * warnings mode) or of type combobox. When the plugin is instantiated the two groups are
+ * created and the settings are read from storage. When the plugin receives an initialization
+ * signal the HbDataModel's (associated to the main HbDataForm) itemShown signal is connected
+ * to the plugin's slot _q_dataItemDisplayed. While the groups become visible they are populated
+ * with dataitems of either type tooglebutton or combobox. After being added to their parent's
+ * group the dataitems's currentIndexChanged signal is connected to the plugin's _q_settingsChanged
+ * slot where the settings changes are handled.
+ */
+class JavaApplicationSettingsViewPrivate: public QObject
+{
+ Q_OBJECT
+
+public:
+ JavaApplicationSettingsViewPrivate(const QString& aJavaAppUid);
+ virtual ~JavaApplicationSettingsViewPrivate();
+ void init(JavaApplicationSettingsView* aPublicView);
+
+ // slots
+ void _q_settingsChanged(const QString& aNewValue);
+ void _q_settingsChanged(bool aNewValue);
+ void _q_dataItemDisplayed(const QModelIndex aDataItemIndex);
+
+private slots:
+ void netConnSelected(uint aNetConnSelectionStatus);
+ void securityWarningDismissed(HbAction* aDismissAction);
+
+private:
+ void init();
+ void initGeneralSettings();
+ void initSecuritySettings();
+ void readAllSettings();
+ void initSettings(QVector<JavaApplicationSettings>& aSettings, HbDataFormModelItem * aParent);
+ void writeSettings(JavaApplicationSettings& aSettings, const QString &aNewValue);
+ void securityWarningsChanged(const QString& aNewValue);
+ bool isBlanketAllowed(const JavaApplicationSettings& aSettings);
+ HbWidget * itemToWidget(const HbDataFormModelItem * aItem);
+ JavaApplicationSettings* findSettings(HbWidget* aId);
+ JavaApplicationSettings* findSettings(HbWidget* aId, QVector<JavaApplicationSettings>& aAllSettings);
+ void readFromStorage(JavaApplicationSettings& aSettings);
+ void writeToStorage(JavaApplicationSettings& aSettings);
+ bool isInStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName);
+ std::wstring readFromStorage(const std::wstring& aColumnName, const std::wstring& aColumnFilterName, const std::wstring& aColumnFilterValue, const std::string& aTableName);
+ std::vector<IndexedSettingsName> readFromStorage(const std::wstring& aColumnName, const std::string& aPrimaryTableName, const std::string& aSecondaryTableName);
+ void filterSecuritySettings(JavaApplicationSettings& aSettings);
+ void findEntry(const java::storage::JavaStorageApplicationList_t& aQueryResult, const std::wstring& aName, std::wstring& aValue);
+ void readSuiteUid(const QString& aAppUid);
+ bool isSecurityWarningAccepted(const QString& aText, const QString& aAcceptActionLabel, const QString& aRejectActionLabel, const QString& aHeadingText);
+ void handleNetworkSettings();
+ void readNetworkConnectionName();
+ void initNetworkConnection();
+ void configureList(QList<JavaApplicationSettings*>& aList, const QStringList& aSettingsNames, const QHash<QString, int>& aSettingsIndexes);
+ void attachList(const QString& aSettingsName, const QList<JavaApplicationSettings*>& aList, const QHash<QString, int>& aSettingsIndexes, bool isHighRiskList = true);
+ void configureLists();
+ void installTranslator(const QString& aTranslationFileName);
+
+private:
+ HbDataForm * mMainForm;
+ HbDataFormModel *mModel;
+ HbDataFormModelItem * mGeneralSettingsGroup;
+ HbDataFormModelItem * mSecuritySettingsGroup;
+ QVector<JavaApplicationSettings> mGeneralSettings;
+ QVector<JavaApplicationSettings> mSecuritySettings;
+ QVector<JavaApplicationSettings> mExtraSettings;
+ JavaApplicationSettingsView* mPublicView;
+ std::auto_ptr<java::storage::JavaStorage> mStorage;
+ std::wstring mSuiteUid;
+ // licalized strings used more than once: the translation is
+ // retrieved only once
+ QString TXT_BLANKET,TXT_SESSION,TXT_ONESHOT,TXT_DENIED,TXT_SECURITY_LEVEL,TXT_USER_DEFINED,TXT_SENSITIVE_SETTINGS,TXT_SENSITIVE_SETTINGS_NET_USAGE,TXT_MUTUALLY_EXCLUSIVE_SETTINGS,TXT_OK,TXT_CANCEL,TXT_SECURITY_WARNING_TITLE,TXT_NET_ACCESS,TXT_LOW_LEVEL_NET_ACCESS,TXT_NETWORK_CONNECTION,TXT_NETWORK_CONNECTION_CHANGE,TXT_SETTINGS_TITLE,TXT_SETTINGS_NOT_AVAILABLE;
+ CmApplSettingsUi* mNetConnSettingsUi;
+ CmApplSettingsUi::SettingSelection mNetConnSelection;
+ JavaApplicationSettings::NetworkConnection mNetConn;
+ int mNetSettIndex;
+ // own event loop used for "translating" asynchronous calls into
+ // synchronous calls
+ QEventLoop* mAsyncToSyncCallEventLoop;
+ // boolean for carying the user's input in between two async calls
+ bool mSecWarningAccepted;
+ // the default network connection used if user did not specify one
+ // or the user specified network connection became invalid
+ // (e.g. after removing the user defined snap)
+ int mDefaultConnId;
+ // list of installed translators: settings view uses own
+ // translator ("javaruntimeapplicationsettings")
+ // and for network settings it uses the cmmanager's translators:
+ // "cmapplsettingsui" and "cmmanager"
+ QList<QTranslator *> mTranslators;
+ QHash<QString, QString> mLocalizedSettingsNames;
+ // hash for associating settings names with indexes within
+ // vectors (mGeneralSettings, mSecuritySettings)
+ QHash<QString, int> mSettingsIndexes;
+ // hash for associating settings names with display indexes:
+ // a settings with lower index is shown before a settings
+ // with a higher index
+ QHash<QString, int> mSettingsNamesIndexes;
+};
+
+} // namespace settings
+} // namespace java
+
+
+#endif // JAVAAPPLICATIONSETTINGSVIEW_P_H
--- a/javamanager/preinstaller/src.s60/silentmidletinstall.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/preinstaller/src.s60/silentmidletinstall.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -449,7 +449,7 @@
LOG1WSTR(EJavaPreinstaller, EInfo,
"CSilentMIDletInstall::GetDirEntriesL Adding file %s",
(wchar_t *)(pathPtr.PtrZ()));
- aVector.Append(path);
+ aVector.AppendL(path);
CleanupStack::Pop(path);
}
--- a/javamanager/subsystem.mk Tue Jul 06 20:36:19 2010 +0300
+++ b/javamanager/subsystem.mk Fri Jul 09 16:35:45 2010 +0300
@@ -49,6 +49,11 @@
javasidchecker/build : javaregistry
endif
+ifdef RD_JAVA_APPLICATION_SETTINGS_QT
+COMPONENTS += javasettings_qt/build
+SYMBIAN_ONLY += javasettings_qt/build
+endif
+
# Declare that release preparation removes subdirectories not in build, except
# listed special cases
REMOVE_NOTBUILT_EXCLUDING = inc
--- a/javaruntimes/installer/starterdll/src/main.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/installer/starterdll/src/main.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -348,6 +348,12 @@
const int oldHeapSize = 512;
jvm->overrideOldHeapSize(oldHeapSize);
+#ifdef __WINSCW__
+ // Setting smaller max heap in the emulator.
+ const int maxHeapSize = 8 * 1024; // 8 MB
+ jvm->overrideMaxHeapSize(maxHeapSize);
+#endif // __WINSCW__
+
jvm->enableThreadDumping();
jvm->setMainClass(INSTALLER_MAIN_CLASS);
--- a/javaruntimes/javaruntimes.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/javaruntimes.pro Fri Jul 09 16:35:45 2010 +0300
@@ -19,6 +19,7 @@
SUBDIRS += installer/starterdll/build/javainstallerstarter.pro
SUBDIRS += installer/starterexe/build/javainstaller.pro
SUBDIRS += jvmargmodifier/file/build/javajvmargsmodifierfile.pro
-SUBDIRS += starter/build/java.pro
+SUBDIRS += standalone/build/javastarter.pro
+SUBDIRS += starter/build/javamidp.pro
SUBDIRS += midp
BLD_INF_RULES.prj_extensions += "prj_extensions"
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/Main.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/Main.java Fri Jul 09 16:35:45 2010 +0300
@@ -38,12 +38,14 @@
{
// Do the start up trace.
StartUpTrace.doTrace("Midp runtime ready");
- if (Log.mOn) Log.logI("Starting MIDP runtime");
-
- System.out.println("java.version: " +
- System.getProperty("java.version"));
- System.out.println("java.fullversion: " +
- System.getProperty("java.fullversion"));
+ if (Log.mOn)
+ {
+ Log.logI("Starting MIDP runtime");
+ Log.logI("java.version: " +
+ System.getProperty("java.version"));
+ Log.logI("java.fullversion: " +
+ System.getProperty("java.fullversion"));
+ }
boolean ok = true;
try
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java Fri Jul 09 16:35:45 2010 +0300
@@ -27,6 +27,8 @@
import java.security.AccessControlException;
+import com.nokia.mj.impl.gcf.PushSecurityUtils;
+
import com.nokia.mj.impl.rt.utils.ExtensionUtil;
import com.nokia.mj.impl.rt.utils.CmdLineArgsPermission;
@@ -992,16 +994,35 @@
DrmUtil.consumeRightsStart();
}
- // If the MIDlet launch is a result of auto invocation we need to
+ // If the MIDlet launch is a result of push auto invocation we need to
// ensure that user allows the start up.
- if ((mMainArgs.findArgument("-autoinvocation") != null) ||
- mAutoinvocationFromUrl)
+ if (mMainArgs.findArgument("-autoinvocation") != null)
{
- if (Log.mOn) Log.logI("Ensuring autoinvocation.");
+ if (Log.mOn) Log.logI("Ensuring push autoinvocation.");
String pushAdditionalInfo =
mMainArgs.findArgument("-autoInvocationAdditional");
if (Log.mOn) Log.logI(" addInfo: '" + pushAdditionalInfo + "'");
+ try
+ {
+ PushSecurityUtils.ensurePermission("autoinvocation",
+ pushAdditionalInfo);
+ }catch(SecurityException e)
+ {
+ // The user didn't allow starting. Throw StartupException and
+ // mark it as non fatal.
+ if (Log.mOn) Log.logI("Push autoinvocation NOT allowed.");
+ throw new StartupException(e.toString(),
+ false);
+ }
+ }
+
+ // If the MIDlet launch is triggered from url we need to
+ // ensure that user allows the start up.
+ if (mAutoinvocationFromUrl)
+ {
+ if (Log.mOn) Log.logI("Ensuring web start invocation.");
+
// ensure security
try
{
@@ -1009,10 +1030,10 @@
CmdLineArgsPermission cmdLineArgsPermission =
new CmdLineArgsPermission();
appUtils.checkPermission(cmdLineArgsPermission);
- if (Log.mOn) Log.logI("Autoinvocation allowed.");
+ if (Log.mOn) Log.logI("Web start invocation allowed.");
}catch(AccessControlException e)
{
- if (Log.mOn) Log.logI("Autoinvocation NOT allowed.");
+ if (Log.mOn) Log.logI("Web start invocation NOT allowed.");
throw new StartupException(e.toString(),
false);
}
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java Fri Jul 09 16:35:45 2010 +0300
@@ -198,7 +198,6 @@
}
catch (NumberFormatException ne)
{
- Log.logW("Error in getting localized name: " + nameStr, ne);
}
}
}
--- a/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -397,36 +397,36 @@
LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-App-Orientation not defined");
}
- // Check if the MIDlet has defined the MIDlet-Splash-Screen-Image
+ // Check if the MIDlet has defined the Nokia-MIDlet-Splash-Screen-Image
// JAD attribute.
std::auto_ptr<std::wstring> splashScreen
(getMidletAttributeFromStorage(*javaStorage.get(),
- L"MIDlet-Splash-Screen-Image"));
+ L"Nokia-MIDlet-Splash-Screen-Image"));
if (splashScreen.get() != 0)
{
std::transform(splashScreen->begin(), splashScreen->end(),
splashScreen->begin(), tolower);
if (*splashScreen == L"suppress")
{
- // If MIDlet-Splash-Screen-Image JAD attribute is suppress then
+ // If Nokia-MIDlet-Splash-Screen-Image JAD attribute is suppress then
// we start the UI into background.
- LOG(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image is suppress");
+ LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image is suppress");
uiParams.setScreenMode(NO_START_SCREEN);
uiParams.setBackgroundStart(true);
}
else
{
- // If MIDlet-Splash-Screen-Image JAD attribute is not suppress then
+ // If Nokia-MIDlet-Splash-Screen-Image JAD attribute is not suppress then
// we need to solve the root path of the MIDlet and provide that
// to the coreUI.
uiParams.setScreenMode(MIDLET_DEFINED_SCREEN);
- LOG1(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image, setPath to %S",
+ LOG1(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image, setPath to %S",
mMidletInfo->mMIDletRootPath.c_str());
}
}
else
{
- LOG(EJavaRuntime, EInfo, "MIDlet-Splash-Screen-Image not defined");
+ LOG(EJavaRuntime, EInfo, "Nokia-MIDlet-Splash-Screen-Image not defined");
uiParams.setScreenMode(DEFAULT_START_SCREEN);
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javaruntimes/starter/build/javamidp.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,52 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE=app
+TARGET=javamidp
+CONFIG += omj no_icon stl
+CONFIG -= qt
+
+include(../../../inc/build_defines.pri)
+
+symbian {
+
+contains(PROJECT_DEFINES,RD_JAVA_UI_QT) {
+ TARGET.EPOCSTACKSIZE = 81920
+}
+
+!contains(PROJECT_DEFINES,RD_JAVA_UI_QT) {
+ TARGET.EPOCSTACKSIZE = 16384
+}
+
+ TARGET.UID2 = 0x102033E6
+ TARGET.UID3 = 0x102033E6
+
+ TARGET.SID = 0x102033E6
+ TARGET.VID = 0x101FB657
+
+ TARGET.CAPABILITY = \
+ LocalServices NetworkServices ProtServ WriteDeviceData \
+ ReadDeviceData ReadUserData WriteUserData UserEnvironment \
+ SwEvent Location MultiMediaDD NetworkControl TrustedUI
+}
+# For wins the max heap is 16 MB and for arm it is 64 MB
+MMP_RULES += "$${LITERAL_HASH}ifdef WINSCW"
+MMP_RULES += "EPOCHEAPSIZE 0x00001000 0x01000000"
+MMP_RULES += "$${LITERAL_HASH}else // WINSCW"
+MMP_RULES += "EPOCHEAPSIZE 0x00001000 0x04000000"
+MMP_RULES += "$${LITERAL_HASH}endif // WINSCW"
+
+include(../../../build/omj.pri)
--- a/javaruntimes/starterutils/build/exports.inf Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/starterutils/build/exports.inf Fri Jul 09 16:35:45 2010 +0300
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -19,3 +19,7 @@
../inc/jvmstarter.h |../../../javaruntimes/inc/jvmstarter.h
../inc/runtimestarterutils.h |../../../javaruntimes/inc/runtimestarterutils.h
+
+#ifdef RD_JAVA_SYMBIAN_TARGET
+../src.s60/javaruntimeprivatecrkeys.h |../../../inc/javaruntimeprivatecrkeys.h
+#endif
\ No newline at end of file
--- a/javaruntimes/starterutils/inc/jvmstarter.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/starterutils/inc/jvmstarter.h Fri Jul 09 16:35:45 2010 +0300
@@ -258,6 +258,13 @@
virtual void overrideNewHeapSize(int heapSize) = 0;
/**
+ * Overrides the default max heap size.
+ * @param heapSize Heap size in kilo bytes.
+ * @throws std::exception on error cases
+ */
+ virtual void overrideMaxHeapSize(int heapSize) = 0;
+
+ /**
* Overrides the default stack of the native thread.
*
* @param stackSize Stack size in kilo bytes.
--- a/javaruntimes/starterutils/src.s60/j9starters60.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/starterutils/src.s60/j9starters60.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -129,8 +129,15 @@
mJvmArgs.push_back(L"-Xmine16K"); // Minimum size for heap expansion.
mJvmArgs.push_back(L"-Xmns64K"); // Initial new space size. Keep this in sync with MemoryLogger.java
mJvmArgs.push_back(L"-Xmos64K"); // Initial old space size. Keep this in sync with MemoryLogger.java
+
+#ifdef __WINSCW__
mJvmArgs.push_back(L"-Xmox16M"); // Maximum old space size.
mJvmArgs.push_back(L"-Xmx16M"); // Memory maximum.
+#else // __WINSCW__
+ mJvmArgs.push_back(L"-Xmox64M"); // Maximum old space size.
+ mJvmArgs.push_back(L"-Xmx64M"); // Memory maximum.
+#endif // __WINSCW__
+
mJvmArgs.push_back(L"-Xmco16k"); // ROM class segment increment.
mJvmArgs.push_back(L"-Xmr1k"); // Remembered set size.
@@ -165,6 +172,24 @@
mJvmArgs.push_back(oldSpace);
}
+
+void J9StarterS60::overrideMaxHeapSize(int heapSize)
+{
+ JELOG2(EJavaRuntime);
+ std::wstring heapAsString(JavaCommonUtils::intToWstring(heapSize));
+ doOverideHeap(L"-Xmox", heapAsString);
+ doOverideHeap(L"-Xmx", heapAsString);
+}
+
+void J9StarterS60::doOverideHeap(const std::wstring& arg, const std::wstring& size)
+{
+ JELOG2(EJavaRuntime);
+ std::wstring maxHeapArg(arg);
+ maxHeapArg += size;
+ maxHeapArg += L"K";
+ mJvmArgs.push_back(maxHeapArg);
+}
+
void J9StarterS60::overrideNewHeapSize(int heapSize)
{
JELOG2(EJavaRuntime);
--- a/javaruntimes/starterutils/src.s60/j9starters60.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/starterutils/src.s60/j9starters60.h Fri Jul 09 16:35:45 2010 +0300
@@ -74,6 +74,11 @@
/**
* @see jvmstarter.h
*/
+ virtual void overrideMaxHeapSize(int heapSize);
+
+ /**
+ * @see jvmstarter.h
+ */
virtual void overrideNativeStackSize(int stackSize);
/**
@@ -106,6 +111,15 @@
* @param odcFile Th ODC file to be appended.
*/
void appendOdcFile(const std::wstring& odcFile);
+
+ /**
+ * Internal utility for setting max heap sizes in kB. Used to
+ * set -Xmx and -Xmox vm args.
+ * @param arg String containing either -Xmx or -Xmox (not checked).
+ * @param size Size of the heap as string in kilo bytes.
+ */
+ void doOverideHeap(const std::wstring& arg, const std::wstring& size);
+
#ifdef __WINSCW__ // codescanner::ifpreprocessor
/**
--- a/javaruntimes/subsystem.mk Tue Jul 06 20:36:19 2010 +0300
+++ b/javaruntimes/subsystem.mk Fri Jul 09 16:35:45 2010 +0300
@@ -26,7 +26,8 @@
installer/starterexe/build \
jvmargmodifier/default/build \
jvmargmodifier/file/build \
- starterutils/build
+ starterutils/build \
+ standalone/build \
ifdef RD_JAVA_S60_RELEASE_5_0_IAD
COMPONENTS += starter/build.iad
@@ -37,5 +38,6 @@
starterutils/build: jvmargmodifier/default/build
midp: starterutils/build
installer/starterdll/build: starterutils/build
+standalone/build: starterutils/build
include ${JAVA_SRC_ROOT}/build/Makefile.subsystem
Binary file javatools/javasecuritycustomization/policyeditor/bin/securitypolicyeditor.jar has changed
--- a/javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java Fri Jul 09 16:35:45 2010 +0300
@@ -18,6 +18,7 @@
package com.nokia.mj.tools.security.midp;
import java.util.Vector;
+import java.util.Hashtable;
import java.io.IOException;
import java.io.FileInputStream;
import java.util.StringTokenizer;
@@ -46,7 +47,7 @@
* domain: 'domain' Identifier ';' grant+;
* grant: 'grant' (grant_user | grant_allowed | grant_assigned);
* grant_allowed: 'allowed' permissions;
- * grant_assigned: 'assigned' permissions;
+ * grant_assigned: 'assigned' grant_name? (initial_mode other_modes permissions)? permissions;
* grant_user: 'user' grant_name initial_mode other_modes permissions;
* grant_name: '"' Identifier '"';
* permissions: '{' permission+ '}';
@@ -70,6 +71,7 @@
private SecurityPolicy securityPolicy;
private static String destPath;
private static final String POLICY_FILE_EXTENSION = ".txt";
+ private Hashtable allSettings = new Hashtable();
public static void main(String[] args)
{
@@ -159,14 +161,17 @@
}
domain = extractToken(';');
Vector perms = new Vector();
+ Vector unconfirmedPerms = new Vector();
find("grant");
while (offset < policy.length)
{
SecurityPolicyPermissionSettings settings = null;
+ SecurityPolicyPermissionSettings unconfirmedSettings = null;
int type = getType(extractToken());
+ String settingsName = null;
if (type == PolicyBasedPermission.USER_TYPE)
{
- String settingsName = extractToken('"', '"');
+ settingsName = extractToken('"', '"');
check(settingsName, "User grant group without name");
// trim off the leading and trailing double-quotes
if (settingsName.startsWith("\""))
@@ -192,6 +197,44 @@
interactionModes);
settings = new SecurityPolicyPermissionSettings(settingsName,
currentInteractionMode, allowedInteractionModes);
+ allSettings.put(settingsName, settings);
+ }
+ else if (type == PolicyBasedPermission.ASSIGNED_TYPE)
+ {
+ settingsName = extractToken('"', '"');
+ if (settingsName != null
+ && settingsName.length() > 0
+ && settingsName.indexOf("{") == -1)
+ {
+ type = PolicyBasedPermission.USER_ASSIGNED_TYPE;
+ settings = (SecurityPolicyPermissionSettings)allSettings.get(
+ settingsName);
+ if (settings == null)
+ {
+ // parse the rest of the settings and store it as
+ // unconfirmed settings: after all the parsing is
+ // done go through the unconfirmed settings and
+ // replace them with settings from user permissions
+ // (if found) or use the unconfirmed settings if no
+ // other user settings were found
+ String strInteractionModes = extractToken('{');
+ String[] interactionModes = split(strInteractionModes,",");
+ if (interactionModes != null && interactionModes.length > 0)
+ {
+ int currentInteractionMode = getInteractionMode(
+ interactionModes[0]);
+ int[] allowedInteractionModes = getInteractionModes(
+ interactionModes);
+ unconfirmedSettings = new SecurityPolicyPermissionSettings(
+ settingsName, currentInteractionMode, allowedInteractionModes);
+ }
+ else
+ {
+ unconfirmedSettings = new SecurityPolicyPermissionSettings(
+ settingsName);
+ }
+ }
+ }
}
find("permission");
while (offset < policy.length && policy[offset] != '}')
@@ -246,28 +289,75 @@
// return multiple permissions with simple actions. This step is
// to be removed when APIs support composite actions
String[] actions = split(pActionList,",");
+ if (unconfirmedSettings != null
+ && unconfirmedSettings.getCurrentInteractionMode()
+ == UserSecuritySettings.UNDEFINED_INTERACTION_MODE)
+ {
+ // discard the settings since they are not vald
+ unconfirmedSettings = null;
+ }
if (actions != null)
{
for (int i=0; i<actions.length; i++)
{
- perms.add(getPermission(pName,
- pTarget, actions[i], type, settings));
+ if (unconfirmedSettings == null)
+ {
+ perms.add(getSecurityPolicyPermission(
+ pName, pTarget, actions[i], type, settings));
+ }
+ else
+ {
+ unconfirmedPerms.add(getSecurityPolicyPermission(
+ pName, pTarget, actions[i], type, unconfirmedSettings));
+ }
}
}
else
{
- perms.add(getPermission(pName,
- pTarget, pActionList, type, settings));
+ if (unconfirmedSettings == null)
+ {
+ perms.add(getSecurityPolicyPermission(
+ pName, pTarget, pActionList, type, settings));
+ }
+ else
+ {
+ unconfirmedPerms.add(getSecurityPolicyPermission(
+ pName, pTarget, pActionList, type, unconfirmedSettings));
+ }
}
find("permission");
}
find("grant", true);
}
- if (perms.size() == 0)
+ if (perms.size() == 0 && unconfirmedPerms.size() == 0)
{
throw new IllegalArgumentException(
"Invalid security policy - missing/invalid permissions information");
}
+ // confirm the unconfirmed permissions: look for settings in the perms ->
+ // if found then use those settings, otherwise use the unconfirmed settings
+ for(int i=0; i<unconfirmedPerms.size(); i++)
+ {
+ SecurityPolicyPermission unconfirmedPerm =
+ (SecurityPolicyPermission) unconfirmedPerms
+ .elementAt(i);
+ SecurityPolicyPermissionSettings confirmedSettings =
+ (SecurityPolicyPermissionSettings)allSettings
+ .get(unconfirmedPerm.getUserSecuritySettings().getName());
+ if (confirmedSettings != null)
+ {
+ perms.add(getSecurityPolicyPermission(
+ unconfirmedPerm.getName(),
+ unconfirmedPerm.getTarget(),
+ unconfirmedPerm.getActionList(),
+ unconfirmedPerm.getType(),
+ confirmedSettings));
+ }
+ else
+ {
+ perms.add(unconfirmedPerm);
+ }
+ }
SecurityPolicyPermission[] permissions
= new SecurityPolicyPermission[perms.size()];
perms.copyInto(permissions);
@@ -463,22 +553,18 @@
tokens.copyInto(strTokens);
return strTokens;
}
-
- private SecurityPolicyPermission getPermission(String pName,
- String pTarget,
- String pAction,
- int pType,
- SecurityPolicyPermissionSettings pSettings)
+
+ private SecurityPolicyPermission getSecurityPolicyPermission(
+ String name,
+ String target,
+ String actionList,
+ int type,
+ SecurityPolicyPermissionSettings settings)
{
- if (pSettings == null)
+ if (settings == null && type == PolicyBasedPermission.USER_ASSIGNED_TYPE)
{
- return new SecurityPolicyPermission(
- pName, pTarget, pAction, pType);
+ return new SecurityPolicyPermission(name, target, actionList, PolicyBasedPermission.ASSIGNED_TYPE);
}
- else
- {
- return new SecurityPolicyPermission(
- pName, pTarget, pAction, pSettings);
- }
+ return new SecurityPolicyPermission(name, target, actionList, type, settings);
}
}
--- a/javatools/tckrunner/runner/src/tckrunnernative.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javatools/tckrunner/runner/src/tckrunnernative.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -58,12 +58,13 @@
{
int rc = 0;
- const char* av[MAX_PARAMS + 5];
+ const char* av[MAX_PARAMS + 6];
int index = 0;
av[index++] = java::runtime::JAVA_PROCESS;
av[index++] = java::runtime::JAVA_INSTALLER_STARTER_DLL;
av[index++] = "poll";
av[index++] = "-address=tck";
+ av[index++] = "-drive=C";
int args = aEnv->GetArrayLength(aArgs);
char** installerArgs = new char*[args];
--- a/javatools/tckrunner/starter/src/main.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javatools/tckrunner/starter/src/main.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -92,6 +92,12 @@
// starterUtils->enableDevelopmentFeatures(*jvm.get());
// jvm->enableThreadDumping();
+#ifdef __WINSCW__
+ // Setting smaller max heap in the emulator.
+ const int maxHeapSize = 2 * 1024; // 2 MB
+ jvm->overrideMaxHeapSize(maxHeapSize);
+#endif // __WINSCW__
+
jvm->appendSystemProperty(L"-Dcom.nokia.rt.port=tckrunner");
jvm->setMainClass(TCK_RUNNER_MAIN_CLASS);
--- a/javauis/amms_qt/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/amms_qt/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -23,15 +23,6 @@
<!--property name="java.src.paths" value="../javasrc:../src_tuner/javasrc"/-->
<property name="java.src.paths" value="../javasrc"/>
- <!-- Needed by the utilities.xml. See the description form the utilities.xml
- file -->
-
- <target name="compile">
- <omj.javac classpath="${compile.result.root}/javamobilemedia/classes/first:${compile.result.root}/javautils/classes/first"/>
- </target>
-
- <!-- Needed by the utilities.xml. See the description form the utilities.xml
- file -->
<property name="javah.classnames"
value="com.nokia.amms.control.audioeffect.EqualizerControl,
com.nokia.amms.control.audioeffect.ReverbControl,
--- a/javauis/amms_qt/src_tuner/javasrc/com/nokia/amms/control/tuner/TunerControlImpl.java Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class implements
- * javax.microedition.amms.control.tuner.TunerControl
- *
-*/
-
-
-package com.nokia.amms.control.tuner;
-
-import javax.microedition.media.MediaException;
-import javax.microedition.media.Control;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlayerImpl;
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.microedition.media.control.ControlImpl;
-import com.nokia.mj.impl.rt.legacy.NativeError;
-
-public class TunerControlImpl
- extends ControlImpl
- implements javax.microedition.amms.control.tuner.TunerControl
-{
- //preset name max length
- private static final int MAX_PRESET_NAME_LENGTH = 100;
- //max number of presets
- private static final int MAX_NUMBER_OF_PRESETS = 20;
- //all frequencys are in 100 Hertzs
- private static final int HERTZ_MULTIPLIER = 100;
-
- /**
- * Constructor
- */
- public TunerControlImpl()
- {
- //JDEBUG( "AMMS TunerControlImpl Constructor" );
- }
-
- /**
- * Gets the minimum frequency supported by this tuner
- * with the given modulation.
- *
- * @param modulation The modulation whose supported minimum frequency
- * is asked.
- * @return The minimum frequency in 100 Hertzs.
- * @throws IllegalArgumentException if the <code>modulation</code> is not supported or it is null.
- */
- public int getMinFreq(String aModulation)
- {
- if (aModulation != MODULATION_FM)
- {
- throw new IllegalArgumentException("Modulation is not valid.");
- }
-
- int minFreq = _getMinFreq(iEventSource,
- iControlHandle);
-
- NativeError.check(minFreq);
-
- return minFreq / HERTZ_MULTIPLIER;
- }
-
- /**
- * Gets the maximum frequency supported by this tuner
- * with the given modulation.
- *
- * @param modulation The modulation whose supported maximum frequency
- * is asked.
- * @return The maximum frequency in 100 Hertzs.
- * @throws IllegalArgumentException if the <code>modulation</code> is not supported or it is null.
- */
- public int getMaxFreq(String aModulation)
- {
- if (aModulation != MODULATION_FM)
- {
- throw new IllegalArgumentException("Modulation is not valid.");
- }
-
- int maxFreq = _getMaxFreq(iEventSource,
- iControlHandle);
-
- NativeError.check(maxFreq);
-
- return maxFreq / HERTZ_MULTIPLIER;
- }
-
- /**
- * Tunes to the given frequency or to the closest supported frequency.
- *
- * @param freq The frequency in 100 Hertzs that will be taken into use.
- * If that frequency is not supported, the closest supported
- * frequency will be taken into use.
- *
- * @param modulation The modulation to be used. <code>TunerControl</code> specifies
- * predefined constants <code>MODULATION_FM</code> and <code>MODULATION_AM</code>
- * but other modulations can be supported as well. Supported modulations can be queried
- * by <code>System</code> property <code>tuner.modulations</code>.
- *
- * @throws IllegalArgumentException if <code>freq</code> is not inside the frequency band supported
- * by the device or if the <code>modulation</code> is not supported or the <code>modulation</code> is null.
- *
- * @return the frequency in 100 Hertzs that was taken into use.
- */
- public int setFrequency(int aFreq, String aModulation)
- {
- if (aModulation != MODULATION_FM)
- {
- throw new IllegalArgumentException("Modulation is not valid.");
- }
-
- int freqInUse = _setFrequency(iEventSource,
- iControlHandle,
- aFreq * HERTZ_MULTIPLIER);
-
- NativeError.check(freqInUse);
-
- return freqInUse / HERTZ_MULTIPLIER;
- }
-
- /**
- * Gets the frequency which the tuner has been tuned to.
- *
- * @return The frequency to which the device has been tuned, in 100 Hertzs.
- */
- public int getFrequency()
- {
- int freq = _getFrequency(iEventSource, iControlHandle);
-
- NativeError.check(freq);
-
- return freq / HERTZ_MULTIPLIER;
- }
-
- /**
- * <p>Seeks for the next broadcast signal. If the end of the Player's
- * frequency band is reached before a signal was found, the scan
- * continues from the other end until a signal is found or the
- * starting frequency is reached.</p>
- *
- * <p>After seeking, the frequency of the Player is the one that
- * was returned or if nothing was found, the original frequency.</p>
- *
- * @param startFreq the frequency in 100 Hertzs wherefrom the scan starts (inclusive)
- *
- * @param modulation The modulation to be used. <code>TunerControl</code> specifies
- * predefined constants <code>MODULATION_FM</code> and <code>MODULATION_AM</code>
- * but other modulations can be supported as well. Supported modulations can be queried
- * by <code>System</code> property <code>tuner.modulations</code>.
- * @param upwards if <code>true</code>, the scan proceeds towards higher frequencies,
- * otherwise towards lower frequencies
- *
- * @return The found frequency in 100 Hertzs or, if no signal was found, 0.
- *
- * @throws IllegalArgumentException if <code>startFreq</code> is not between the supported minimum
- * and maximum frequencies or if the <code>modulation</code> is null.
- * @throws MediaException if the seek functionality is not available for the given modulation.
- */
- public int seek(int aStartFreq, String aModulation, boolean aUpwards)
- throws MediaException
- {
- if (aModulation != MODULATION_FM)
- {
- throw new IllegalArgumentException("Modulation is not valid.");
- }
-
- int foundFreq = _seek(iEventSource,
- iControlHandle,
- aStartFreq * HERTZ_MULTIPLIER,
- aUpwards);
-
- NativeError.check(foundFreq);
-
- return foundFreq / HERTZ_MULTIPLIER;
- }
-
- /**
- * Gets the current squelching (muting in frequencies without broadcast)
- * setting.
- *
- * @return <code>true</code> if squelch is on or <code>false</code> if squelch is off.
- */
- public boolean getSquelch()
- {
- int retValue = _getSquelch(iEventSource, iControlHandle);
-
- NativeError.check(retValue);
-
- if (retValue == NativeError.KErrNone)
- {
- return true;
- }
-
- return false;
- }
-
- /**
- * Sets squelching on or off. Squelching means muting the frequencies
- * that do not contain radio broadcast.
- *
- * @param squelch <code>true</code> to turn the squelch on or <code>false</code> to turn the squelch off.
- * @throws MediaException if the given squelch setting is not supported.
- */
- public void setSquelch(boolean aSquelch) throws MediaException
- {
- int err = _setSquelch(iEventSource, iControlHandle, aSquelch);
-
- NativeError.check(err);
- }
-
- /**
- * Gets the modulation in use.
- *
- * @return The modulation currently in use.
- */
- public String getModulation()
- {
- //only FM modulation is supported
- return MODULATION_FM;
- }
-
- /**
- * Gets the strength of the recepted signal.
- *
- * @return A value between 0 and 100 where 0 means the faintest and 100 the strongest possible signal strength.
- * @throws MediaException if querying the signal strength is not supported.
- */
- public int getSignalStrength() throws MediaException
- {
- int signalStrength = _getSignalStrength(iEventSource,
- iControlHandle);
-
- if (signalStrength != NativeError.KErrNone)
- {
- throw new MediaException("Signal strength is not supported.");
- }
-
- return signalStrength;
- }
-
- /**
- * Gets the stereo mode in use.
- *
- * @return The stereo mode in use. Stereo mode is one of <code>MONO</code>,
- * <code>STEREO</code> or <code>AUTO</code>.
- */
- public int getStereoMode()
- {
- int stereoMode = _getStereoMode(iEventSource, iControlHandle);
-
- NativeError.check(stereoMode);
-
- return stereoMode;
- }
-
- /**
- * Sets the stereo mode.
- *
- * @param mode The stereo mode to be used. Stereo mode is one of <code>MONO</code>,
- * <code>STEREO</code> or <code>AUTO</code>.
- * @throws IllegalArgumentException if the given mode is not supported.
- */
- public void setStereoMode(int aStereoMode)
- {
- if (aStereoMode != MONO && aStereoMode != STEREO && aStereoMode != AUTO)
- {
- throw new IllegalArgumentException();
- }
-
- int err = _setStereoMode(iEventSource, iControlHandle, aStereoMode);
-
- if (err != NativeError.KErrNone)
- {
- throw new IllegalArgumentException("Stereo mode is not supported.");
- }
- }
-
- /**
- * Gets the number of presets. The numbering of presets starts from one and the largest
- * preset number equals the value returned from this method.
- *
- * @return The number of presets, or zero if the presets are not supported.
- */
- public int getNumberOfPresets()
- {
-
- return 0;
- }
-
- /**
- * Tunes the tuner by using settings specified in the preset. Changes to
- * presets following a <code>usePreset</code> call do not tune the tuner automatically.
- *
- * @param preset the preset to be used.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets.
- */
- public void usePreset(int aPreset)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
- int err = _usePreset(iEventSource, iControlHandle, aPreset);
-
- NativeError.check(err);
- }
-
- /**
- * Configures the preset using current frequency and modulation
- * (and stereo mode if native presets support storing it).
- *
- * @param preset the preset to be set.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of preset range.
- * @throws SecurityException if setting presets has been prohibited.
- */
- public void setPreset(int aPreset)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
- int err = _setPreset(iEventSource, iControlHandle, aPreset);
-
- NativeError.check(err);
- }
-
- /**
- * Configures the preset using given settings.
- * The stereo mode might not be stored if it is not supported by the presets.
- * (In that case, <code>IllegalArgumentException</code> is not thrown.)
- *
- * @param preset the preset to be configured.
- * @param freq the frequency of the preset in 100 Hertzs.
- * @param mod the modulation of the preset.
- * @param stereoMode the stereo mode of the preset.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets or
- * <code>freq</code> or <code>modulation</code> are not available or if the <code>modulation</code> is null or if <code>stereoMode</code> is not a supported stereo mode.
- * @throws SecurityException if setting presets has been prohibited.
- */
- public void setPreset(int aPreset, int aFreq, String aModulation, int aStereoMode)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
- if (aModulation != MODULATION_FM)
- {
- throw new IllegalArgumentException("Modulation is not valid.");
- }
- if (aStereoMode != MONO && aStereoMode != STEREO && aStereoMode != AUTO)
- {
- throw new IllegalArgumentException("Stereo mode is not supported.");
- }
-
- int err = _setPreset(iEventSource, iControlHandle, aPreset, aFreq * HERTZ_MULTIPLIER, aStereoMode);
-
- NativeError.check(err);
- }
-
- /**
- * Gets the preset's frequency.
- *
- * @param preset the preset whose frequency is to be returned.
- * @return The frequency of the preset in 100 Hertzs.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets.
- */
- public int getPresetFrequency(int aPreset)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
-
- int presetFreq = _getPresetFrequency(iEventSource, iControlHandle, aPreset);
-
- NativeError.check(presetFreq);
-
- return presetFreq / HERTZ_MULTIPLIER;
- }
-
- /**
- * Gets the preset's modulation.
- *
- * @param preset the preset whose modulation is to be returned.
- * @return The modulation of the preset.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets.
- */
- public String getPresetModulation(int aPreset)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
- return MODULATION_FM;
- }
-
- /**
- * Gets the preset's stereo mode.
- *
- * @param preset the preset whose stereo mode is to be returned.
- * @return The stereo mode of the preset. Stereo mode is one of
- * <code>MONO</code>, <code>STEREO</code> or <code>AUTO</code>.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets.
- * @throws MediaException if the presets do not support storing of the stereo mode.
- */
- public int getPresetStereoMode(int aPreset) throws MediaException
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
-
- int presetStereoMode = _getPresetStereoMode(iEventSource, iControlHandle, aPreset);
-
- NativeError.check(presetStereoMode);
-
- return presetStereoMode;
- }
-
- /**
- * Gets the preset name.
- *
- * @param preset the preset whose name is to be returned.
- * @return A <code>String</code> containing the preset name.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets.
- */
- public String getPresetName(int aPreset)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
-
- int[] error = new int[ 1 ];
-
- String presetName = _getPresetName(iEventSource, iControlHandle, aPreset, error);
-
- NativeError.check(error[ 0 ]);
-
- return presetName;
- }
-
- /**
- * Sets the preset name.
- *
- * @param preset the preset whose name is to be set.
- * @param name the name of the preset.
- * @throws IllegalArgumentException if <code>preset</code> < 1 or <code>preset</code> > number of presets or
- * if the <code>name</code> is null.
- * @throws SecurityException if setting presets has been prohibited.
- */
- public void setPresetName(int aPreset, String aName)
- {
- if (aPreset < 0 || aPreset > MAX_NUMBER_OF_PRESETS)
- {
- throw new IllegalArgumentException("Preset out of preset range.");
- }
- if (aName.length() > MAX_PRESET_NAME_LENGTH)
- {
- throw new IllegalArgumentException("Preset name too long");
- }
-
- int err = _setPresetName(iEventSource, iControlHandle, aPreset, aName);
-
- NativeError.check(err);
- }
-
-
- private native int _getMinFreq(int aEventSourceHandle,
- int aTunerControlHandle);
-
- private native int _getMaxFreq(int aEventSourceHandle,
- int aTunerControlHandle);
-
- private native int _setFrequency(int aEventSourceHandle,
- int aTunerControlHandle,
- int aFreq);
-
- private native int _getFrequency(int aEventSourceHandle,
- int aTunerControlHandle);
-
-
- private native int _seek(int aEventSourceHandle,
- int aTunerControlHandle,
- int aStartFreq,
- boolean aUpwards);
-
- private native int _getSquelch(int aEventSourceHandle,
- int aTunerControlHandle);
-
- private native int _setSquelch(int aEventSourceHandle,
- int aTunerControlHandle,
- boolean aSquelch);
-
- private native int _getSignalStrength(int aEventSourceHandle,
- int aTunerControlHandle);
-
- private native int _getStereoMode(int aEventSourceHandle,
- int aTunerControlHandle);
-
- private native int _setStereoMode(int aEventSourceHandle,
- int aTunerControlHandle,
- int aStereoMode);
-
- private native int _usePreset(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset);
-
- private native int _setPreset(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset);
-
- private native int _setPreset(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset,
- int aFreq,
- int aStereoMode);
-
- private native int _getPresetFrequency(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset);
-
- private native int _getPresetStereoMode(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset);
-
- private native int _setPresetName(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset,
- String aName);
-
- private native String _getPresetName(int aEventSourceHandle,
- int aTunerControlHandle,
- int aPreset,
- int[] aError);
-
-
-}
--- a/javauis/amms_qt/src_tuner/javasrc/com/nokia/microedition/media/protocol/capture/radio/Protocol.java Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is capture://radio protocol
- *
-*/
-
-package com.nokia.microedition.media.protocol.capture.radio;
-
-import com.nokia.microedition.media.Locator;
-import com.nokia.microedition.media.InternalPlayer;
-import com.nokia.microedition.media.PlayerImpl;
-import javax.microedition.media.MediaException;
-import com.nokia.mj.impl.rt.legacy.NativeError;
-import com.nokia.microedition.media.ManagerImpl;
-import com.nokia.amms.control.tuner.TunerControlImpl;
-
-/**
- * This class is capture://radio protocol.
- */
-public class Protocol
- implements com.nokia.microedition.media.protocol.Protocol
-{
- // Constants
- private static final String TUNER_CONTROL_NAME =
- "javax.microedition.amms.control.tuner.TunerControl";
-
- /**
- * Default constructor.
- */
- public Protocol()
- {
- }
-
- /**
- * From Protocol
- */
- public InternalPlayer createPlayer(Locator aLocator)
- throws java.io.IOException,
- MediaException,
- java.lang.SecurityException
- {
- // JDEBUG( "AMMS Tuner Protocol createPlayer" );
-
- String locatorParameters = aLocator.getParameters();
-
- // Create native tuner player. The native tuner player
- // creates a native tuner control and adds it to its list.
- // Handle for the native player are returned.
- int playerHandle = 0;
- playerHandle = _createNativeTunerPlayer(
- ManagerImpl.getEventSource(),
- locatorParameters);
-
-// JDEBUG( "AMMS Tuner Protocol createPlayer playerHandle = " + playerHandle );
-
- NativeError.check(playerHandle);
-
- PlayerImpl tunerPlayer = new PlayerImpl(playerHandle);
-
- return tunerPlayer;
- }
-
- /**
- * Creates native tuner player.
- * Native tuner player creates and adds native tuner control.
- *
- * @param aEventSourceHandle Handle to event source.
- * @param aLocatorParameters
- * @return Error code.
- */
- private native int _createNativeTunerPlayer(int aEventSourceHandle,
- String aLocatorParameters);
-}
--- a/javauis/amms_qt/src_tuner/native/external_include/fmradioenginecrkeys.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Definition of central repository keys for FM Radio Engine.
-*
-*/
-
-
-#ifndef FMRADIOENGINECRKEYS_H
-#define FMRADIOENGINECRKEYS_H
-
-// FM Radio Engine UID
-const TUid KCRUidFMRadioEngine = {0x101F7CBC};
-
-// Radio headset volume
-const TUint32 KRadioHeadsetVolume = 0x00000001;
-
-// Radio speaker volume
-const TUint32 KRadioSpeakerVolume = 0x00000002;
-
-// The last played radio frequency
-const TUint32 KFmRadioFrequency = 0x00000003;
-
-// The last played radio channel
-const TUint32 KFmRadioChannel = 0x00000004;
-
-// The radio mode before radio off
-const TUint32 KFmRadioMode = 0x00000005;
-
-// The first preset channel's location in central repository
-const TUint32 KFmRadioPresetChannel1 = 0x0000000A;
-
-#endif // FMRADIOENGINECRKEYS_H
-
-// End of file
-
-
--- a/javauis/amms_qt/src_tuner/native/external_include/tuner.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,2535 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for Tuner component.
-*
-*/
-
-
-#ifndef TUNER_H
-#define TUNER_H
-
-#include <e32base.h>
-#include <MCustomCommand.h>
-#include <mmf/common/mmfbase.h>
-#include <mmf/common/mmfutilities.h>
-#include <mmf/common/mmfcontrollerframework.h>
-#include <mmf/common/mmfstandardcustomcommands.h>
-#include <mmf/common/mmfaudio.h>
-#include <Mda/Common/audio.h>
-class RRadioSession;
-
-/**
-@file
-@publishedAll
-@prototype
-*/
-/**
-The Tuner Capabilities structure defines the capabilities of the tuner
-on the device, as retrieved using the function GetCapabilities.
-*/
-class TTunerCapabilities
-{
-public:
- inline TTunerCapabilities();
- inline TTunerCapabilities(TUint32 aTunerBands, TUint32 aAdditionalFunctions);
-public:
- /**
- Bitfield (as defined by CMMTunerUtility::TTunerBand) with the bits of the
- supported bands set
- */
- TUint32 iTunerBands;
-
- /** Tuner Function bit flags - may be extended in future */
- enum TTunerFunctions
- {
- /** Recording of Tuner Audio is possible */
- ETunerFunctionRecording = 0x01,
- /** Tuner can record and play back simultaneously */
- ETunerFunctionSimultaneousPlayAndRecord = 0x02,
- /** The tuner requires an external antenna (e.g. a headset) to function */
- ETunerFunctionRequiresAntenna = 0x04,
- /** CMMRdsTunerUtility supported */
- ETunerFunctionRds = 0x08,
- /** The tuner can be used when the device is in flight mode */
- ETunerFunctionAvailableInFlightMode = 0x10
- };
-
- /** Bitfield (as defined by ETunerFunctions) with the bits of the supported functions set */
- TUint32 iAdditionalFunctions;
-};
-
-/**
-Class representing a frequency.
-*/
-class TFrequency
-{
-public:
- inline TFrequency();
- explicit inline TFrequency(TInt aFrequency);
- inline TInt operator==(const TFrequency& aFrequency) const;
- inline TInt operator!=(const TFrequency& aFrequency) const;
- inline TInt operator> (const TFrequency& aFrequency) const;
- inline TInt operator>=(const TFrequency& aFrequency) const;
- inline TInt operator< (const TFrequency& aFrequency) const;
- inline TInt operator<=(const TFrequency& aFrequency) const;
-public:
- /**
- The Frequency, in Hertz. A TInt is at least 32 bits, giving a maximum frequency
- of at least 2.4GHz (i.e. 0x7fffffff Hz)
- */
- TInt iFrequency;
-};
-
-
-class MMMTunerObserver;
-class MMMTunerChangeObserver;
-class MMMTunerStereoObserver;
-class MMMSignalStrengthObserver;
-class MMMTunerAudioPlayerObserver;
-class MMMTunerAudioRecorderObserver;
-class CMMTunerAudioPlayerUtility;
-class CMMTunerAudioRecorderUtility;
-class CMMTunerScannerUtility;
-class CMMRdsTunerUtility;
-
-/**
-The MMF Tuner API is present to allow clients to control
-the tuner hardware present on a device.
-*/
-class CMMTunerUtility : public CBase
-{
- friend class CMMTunerAudioPlayerUtility;
- friend class CMMTunerAudioRecorderUtility;
- friend class CMMTunerScannerUtility;
- friend class CMMRdsTunerUtility;
-public:
- /** Tuner Band bit flags - may be extended in future */
- enum TTunerBand
- {
- ETunerNoBand = 0x00,
- /** Long Wave - uses frequencies */
- ETunerBandLw = 0x01,
- /** Amplitude Modulation or Medium Wave - uses frequencies */
- ETunerBandAm = 0x02,
- /** Frequency Modulation, European and American band - uses frequencies */
- ETunerBandFm = 0x04,
- /** Frequency Modulation, Japanese band - uses frequencies */
- ETunerBandJapaneseFm = 0x08,
- /** Digital Audio Broadcasting - uses channels */
- ETunerBandDab = 0x10,
- /** Digital Video Broadcasting */
- ETunerBandDvb = 0x20
- };
- /**
- Search direction enumeration
- */
- enum TSearchDirection
- {
- /** Search for stations upwards - i.e. by increasing frequency */
- ESearchDirectionUp = 1,
- /** Search for stations downwards - i.e. by decreasing frequency */
- ESearchDirectionDown
- };
- /**
- The Tuner Access Priority enables clients to correctly identify their needs
- when it comes to accessing the tuner. A process must have the MultimediaDD
- capability to use priorities greater than ETunerAccessPriorityNormal.
- */
- enum TTunerAccessPriority
- {
- /** Radio accessible when device is idle */
- ETunerAccessPriorityBackground = -100,
- /** Ordinary application priority */
- ETunerAccessPriorityNormal = 0,
- /** Radio is to be used as an alarm sound */
- ETunerAccessPriorityAlarm = 75,
- /** System use only */
- ETunerAccessPrioritySystem = 100
- };
- /**
- Bitmasks to indicate what state the tuner is in.
- */
- enum TTunerState
- {
- /**
- Tuner is active, and can therefore report frequency etc. If this bit is
- not set, none of the others should be set.
- */
- ETunerStateActive = 0x01,
- /** The tuner is playing sound. */
- ETunerStatePlaying = 0x02,
- /** The tuner is currently recording. */
- ETunerStateRecording = 0x04,
- /** The tuner is currently retuning or searching for a new station. */
- ETunerStateRetuning = 0x08,
- };
-public:
-
- /**
- Factory function to create a new instance of the Tuner. Tuner access priority
- setting is required to ensure that applications such as alarms using the radio
- as an alarm sound are not prevented from doing so by other clients. Priority
- setting is needed for audio output when accessing the sound device. Tuner is
- ready for use on return from this function.
-
- @param aObserver The observer object for receiving async completion callbacks
- @param aTunerIndex An index from 0 to TunersAvailable() - 1 specifying the tuner
- device to use.
- @param aAccessPriority Tuner access priority value
- @leave KErrNoMemory Out of memory
- @leave KErrNotFound The specified tuner or tuner controller is not present
- @return A pointer and ownership of the fully constructed CMMTunerUtility object
- */
- IMPORT_C static CMMTunerUtility* NewL(MMMTunerObserver& aObserver,
- TTunerBand aBand,
- TInt aTunerIndex,
- CMMTunerUtility::TTunerAccessPriority aAccessPriority = ETunerAccessPriorityNormal);
-
- IMPORT_C virtual ~CMMTunerUtility();
-
-
-
- /**
- Set the current tuner access priority of this client. This priority is used to
- arbitrate between multiple tuner clients, determining who get control of the
- tuner.
-
- The platform security capability is MultimediaDD and a client with this capability
- is allowed to set the priority in preference to a client with a lower capability.
-
- @param aAccessPriority The new priority to use.
- @capability MultimediaDD
- @return A standard system error code.
- */
- IMPORT_C TInt SetPriority(TTunerAccessPriority aAccessPriority);
-
- /**
- Get the current tuner access priority of this client.
-
- @param aAccessPriority A variable to which the current priority will be written.
- @return A standard system error code.
- */
- IMPORT_C TInt GetPriority(TTunerAccessPriority& aAccessPriority) const;
-
-
- /**
- Get the current state of the tuner.
-
- @param aState A variable to set with the current state. Bits set according to
- TTunerState.
- @return A standard system error code.
- */
- IMPORT_C TInt GetState(TUint32& aState) const;
-
- /**
- Indicates if the external antenna is currently attached or not. The tuner
- capabilties should be queried to determine if the external antenna is required
- to use the tuner or not; A value of false returned here does not necessarily
- imply that the tuner cannot be used.
-
- @param aAttached When this function returns, this will contain ETrue if and only
- if an external antenna is attached.
- @return A standard system error code.
- */
- IMPORT_C TInt IsAntennaAttached(TBool& aAttached);
-
- /**
- Indicates if the device is currently in 'flight mode' or not. The tuner
- capabilities should be queried to determine in the tuner can be used in flight
- mode or not.
-
- @param aFlightMode On return, this will have been set to ETrue if and only if
- the device is in flight mode.
- @return A standard system error code.
- */
- IMPORT_C TInt GetFlightMode(TBool& aFlightMode) const;
-
- /**
- Tune the tuner to the required frequency specified in Hertz. This is an asynchronous
- command and will result in a callback to MToTuneComplete or MToTunerError.
-
- If the session does not currently have control of the tuner, a request for control
- will be made. If control of the tuner is granted, a callback to MToTunerControlGranted
- will occur. If not, there will be a callback to MtoTunerError with error value
- KErrAccessDenied.
-
- Once control of the tuner has been granted, it will be retained until either a
- call to ReleaseTunerControl, or the session is preempted in which case there
- will be a callback to MToTunerError with error value KErrAccessDenied.
-
- @param aFrequency The frequency to tune to
- @param aBand The band to which aFrequency belongs
- */
- IMPORT_C void Tune(TFrequency aFrequency);
-
- /**
- Find a radio station, starting at the start frequency and searching in the
- direction specified (i.e. Up or down) the search is limited to the specified
- band. If the session does not currently have control of the tuner, a request
- for control will be made. If control of the tuner is granted, a callback to
- MToTunerControlGranted will occur. If not, there will be a callback to MToTunerError
- with error value KErrAccessDenied.
-
- Once control of the tuner has been granted, it will be retained until either a
- call to ReleaseTunerControl, or the session is preempted in which case there
- will be a callback to MToTunerError with error value KErrAccessDenied.
-
- A callback to MToTuneComplete will occur if the Seek is successful.
-
- @param aBand The band
- @param aSearchDirect The direction to search in
- @param aCircularSeek If set to ETrue the station seek will loop back to the other
- end of the band once the end of the band has been reached. (Defaults to ETrue)
- If not set reaching the end of the band without finding a station will result
- in a callback to MToTuneComplete with error KErrNotFound.
- */
- IMPORT_C void StationSeek(TSearchDirection aSearchDirection);
-
- /**
- Cancels an ongoing retune operation, as initiated by a call to Tune or StationSeek.
- The usual callback will not occur if this has been called.
-
- Has not affect if no tune or seek operation is ongoing.
- */
- IMPORT_C void CancelRetune();
-
- /**
- Makes a synchronous request for control of the tuner. If this method returns
- KErrNone, control of the tuner has been granted. Control of the tuner is kept
- until it is explically released using ReleaseTunerControl, or it is revoked
- in which case a callback to MToTunerError with an error of KErrAccessDenied
- will occur.
-
- If this method returns with KErrAccessDenied, a request to recieve a
- notifiaction when control could be granted can be made using
- NotifyTunerControl.
-
- Note that methods that require control of the tuner (such as Tune) will make
- a request for control themselves if control has not already been granted.
-
- @return A standard system error code. If control was granted, KErrNone, and if
- control was denied KErrAccessDenied.
- */
- IMPORT_C TInt RequestTunerControl();
-
- /**
- Makes an asyncronous request for control of the tuner. This method should be
- called after an control of the tuner has been denied to receive a notification
- when control of the tuner can be granted. A callback to MToTunerControlGranted
- will occur in this event.
- */
- IMPORT_C TInt NotifyTunerControl();
-
- /**
- Release control of the tuner, allowing other clients to tune it. Change
- notifications may still be received. A request for control of the tuner can be
- made again by calling RequestTunerControl, or any methods that require control
- of the tuner.
- */
- IMPORT_C void ReleaseTunerControl();
-
- /**
- Release the tuner. Any ongoing playing or recording activity will be stopped,
- control of the tuner will be released, and the hardware will be powered down if
- no other clients need it.
- */
- IMPORT_C void Close();
-
- /**
- Retrieve the current frequency that the tuner is tuned to
-
- @param aFrequency The variable to set to the current frequency,
- -1 if channels are in use
- @param aBand The variable used to set the current band.
- @return A standard system error code
- */
- IMPORT_C TInt GetFrequency(TFrequency& aFrequency) const;
-
- /**
- Retrieve the signal strenth of the currently tuned signal
-
- @param aSignalStrength Variable into which the signal strength will be written.
- @return A standard system error code
- */
- IMPORT_C TInt GetSignalStrength(TInt& aSignalStrength) const;
-
- /**
- Get the maximum possible signal strength of a tuned signal.
-
- @param aMaxSignalStrength A variable that will have the maximun signal strength
- written to.
- @return A standard system error code
- */
- IMPORT_C TInt GetMaxSignalStrength(TInt& aMaxSignalStrength) const;
-
- /**
- Request notifications when the signal strength changes. Due to the potentially
- short intervals at which the signal strength may change at, notifications will
- only be sent when a relatively large change occurrs. This should allow a visual
- display of signal strength to be maintained fairly accurately.
-
- The first signal strength notification will be sent immediately after this
- request.
-
- @param aObserver The object which will receive notifications of signal strength
- changes.
- @return A standard system error code
- */
- IMPORT_C TInt NotifySignalStrength(MMMSignalStrengthObserver& aObserver);
-
- /**
- Cancel an outstanding NotifySignalStrength request.
- */
- IMPORT_C void CancelNotifySignalStrength();
-
- /**
- Find out if the current signal is being received in stereo or not.
-
- @param aStereo On return, will be ETrue if and only if a stereo signal is
- currently being received.
- */
- IMPORT_C TInt IsStereoSignal(TBool& aStereo);
-
- /**
- Request notifications when stereo reception is lost/restored.
-
- @param aObserver The object requiring notification when a stereo signal is lost
- or restored. The first notification will occur immediately.
- @return A standard system error code
- */
- IMPORT_C TInt NotifyStereoChange(MMMTunerStereoObserver& aObserver);
-
- /**
- Cancels a stereo change notification request.
- */
- IMPORT_C void CancelNotifyStereoChange();
-
- /**
- Indicates whether the reception should be forced into monophonic mode.
-
- @param aMono If ETrue, all reception will be in mono mode even if a stereo
- signal is available. If EFalse, a stereo signal will be received when
- possible.
- @return A standard system error code.
- */
- IMPORT_C TInt ForceMonoReception(TBool aMono);
-
- /**
- Find out whether reception is forced into monophonic mode or not.
-
- @param aMono This will be set to ETrue if all reception is forced to be mono. If
- this is EFalse, this does not imply that stereo reception is currently
- available.
- @return A standard system error code.
- */
- IMPORT_C TInt GetForcedMonoReception(TBool& aMono) const;
-
- /**
- Sets the current squleching (muting in frequencies without reception) setting.
-
- @param aEnabled ETrue to enable squelching, EFalse to disable it.
- @return KErrNone if successful, else a system wide error code.
- */
- IMPORT_C TInt SetSquelch(TBool aEnabled);
-
- /**
- Gets the current squleching (muting in frequencies without reception) setting.
-
- @param aEnabled This will be set to ETrue if squelching is enabled, EFalse otherwise.
- @return KErrNone if successful, else a system wide error code.
- */
- IMPORT_C TInt GetSquelch(TBool& aEnabled) const;
-
- /**
- Get the capabilities of the tuner on the device
-
- @param aCaps The capabilities object to fill
- @return A standard system error code
- */
- IMPORT_C TInt GetCapabilities(TTunerCapabilities& aCaps) const;
-
- /**
- Get the frequency range (in Hertz) of the specified band.
- This function should be used to enquire the frequency range
- of the bands that GetCapabilities reports as supported.
-
- @param aBand The band to query
- @param aBottomFrequency The variable to set to the lowest frequency allowed
- @param aTopFrequency The variable to set to the highest frequency allowed
- @return A standard system error code
- */
- IMPORT_C TInt GetFrequencyBandRange(TFrequency& aBottomFrequency, TFrequency& aTopFrequency);
-
- /**
- Request to be notified when the tuned frequency or channel changes, or when the
- tuner changes state (e.g. starts playing or recording)
-
- @param aObserver The object wishing to receive tuning change events
- @return A standard system error code
- */
- IMPORT_C TInt NotifyChange(MMMTunerChangeObserver& aObserver);
-
- /**
- Cancel request to be notified when the tuned frequency or channel changes
- */
- IMPORT_C void CancelNotifyChange();
-
- /**
- Send a synchronous custom command to the tuner.
-
- @param aFunction The function number to indicate which function is to be called
- on the interface defined by the first IPC argument
- @param aArgs The IPC arguments to send to the tuner. The first of these
- arguments must be the UID of the interface within the tuner to which the
- command is destined, represented as an integer. Failure to set the first
- argument properly will result in the command completing with
- KErrNotSupported at best, but possibly the client being panicked.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(TInt aFunction, const TIpcArgs& aArgs);
-
- /**
- Send an asynchronous custom command to the tuner.
-
- @param aFunction The function number to indicate which function is to be called
- on the interface defined by the first IPC argument
- @param aArgs The IPC arguments to send to the tuner. The first of these
- arguments must be the UID of the interface within the tuner to which the
- command is destined, represented as an integer. Failure to set the first
- argument properly will result in the command completing with
- KErrNotSupported at best, but possibly the client being panicked.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- */
- IMPORT_C void CustomCommandAsync(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus);
-
- /**
- Get the Tuner Player Utility
-
- @param aAccessPriority A variable to which the current priority will be written.
- @return A standard system error code.
- */
- IMPORT_C CMMTunerAudioPlayerUtility* TunerPlayerUtilityL(MMMTunerAudioPlayerObserver& aObserver) ;
- /**
- Get the Tuner Recorder Utility
-
- @param aAccessPriority A variable to which the current priority will be written.
- @return A standard system error code.
- */
- IMPORT_C CMMTunerAudioRecorderUtility* TunerRecorderUtilityL(MMMTunerAudioRecorderObserver& aObserver) ;
-
- /**
- Get the Tuner Scanner Utility
-
- @param aAccessPriority A variable to which the current priority will be written.
- @return A standard system error code.
- */
- IMPORT_C CMMTunerScannerUtility* TunerScannerUtilityL() ;
-
- /**
- Get the Tuner Rds Utility
-
- @param aAccessPriority A variable to which the current priority will be written.
- @return A standard system error code.
- */
- IMPORT_C CMMRdsTunerUtility* TunerRdsUtilityL() ;
-
-private:
- CMMTunerUtility();
-protected:
- class CBody;
-private:
- CBody* iBody;
-};
-
-/**
-The Tuner Observer mixin class defines asynchronous
-event completion function callbacks
-*/
-class MMMTunerObserver
-{
-public:
- /**
- Tune complete event. This event is asynchronous
- and is received after a call to the Tune method.
-
- @param aError A standard system error
- */
- virtual void MToTuneComplete(TInt aError) = 0;
-
-};
-
-/**
-The Tuner Change Observer mixin class defines the interface via which
-notification for changes to the tuned frequency, channel and other tuner
-state can be received. A client interested in these notifications
-should call the function CMMTunerUtility::NotifyChange.
-*/
-class MMMTunerChangeObserver
-{
-public:
- /**
- Called when the tuned frequency changes
-
- @param aOldFrequency The frequency in use before the change
- @param aNewFrequency The new tuned frequency
- */
- virtual void MTcoFrequencyChanged(const TFrequency& aOldFrequency, const TFrequency& aNewFrequency) = 0;
-
- /**
- Called when the state of the tuner changes.
-
- @param aOldState The old state. Bits are set according to TTunerState.
- @param aNewState The new state. Bits are set according to TTunerState.
- */
- virtual void MTcoStateChanged(const TUint32& aOldState, const TUint32& aNewState) = 0;
-
- /**
- This function is called when an external antenna is detached from the device.
- This does not necessarily indicate that the tuner can no longer be used; the
- capabilities of the tuner indicate if the external antenna is required in order
- to use the tuner.
- */
- virtual void MTcoAntennaDetached() = 0;
-
- /**
- This function is called when an external antenna is attached to the device. If
- the antenna is required to use the tuner, this indicates that the tuner can be
- used again.
- */
- virtual void MTcoAntennaAttached() = 0;
-
- /**
- This function is called when the device enters or leaves flight mode. If the tuner
- cannot be used in flight mode when the device enters this mode, this indicates
- that the tuner can no longer be used; the capabilities of the tuner indicate if
- it can be used in flight mode or not.
-
- @param aFlightMode ETrue if the device has just entered flight mode, EFalse if
- flight mode has just been left.
- */
- virtual void FlightModeChanged(TBool aFlightMode) = 0;
-};
-
-/**
-The stereo observer mixin class defines the interface by which clients can be
-notified when a stereo signal is received/lost. An interested client should call
-the function CMMTunerUtility::NotifyStereoChange.
-*/
-class MMMTunerStereoObserver
-{
-public:
- /**
- Called when stereo reception is lost/restored.
-
- @param aStereo If true, indicates that stereo reception has just been restored.
- If false, indicates that stereo reception has just been lost.
- */
- virtual void MTsoStereoReceptionChanged(TBool aStereo) = 0;
-
- /**
- Called when a client enables/disabled forced mono reception.
-
- @param aForcedMono ETrue if reception is forced to be mono, even when a stereo
- signal is available.
- */
- virtual void MTsoForcedMonoChanged(TBool aForcedMono) = 0;
-};
-
-/**
-This mixin class should be derived from by clients wishing to receive
-notifications when the signal strength changes. Such a client should call
-function CMMTunerUtility::NotifySignalStrength.
-*/
-class MMMSignalStrengthObserver
-{
-public:
- /**
- Callback indicating that the signal strength has changed by an amount meriting
- a notification.
-
- @param aNewSignalStrength The new signal strength.
- */
- virtual void MssoSignalStrengthChanged(TInt aNewSignalStrength) = 0;
-};
-
-
-class MMMAudioResourceNotificationCallback;
-
-/**
-The Tuner Audio Player Utility is used to initiate and control playback of audio
-from the tuner.
-*/
-class CMMTunerAudioPlayerUtility : public CBase, public MCustomCommand
-{
- friend class CMMTunerUtility::CBody;
-public:
-
- IMPORT_C ~CMMTunerAudioPlayerUtility();
-
- /**
- Set-up the API for playing the output from tuner to the speaker asynchronously.
- Calls MMMTunerAudioPlayerObserver::MTapoInitializeComplete on completion. This must be
- called before Play.
-
- @param aPriority Sound device priority value
- @param aPref Sound device priority preference value
- */
- IMPORT_C void InitializeL(TInt aAudioPriority = EMdaPriorityNormal, TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
- /**
- Start playback of the tuner output. To stop playback, call Mute, or Stop if
- play will not need to be restarted. InitializeL() must have already been
- called, and a callback to MTapoInitializeComplete with an error of KErrNone must
- have occurred; if this is not the case, this raises a TunerAudioPlay 1 panic.
- */
- IMPORT_C void Play();
-
- /**
- Mute or unmute playback.
-
- Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
- @param aMute ETrue to mute the audio, EFalse to unmute it.
- @return A standard system error code
- */
- IMPORT_C TInt Mute(TBool aMute);
-
- /**
- Stop playback, and release the output device for use by other clients
-
- Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
- Playback should already be under way.
- */
- IMPORT_C void Stop();
-
- /**
- Set the current audio priority. This priority is used to arbitrate
- between multiple audio sources trying to access the audio hardware.
-
- @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax
- @param aPref Time vs Quality priority preferences, enumerated in TMdaPriorityPreference
- @return A standard system error code
- */
- IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
-
- /**
- Get the current audio priority. This is used to arbitrate between simultaneous
- accesses to the sound hardware.
-
- @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax to return
- @param aPref Time vs Quality priority preferences to return, enumerated in TMdaPriorityPreference
- @return A standard system error code
- */
- IMPORT_C TInt GetPriority(TInt& aPriority, TMdaPriorityPreference& aPref) const;
-
- /**
- Set the volume to the specified level
-
- Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
- @param aVolume The volume level to set
- @return A standard system error code
- */
- IMPORT_C TInt SetVolume(TInt aVolume);
-
- /**
- Return the current volume
-
- @param aVolume The variable to set to the current volume
- @return A standard system error code
- */
- IMPORT_C TInt GetVolume(TInt& aVolume) const;
-
- /**
- Define a volume ramp, aRampInterval defining
- the interval between valid volume settings
-
- Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
- @param aRampInterval The time interval over which the volume
- should be increased from zero to the current volume setting
- @return A standard system error code
- */
- IMPORT_C TInt SetVolumeRamp(const TTimeIntervalMicroSeconds& aRampInterval);
-
- /**
- Return the maximum volume supported
-
- @return The maximum volume setting permitted
- */
- IMPORT_C TInt MaxVolume() const;
-
- /**
- Set the stereo balance between left and right channels
-
- Raises a TunerAudioPlay 1 panic if the player is not properly initialized.
-
- @param aBalance The balance value to set - must be between
- KMMFBalanceMaxLeft and KMMFBalanceMaxRight
- @return A standard system error code
- */
- IMPORT_C TInt SetBalance(TInt aBalance = KMMFBalanceCenter);
-
- /**
- Return the current stereo balance
-
- @param aBalance The variable to set to the current balance
- @return A standard system error code
- */
- IMPORT_C TInt GetBalance(TInt& aBalance) const;
-
- /**
- Register for audio resource notifications, in the event that the audio resource is lost due to pre-emption
- by a higher priority audio client.
- */
- IMPORT_C TInt RegisterAudioResourceNotification(MMMAudioResourceNotificationCallback& aCallback, TUid aNotificationEventUid, const TDesC8* aNotificationRegistrationData = NULL);
-
- /**
- Cancel an outstanding audio resource notification.
- */
- IMPORT_C void CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
-
- /**
- Returns the controller implementation information associated with the current controller, if any.
-
- @return The controller implementation structure associated with the controller
- @leave KErrNotFound if no controller is in use.
- */
- IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
-
- /**
- Send a synchronous custom command to the playback controller, if ones exists.
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2);
-
- /**
- Send a synchronous custom command to the playback controller, if ones exists.
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataFrom The area of memory to which the controller framework
- will write any data to be passed back to the client. Can't be KNullDesC8.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TDes8& aDataFrom);
-
- /**
- Send an asynchronous custom command to the playback controller, if ones exists.
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- */
- IMPORT_C void CustomCommandAsync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TRequestStatus& aStatus);
-
- /**
- Send an asynchronous custom command to the playback controller, if ones exists.
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataFrom The area of memory to which the controller framework
- will write any data to be passed back to the client. Can't be KNullDesC8.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- */
- IMPORT_C void CustomCommandAsync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TDes8& aDataFrom,
- TRequestStatus& aStatus);
-
-protected:
- /**
- Factory function to create a new Tuner Audio Player utility. Note that only one audio player
- utility may be created per instance of CMMTunerUtility. Multiple instances will result in an
- error of KErrAlreadyExists when InitializeL() is called.
-
- @param aTuner The tuner object which this utility will play the audio from.
- @param aObserver The observer of the player utility to receive asychronous completion and
- notifiction callbacks.
- @leave KErrNoMemory Out of memory
- @leave KErrNotSupported If the given tuner doesn't support audio playback.
- @return A new tuner audio player utility.
- */
- static CMMTunerAudioPlayerUtility* NewL(CMMTunerUtility& aTuner, RRadioSession& aRadioSession, MMMTunerAudioPlayerObserver& aObserver);
-
-private:
- CMMTunerAudioPlayerUtility();
-private:
- class CBody;
- CBody* iBody;
-};
-
-class MMMTunerAudioPlayerObserver
-{
-public:
- /**
- The TEvent enumeration is used to indicate which type of event is being sent to the client.
- Each event will be associated with an error code and potentially some addition information,
- and will be passed to the client via method MTapoPlayEvent().
- */
- enum TEventType
- {
- /** An event relating to the tuner itself. Any error other than KErrNone associated
- with this event type may indicate that the tuner cannot be used anymore.
-
- No additional information is associated with this type of event. */
- ETunerEvent,
- /**
- An event relating to audio playback.
-
- No additional information is associated with this type of event.
- */
- EAudioEvent
- };
-public:
- /**
- Initialize complete event. This event is asynchronous and is received after
- a call to CMMTunerAudioPlayerUtility::InitializeL().
-
- @param aError A standard system error
- */
- virtual void MTapoInitializeComplete(TInt aError) = 0;
-
- /**
- Passes an asychronous event to the tuner client.
-
- @param aEvent The type of event. See enumeration MMMTunerAudioPlayerObserver::TEventType
- for more information about when the event types mean.
- @param aError An error code associated with the event.
- @param aAdditionalInfo Any additional information associated with the event, or NULL if
- no such additional information exists.
- */
- virtual void MTapoPlayEvent(TEventType aEvent, TInt aError, TAny* aAdditionalInfo) = 0;
-};
-
-/**
-This class is used to perform recording of audio from the tuner. Many of the methods
-in this class have identical functionality to similarly names functions in class
-CMdaAudioRecorderUtility.
-*/
-class CMMTunerAudioRecorderUtility : public CBase
-{
- friend class CMMTunerUtility::CBody;
-public:
-
- IMPORT_C ~CMMTunerAudioRecorderUtility();
-
- /**
- Initialize for recording from the tuner to the specified file
- asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete on completion
-
- @param aRecordFilename The name of the file to create, if necessary, and record to
- @param "aDestinationDataType" Data type for recording
- @param "aControllerUid" The Uid of the controller to use for recording
- @param "aDestinationFormatUid" Uid of record format
- @param aPriority Sound device priority value
- @param aPref Sound device priority preference value
- */
- IMPORT_C void InitializeL(const TDesC& aRecordFilename,
- TFourCC aDestinationDataType = KFourCCNULL,
- TUid aControllerUid=KNullUid,
- TUid aDestinationFormatUid=KNullUid,
- TInt aAudioPriority = EMdaPriorityNormal,
- TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
- /**
- Initialize for recording from the tuner to the specified descriptor
- asynchronously. Calls MMMTunerAudioRecorderObserver::MTaroInitializeComplete on completion
-
- @param aRecordDescriptor The descriptor to record to
- @param "aDestinationDataType" Data type for recording
- @param "aControllerUid" The Uid of the controller to use for recording
- @param "aDestinationFormatUid" Uid of record format
- @param aPriority Sound device priority value
- @param aPref Sound device priority preference value
- */
- IMPORT_C void InitializeL(TDes8& aRecordDescriptor,
- TFourCC aDestinationDataType = KFourCCNULL,
- TUid aControllerUid=KNullUid,
- TUid aDestinationFormatUid=KNullUid,
- TInt aAudioPriority = EMdaPriorityNormal,
- TMdaPriorityPreference aPref = EMdaPriorityPreferenceTimeAndQuality);
-
- /**
- Return a list of the supported data types for the record destination
- @param "aSupportedDataTypes" list of four character codes, representing supported data
- encodings for the record destination.
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void GetSupportedDestinationDataTypesL(RArray<TFourCC>& aSupportedDataTypes) const;
-
- /**
- Set the data type of the destination audio clip
- @param "aDataType" four character code, representing the encoding of the destination audio clip
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void SetDestinationDataTypeL(TFourCC aDataType);
-
- /**
- Return the data type of the destination audio clip
- @returns four character code, representing the encoding of the destination audio clip
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C TFourCC DestinationDataTypeL() const;
-
- /**
- Set the bit rate for recording
- @param "aBitRate" destination bit rate in bits/second
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void SetDestinationBitRateL(TUint aBitRate);
-
- /**
- Return the recording bit rate
- @returns destination bit rate in bits/second
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C TUint DestinationBitRateL() const;
-
- /**
- Return a list of the supported bit rates for recording
- @param "aSupportedBitRates" List of bit rates supported for the record
- destination
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void GetSupportedBitRatesL(RArray<TUint>& aSupportedBitRates) const;
-
- /**
- Set the sample rate for the record destination
- @param "aSampleRate" The sample rate of the record destination
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void SetDestinationSampleRateL(TUint aSampleRate);
-
- /**
- Return the sample rate of the record destination
- @returns The sample rate of the record destination
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C TUint DestinationSampleRateL() const;
-
- /**
- Get a list of supported recording sample rates.
- @param "aSupportedSampleRates" List of the sample rates that are supported for
- recording
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void GetSupportedSampleRatesL(RArray<TUint>& aSupportedSampleRates) const;
-
- /**
- Set the format of the audio clip. This can only be done if the audio clip does not
- exist
-
- @param "aFormatUid" Uid of the audio clip format
- @leaves KErrAlreadyExists if the clip already exists and the format is different
- from the existing format, or can leave with one of the system-wide error codes
- */
- IMPORT_C void SetDestinationFormatL(TUid aFormatUid);
-
- /**
- Return the format of the audio clip
- @returns Uid of the audio clip format
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C TUid DestinationFormatL() const;
-
- /**
- Set the number of channels for the recorded audio clip
- @param "aNumberOfChannels" The number of channels to record
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void SetDestinationNumberOfChannelsL(TUint aNumberOfChannels);
-
- /**
- Return the number of channels in audio clip
- @returns number of channels supported by audio clip
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C TUint DestinationNumberOfChannelsL() const;
-
- /**
- Return a list of the supported number of channels for recording
- @param "aSupportedNumChannels" List of the number of channels supported for
- recording
- @leaves Can leave with one of the system-wide error codes
- */
- IMPORT_C void GetSupportedNumberOfChannelsL(RArray<TUint>& aSupportedNumChannels) const;
-
- /** Start recording of the tuner output */
- IMPORT_C void RecordL();
-
- /**
- Pause recording. Recording can be resumed with another call to Record.
-
- @return A standard system error code
- */
- IMPORT_C TInt PauseRecord();
-
- /**
- Stop recording, and release the output device for use by other clients
-
- Recording should already be under way.
- */
- IMPORT_C void Stop();
-
- /**
- Stop recording, and release the output device for use by other clients
-
- Recording should already be under way.
- */
- IMPORT_C void Close();
-
- /**
- Return the maximum value for the gain
-
- @return The maximum gain. For devices where automatic gain control is used, this value may be zero.
- */
- IMPORT_C TInt MaxGain() const;
-
- /**
- Sets the gain for the audio device to a specified value.
-
- @param aGain The gain setting. This can be any value from zero to the value returned by a call to
- MaxGain(). A value which is less than zero is set to zero. A value which is greater than
- MaxGain() is set to MaxGain().
- */
- IMPORT_C void SetGain(TInt aGain);
-
- /**
- Sets the current recording balance setting between the left and right stereo channels
-
- The balance can be changed before or during recording and is effective immediately.
-
- @param aBalance The balance value to set. Any value between KMMFBalanceMaxLeft and
- KMMFBalanceMaxRight, the default value being KMMFBalanceCenter.
- @return An error code indicating if the call was successful. KErrNone on success,
- otherwise another of the system-wide error codes.
- */
- IMPORT_C TInt SetRecordBalance(TInt aBalance = KMMFBalanceCenter);
-
- /**
- Returns the current recording balance setting between the left and right stereo channels.
-
- @param aBalance On return, contains the current recording balance between KMMFBalanceMaxLeft
- and KMMFBalanceMaxRight.
- @return An error code indicating if the call was successful. KErrNone on success, otherwise
- another of the system-wide error codes.
- */
- IMPORT_C TInt GetRecordBalance(TInt& aBalance) const;
-
- /**
- Set the current audio priority. This priority is used to arbitrate
- between multiple audio sources trying to access the audio hardware.
-
- @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax
- @param aPref Time vs Quality priority preferences, enumerated in TMdaPriorityPreference
- @return A standard system error code
- */
- IMPORT_C TInt SetPriority(TInt aPriority, TMdaPriorityPreference aPref);
-
- /**
- Get the current audio priority. This is used to arbitrate between simultaneous
- accesses to the sound hardware.
-
- @param aPriority A priority between EMdaPriorityMin and EMdaPriorityMax to return
- @param aPref Time vs Quality priority preferences to return, enumerated in TMdaPriorityPreference
- @return A standard system error code
- */
- IMPORT_C TInt GetPriority(TInt& aPriority, TMdaPriorityPreference& aPref) const;
-
- /**
- Register for audio resource notifications, in the event that the audio resource is lost due to pre-emption
- by a higher priority audio client.
- */
- IMPORT_C TInt RegisterAudioResourceNotification(MMMAudioResourceNotificationCallback& aCallback, TUid aNotificationEventUid, const TDesC8* aNotificationRegistrationData = NULL);
-
- /**
- Cancel an outstanding audio resource notification.
- */
- IMPORT_C void CancelRegisterAudioResourceNotification(TUid aNotificationEventId);
-
-
- /**
- Sets the maximum size for a file that is being recorded.
-
- When this limit is reached, MMF stops recording and notifies the client application. Notification is caused
- by MMdaObjectStateChangeObserver::MoscoStateChangeEvent() with the error code KErrEof.
-
- This function is provided so that applications such as recorders can limit the amount of file storage/memory
- that should be allocated.
-
- @param aMaxWriteLength
- The maximum file size in kilobytes. If the default value is used, there is no maximum file size.
-
- */
- IMPORT_C void SetMaxWriteLength(TInt aMaxWriteLength = KMdaClipLocationMaxWriteLengthNone);
-
- /**
- Returns the recording time available for the selected file or descriptor and encoding format.
- */
- IMPORT_C const TTimeIntervalMicroSeconds& RecordTimeAvailable();
-
- /**
- Returns the duration of the audio sample data.
- */
- IMPORT_C const TTimeIntervalMicroSeconds& Duration();
-
- /**
- Return the controller implementation information structure of the current controller
-
- @leave KErrNoMemory Out of memory
- @return A reference to the current controller information
- */
- IMPORT_C const CMMFControllerImplementationInformation& ControllerImplementationInformationL();
-
- /*
- Returns the number of meta data entries associated with this clip.
- @return Number of metadata entries
- */
- IMPORT_C TInt GetNumberOfMetaDataEntries(TInt& aNumEntries);
-
- /*
- Returns the specified meta data entry from the current audio clip.
- @return Metadata entry
- */
- IMPORT_C CMMFMetaDataEntry* GetMetaDataEntryL(TInt aMetaDataIndex);
-
- /*
- Adds a meta data entry to the audio clip.
- */
- IMPORT_C void AddMetaDataEntryL(CMMFMetaDataEntry& aMetaDataEntry);
-
- /*
- Removes a specified meta data entry from the audio clip
- @return An error code indicating if the call was successful
- */
- IMPORT_C TInt RemoveMetaDataEntry(TInt aMetaDataIndex);
-
- /*
- Replaces the specified meta data entry with a new entry
- */
- IMPORT_C void ReplaceMetaDataEntryL(TInt aMetaDataIndex, CMMFMetaDataEntry& aMetaDataEntry);
-
-
- /**
- Send a synchronous custom command to the recording controller
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2);
-
- /**
- Send a synchronous custom command to the recording controller
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataFrom The area of memory to which the controller framework
- will write any data to be passed back to the client. Can't be KNullDesC8.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TDes8& aDataFrom);
-
- /**
- Send an asynchronous custom command to the recording controller
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- @return A standard system error code
- */
- IMPORT_C void CustomCommandAsync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TRequestStatus& aStatus);
-
- /**
- Send an asynchronous custom command to the recording controller
-
- @param aDestination The destination of the message, consisting of the uid of
- the interface of this message
- @param aFunction The function number to indicate which function is to be called
- on the interface defined in the aDestination parameter
- @param aDataTo1 The first chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataTo2 The second chunk of data to be copied to the controller
- framework. The exact contents of the data are dependent on the
- interface being called. Can be KNullDesC8.
- @param aDataFrom The area of memory to which the controller framework
- will write any data to be passed back to the client. Can't be KNullDesC8.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- @return A standard system error code
- */
- IMPORT_C void CustomCommandAsync(
- const TMMFMessageDestinationPckg& aDestination,
- TInt aFunction,
- const TDesC8& aDataTo1,
- const TDesC8& aDataTo2,
- TDes8& aDataFrom,
- TRequestStatus& aStatus);
-
-protected:
- /**
- Create a new audio recorder utility. Note that only one audio recorder utility may be created
- per instance of CMMTunerUtility. Multiple instances will result in an error of KErrAlreadyExists
- when InitializeL() is called.
- */
- static CMMTunerAudioRecorderUtility* NewL(CMMTunerUtility& aTuner, MMMTunerAudioRecorderObserver& aObserver);
-
-private:
- CMMTunerAudioRecorderUtility();
-private:
- class CBody;
- CBody* iBody;
-
-};
-
-class MMMTunerAudioRecorderObserver
-{
-public:
- /**
- The TEvent enumeration is used to indicate which type of event is being sent to the client.
- Each event will be associated with an error code and potentially some addition information,
- and will be passed to the client via method MTaroRecordEvent().
- */
- enum TEventType
- {
- /** An event relating to the tuner itself. Any error other than KErrNone associated
- with this event type may indicate that the tuner cannot be used anymore.
-
- No additional information is associated with this type of event. */
- ETunerEvent,
- /**
- An event relating to audio recording.
-
- No additional information is associated with this type of event.
- */
- EAudioEvent
- };
-public:
- /**
- Initialize complete event. This event is asynchronous and is received after
- a call to CMMTunerAudioRecorderUtility::InitializeL.
-
- @param aError A standard system error
- */
- virtual void MTaroInitializeComplete(TInt aError) = 0;
-
- /**
- Passes an asychronous event to the tuner client.
-
- @param aEvent The type of event. See enumeration MMMTunerAudioRecorderObserver::TEventType
- for more information about when the event types mean.
- @param aError An error code associated with the event.
- @param aAdditionalInfo Any additional information associated with the event, or NULL if
- no such additional information exists.
- */
- virtual void MTaroRecordEvent(TEventType aEvent, TInt aError, TAny* aAdditionalInfo) = 0;
-};
-
-/**
-This class augments CMMTunerUtility to provide station scanning functionality,
-whereby the frequency spectrum is searched, pausing for a specified amount of
-time when a station is found.
-*/
-class CMMTunerScannerUtility : public CBase
-{
- friend class CMMTunerUtility::CBody;
-public:
-
- IMPORT_C ~CMMTunerScannerUtility();
-
- /**
- Continuously scan for a radio station, pausing for the time specified before
- continuing on to the next station. Call StopScan to select the currently tuned
- station. The search is limited to the specified band.
-
- @note The control of a CMMTunerUtility object must have been passed to this
- class (using TransferTunerControl) before this function is called.
-
- @param aBand The band to which aStartFrequency belongs
- @param aSearchDirect The direction to search in
- @param aPauseDuration Time to pause at each station
- @param aCircularScan If set to ETrue the station scan will loop back to the other
- end of the band once the end of the band has been reached. (Defaults to ETrue)
- */
- IMPORT_C void StationScan(CMMTunerUtility::TSearchDirection aSearchDirection,
- TTimeIntervalMicroSeconds32 aPauseDuration
- );
-
- /**
- Stop scanning and use the currently tuned station
-
- @return ETrue if a station is tuned, EFalse otherwise
- */
- IMPORT_C TBool StopScan();
-
-protected:
- /**
- Factory function to create a new CMMTunerScannerUtility.
-
- @param aTuner The tuner with which to perform the scanning.
- @leave KErrNoMemory Out of memory.
- @return A newly contructed tuner scanner utility.
- */
- static CMMTunerScannerUtility* NewL(CMMTunerUtility& aTuner,CMMTunerUtility::TTunerBand aBand);
-
-private:
- CMMTunerScannerUtility();
-private:
- class CBody;
- CBody* iBody;
-
-};
-
-
-/** Programme Station name, 8 characters */
-typedef TBuf<8> TRdsStationName;
-/** Programme Type Name, 8 characters */
-typedef TBuf<8> TRdsProgrammeTypeName;
-/** RDS Programme Identifier, a unique ID for each radio station */
-typedef TInt TRdsProgrammeIdentifier;
-
-/**
-Programme Item Number - identifies the start time of the current programme,
-as published by the broadcaster.
-*/
-class TRdsProgrammeItemNumber
-{
-public:
- /** The day of the month of the broadcast, in the range 1-31 */
- TInt iDayOfMonth;
- /** The hour of the day, in the range 0-23 */
- TInt iHour;
- /** The minute past the hour, in the range 0-59 */
- TInt iMinute;
-public:
- inline TInt operator==(const TRdsProgrammeItemNumber& aPin) const;
- inline TInt operator!=(const TRdsProgrammeItemNumber& aPin) const;
-};
-
-/**
-An RDS extended country code. The meaning of a value of this type is defined
-by the RDS specification, IEC62106.
-*/
-typedef TInt TRdsCountryCode;
-
-/**
-An RDS language identification code. The meaning of a value of this type is
-defined by the RDS specification, IEC62106.
-*/
-typedef TInt TRdsLanguageIdentifier;
-
-/**
-RDS Programme Type.
-
-The interpretation of values of this type depends on the origin of the RDS
-broadcast: in North America, a slightly different standard, RBDS, is used.
-These PTY codes are defined by static values KRbdsPtyXxxxx, for example
-KRbdsPtySoftRock.
-
-Elsewhere, including Europe, the RDS standard is used. In these areas, the
-PTY codes are defined by static values KRdsPtyXxxxx, for example
-KRdsPtyChildrensProgrammes.
-
-In all other important aspects, the European RDS and North American RBDS
-standards are identical.
-*/
-typedef TInt TRdsProgrammeType;
-
-/** No programme type or undefined */
-const static TRdsProgrammeType KRdsPtyNone = 0;
-/** News */
-const static TRdsProgrammeType KRdsPtyNews = 1;
-/** CurrentAffairs */
-const static TRdsProgrammeType KRdsPtyCurrentAffairs = 2;
-/** Information */
-const static TRdsProgrammeType KRdsPtyInformation = 3;
-/** Sport */
-const static TRdsProgrammeType KRdsPtySport = 4;
-/** Education */
-const static TRdsProgrammeType KRdsPtyEducation = 5;
-/** Drama */
-const static TRdsProgrammeType KRdsPtyDrama = 6;
-/** Culture */
-const static TRdsProgrammeType KRdsPtyCulture = 7;
-/** Science */
-const static TRdsProgrammeType KRdsPtyScience = 8;
-/** VariedSpeech */
-const static TRdsProgrammeType KRdsPtyVariedSpeech = 9;
-/** PopMusic */
-const static TRdsProgrammeType KRdsPtyPopMusic = 10;
-/** RockMusic */
-const static TRdsProgrammeType KRdsPtyRockMusic = 11;
-/** EasyListening */
-const static TRdsProgrammeType KRdsPtyEasyListening = 12;
-/** LightClassical */
-const static TRdsProgrammeType KRdsPtyLightClassical = 13;
-/** SeriousClassics */
-const static TRdsProgrammeType KRdsPtySeriousClassical = 14;
-/** OtherMusic */
-const static TRdsProgrammeType KRdsPtyOtherMusic = 15;
-/** Weather */
-const static TRdsProgrammeType KRdsPtyWeather = 16;
-/** Finance */
-const static TRdsProgrammeType KRdsPtyFinance = 17;
-/** ChildrensProgrammes */
-const static TRdsProgrammeType KRdsPtyChildrensProgrammes = 18;
-/** SocialAffairs */
-const static TRdsProgrammeType KRdsPtySocialAffairs = 19;
-/** Religion */
-const static TRdsProgrammeType KRdsPtyReligion = 20;
-/** PhoneIn */
-const static TRdsProgrammeType KRdsPtyPhoneIn = 21;
-/** Travel */
-const static TRdsProgrammeType KRdsPtyTravel = 22;
-/** Leisure */
-const static TRdsProgrammeType KRdsPtyLeisure = 23;
-/** JazzMusic */
-const static TRdsProgrammeType KRdsPtyJazzMusic = 24;
-/** CountryMusic */
-const static TRdsProgrammeType KRdsPtyCountryMusic = 25;
-/** NationalMusic */
-const static TRdsProgrammeType KRdsPtyNationalMusic = 26;
-/** OldiesMusic */
-const static TRdsProgrammeType KRdsPtyOldiesMusic = 27;
-/** FolkMusic */
-const static TRdsProgrammeType KRdsPtyFolkMusic = 28;
-/** Documentary */
-const static TRdsProgrammeType KRdsPtyDocumentary = 29;
-/** AlarmTest */
-const static TRdsProgrammeType KRdsPtyAlarmTest = 30;
-/** Alarm */
-const static TRdsProgrammeType KRdsPtyAlarm = 31;
-
-
-/** No programme type or undefined */
-const static TRdsProgrammeType KRbdsPtyNone = 0;
-/** News */
-const static TRdsProgrammeType KRbdsPtyNews = 1;
-/** Informaion */
-const static TRdsProgrammeType KRbdsPtyInformation = 2;
-/** Sports */
-const static TRdsProgrammeType KRbdsPtySports = 3;
-/** Talk */
-const static TRdsProgrammeType KRbdsPtyTalk = 4;
-/** Rock */
-const static TRdsProgrammeType KRbdsPtyRock = 5;
-/** Classic Rock */
-const static TRdsProgrammeType KRbdsPtyClassicRock = 6;
-/** Adult Hits */
-const static TRdsProgrammeType KRbdsPtyAdultHits = 7;
-/** Soft Rock */
-const static TRdsProgrammeType KRbdsPtySoftRock = 8;
-/** Top 40 */
-const static TRdsProgrammeType KRbdsPtyTop40 = 9;
-/** Country */
-const static TRdsProgrammeType KRbdsPtyCountry = 10;
-/** Oldies */
-const static TRdsProgrammeType KRbdsPtyOldies = 11;
-/** Soft */
-const static TRdsProgrammeType KRbdsPtySoft = 12;
-/** Nostalgia */
-const static TRdsProgrammeType KRbdsPtyNostalgia = 13;
-/** Jazz */
-const static TRdsProgrammeType KRbdsPtyJazz = 14;
-/** Classical */
-const static TRdsProgrammeType KRbdsPtyClassical = 15;
-/** Rhythm and Blues */
-const static TRdsProgrammeType KRbdsPtyRhythmAndBlues = 16;
-/** Soft Rhythm and Blues */
-const static TRdsProgrammeType KRbdsPtySoftRhythmAndBlues = 17;
-/** Language */
-const static TRdsProgrammeType KRbdsPtyLanguage = 18;
-/** Religious Music */
-const static TRdsProgrammeType KRbdsPtyReligiousMusic = 19;
-/** Religious Talk */
-const static TRdsProgrammeType KRbdsPtyReligiousTalk = 20;
-/** Personality */
-const static TRdsProgrammeType KRbdsPtyPersonality = 21;
-/** Public */
-const static TRdsProgrammeType KRbdsPtyPublic = 22;
-/** College */
-const static TRdsProgrammeType KRbdsPtyCollege = 23;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned1 = 24;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned2 = 25;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned3 = 26;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned4 = 27;
-/** Unassigned */
-const static TRdsProgrammeType KRbdsPtyUnassigned5 = 28;
-/** Weather */
-const static TRdsProgrammeType KRbdsPtyWeather = 29;
-/** Emergency Test */
-const static TRdsProgrammeType KRbdsPtyEmergencyTest = 30;
-/** Emergency */
-const static TRdsProgrammeType KRbdsPtyEmergency = 31;
-
-/**
-The RDS Capabilities class defines the capabilities of the RDS tuner on the
-device, as retrieved using the function GetRdsCapabilities.
-*/
-class TRdsCapabilities
-{
-public:
- /** RDS Function Bit Flags */
- enum TRdsFunctions
- {
- /** Traffic Announcement */
- ERdsFunctionTa = 0x01,
- /** Regional Links */
- ERdsFunctionRegLink = 0x02,
- /** News Announcement */
- ERdsFunctionNa = 0x04,
- /** Programme Type */
- ERdsFunctionPty = 0x08,
- /** Clock Time */
- ERdsFunctionCt = 0x10,
- /** Enhanced Other Networks */
- ERdsFunctionEon = 0x20,
- /** Alternative Frequency */
- ERdsFunctionAf = 0x40
- };
-public:
- /** Bitfield as defined by ERdsFunctions with the bits of the supported functions set */
- TUint32 iRdsFunctions;
-};
-
-class MMMRdsDataObserver;
-class MMMRdsEonObserver;
-class MMMRdsStateChangeObserver;
-class MMMRdsAnnouncementObserver;
-
-/**
-This class represents the basic RDS data associated with an RDS station.
-*/
-class TRdsData
-{
-public:
- inline TRdsData();
-public:
- /**
- Enumeration to indicate a subset of the members of class TRdsData. These values should
- be bitwise or'ed together to indicate which members belong in a set.
- */
- enum TField
- {
- /** Indicates the the member iPi is in a set */
- EProgrammeIdentifier = 0x001,
- /** Indicates the the member iPs is in a set */
- EStationName = 0x002,
- /** Indicates the the member iTp is in a set */
- ETrafficProgramme = 0x004,
- /** Indicates the the member iTa is in a set */
- ETrafficAnnouncement = 0x008,
- /** Indicates the the member iPty is in a set */
- EProgrammeType = 0x010,
- /** Indicates the the member iPtyn is in a set */
- EProgrammeTypeName = 0x020,
- /** Indicates the the member iPin is in a set */
- EProgrammeItemNumber = 0x040,
- /** Indicates the the member iMs is in a set */
- EMusicSpeech = 0x080,
- /** Indicates the the member iBroadcastLanguage is in a set */
- EBroadcastLanguage = 0x100,
- /** Indicates the the member iEcc is in a set */
- EExtendedCountryCode = 0x200
- };
- /**
- A value indicating a set containig all RDS data encapsulated by class TRdsData.
- */
- const static TUint32 KAllRdsData = (EProgrammeIdentifier | EStationName | ETrafficProgramme | ETrafficAnnouncement
- | EProgrammeType | EProgrammeTypeName | EProgrammeItemNumber | EMusicSpeech
- | EBroadcastLanguage | EExtendedCountryCode);
-public:
- /** Programme Identifier of the station */
- TRdsProgrammeIdentifier iPi;
- /** Programme Station name of the station */
- TRdsStationName iPs;
- /** Value of the Traffic Programme flag of the station */
- TBool iTp;
- /** Value of the Traffic Announcement flag of the station */
- TBool iTa;
- /** Programme Type of the station */
- TRdsProgrammeType iPty;
- /** Programme Type Name of the station */
- TRdsProgrammeTypeName iPtyn;
- /** Programme Item Number of the station */
- TRdsProgrammeItemNumber iPin;
- /** Value of the Music Speech flag of the station. EFalse indicates the speech is being
- broadcast at present. ETrue indicates that music is being broadcast, or that the flag is
- not in use by the broadcaster. */
- TBool iMs;
- /** The current language of the broadcast */
- TRdsLanguageIdentifier iBroadcastLanguage;
- /** The Extended Country Code of the station */
- TRdsCountryCode iEcc;
-};
-
-/**
-Class representing a station broadcast as an Enhanced Other Networks station.
-*/
-class TEonStation
-{
-public:
- /**
- Enumeration to indicate a subset of the members of class TEonStation. These values should
- be bitwise or'ed together to indicate which members belong in a set.
- */
- enum TField
- {
- /** Indicates that member iProgrammeIdentifier is valid. */
- EProgrammeIdentifier= 0x01,
- /** Indicates that member iStationName is valid. */
- EStationName = 0x02,
- /** Indicates that member iProgrammeType is valid. */
- EProgrammeType = 0x04,
- /** Indicates that member iTrafficProgramme is valid. */
- ETrafficProgramme = 0x08,
- /** Indicates that member iTrafficAnnouncement is valid. */
- ETrafficAnnouncement= 0x10,
- /** Indicates that member iProgrammeItemNumber is valid. */
- EProgrammeItemNumber= 0x20,
- /** Indicates that member iNoFrequencies is valid. */
- ENoFrequencies = 0x40,
- /** Indicates that member iNoMappedFrequencies is valid. */
- ENoMappedFrequencies= 0x80
- };
-public:
- /** The unique identifier of this station */
- TRdsProgrammeIdentifier iProgrammeIdentifier;
- /** The textual name of this station */
- TRdsStationName iStationName;
- /** The current programme type (PTY) of this station */
- TRdsProgrammeType iProgrammeType;
- /** Indicates if this station broadcasts traffic programmes */
- TBool iTrafficProgramme;
- /** Indicates if this station is currently broadcasting a traffic announcement */
- TBool iTrafficAnnouncement;
- /** The programme item number (PIN) of the current broadcast on this station. */
- TRdsProgrammeItemNumber iProgrammeItemNumber;
- /**
- The number of frequencies associated with this station. If this number is zero,
- it may be that the EON station uses the mapped frequencies method instead. See
- iNoMappedFrequencies.
- */
- TInt iNoFrequencies;
- /**
- The number of mapped frequencies associated with this station. If this number is
- zero, it may be that the EON station uses a flat frequency list instead. See
- iNoFrequencies.
- */
- TInt iNoMappedFrequencies;
- /**
- Indicates the subset of fields of the class that are valid. Bits are set according to enumeration
- TEonStation::TField
- */
- TUint32 iValid;
-};
-
-/**
-Mapped frequencies can be broadcast as a part of the EON information. They relate the
-current tuning frequency with the frequency which the referred EON station will be
-broadcast on.
-*/
-class TEonMappedFrequency
-{
-public:
- inline TEonMappedFrequency(TFrequency aTuningFrequency, TFrequency aMappedFrequency);
-public:
- /** The current tuning frequency, relating to the station broadcasting the EON informarion. */
- TFrequency iTuningFrequency;
- /**
- The mapped frequency. If iTunedFrequency matches the currently tuned frequency, the
- EON station will be broadcast on this frequency.
- */
- TFrequency iMappedFrequency;
-};
-
-/**
-The RDS class augments the tuner API to give access to the RDS capabilities
-of the device. As such additional tuner technologies can be supported without
-changing the Tuner API.
-
-Note that despite this class being names 'RDS', it is capable of supporting both
-the RDS standard, and the North American equivilant RBDS. The only important difference
-from the APIs perspective is the interpretation of the Programme Type (PTY) codes. See
-TRdsProgrammeType for more information.
-*/
-class CMMRdsTunerUtility : public CBase
-{
- friend class CMMTunerUtility::CBody;
-public:
- /** RDS Announcement Type */
- enum TAnnouncementType
- {
- /** Traffic announcement */
- ERdsTrafficAnnouncement,
- /** News announcement */
- ERdsNewsAnnouncement
- };
-public:
- /**
- Factory function to create a new instance of the RDS Tuner API
-
- @param aTuner A RDS capable tuner object (check using CMMTunerUtility::GetCapabilities())
- @param aObserver The observer of the tuner to receive asynchronous completion messages.
- @leave KErrNoMemory Out of memory
- @leave KErrNotFound CMMRdsTunerUtility object is not present
- @leave KErrNotSupported RDS is not supported by the tuner
- @return A pointer and ownership of a fully constructed CMMRdsTunerUtility object
- */
- IMPORT_C static CMMRdsTunerUtility* NewL(CMMTunerUtility& aTuner, MMMTunerObserver& aObserver, CMMTunerUtility::TTunerBand aBand);
-
- IMPORT_C ~CMMRdsTunerUtility();
-
- /**
- Get the RDS capabilities of the device
-
- @param aCaps The capabilities object to fill
- @return A standard system error code
- */
- IMPORT_C TInt GetRdsCapabilities(TRdsCapabilities& aCaps) const;
-
- /**
- Find a radio station which contains RDS data starting at the start frequency
- and searching in the direction specified (i.e. Up or down).
-
- @note this function is subject to the same access control scheme as the Tune
- methods of CMMTunerUtility
-
- @param aStartFrequency The frequency to start searching from, or 0 to start at the
- beginning of the stated band.
- @param aBand The frequency band to search. This must be a FM band.
- @param aSearchDirection The direction to search in
- @param aCircularSeek If set to ETrue the station seek will loop back to the
- other end of the band once the end of the band has been reached.
- (Defaults to ETrue) If not set reaching the end of the band without
- finding a station will result in a callback to MToTuneComplete with error
- KErrNotFound.
- */
- IMPORT_C void StationSearchByRds(TFrequency aStartFrequency,
- CMMTunerUtility::TSearchDirection aSearchDirection
- );
-
- /**
- Find a radio station, of the specified programme type starting at the start
- frequency and searching in the direction specified (i.e. Up or down).
-
- @note this function is subject to the same access control scheme as the Tune
- methods of CMMTunerUtility
-
- @param aProgType The type of programme to search for
- @param aStartFrequency The frequency to start searching from, or 0 to start at the
- beginning of the stated band.
- @param aBand The frequency band to search. This must be a FM band.
- @param aSearchDirection The direction to search in
- @param aCircularSeek If set to ETrue the station seek will loop back to the
- other end of the band once the end of the band has been reached.
- (Defaults to ETrue) If not set reaching the end of the band without
- finding a station will result in a callback to MToTuneComplete with error
- KErrNotFound.
- */
- IMPORT_C void StationSearchByProgrammeType(
- TRdsProgrammeType aProgType,
- TFrequency aStartFrequency,
- CMMTunerUtility::TSearchDirection aSearchDirection
- );
-
- /**
- Find a radio station, with the specified programme identifier starting at the
- start frequency and searching in the direction specified (i.e. Up or down).
-
- @note this function is subject to the same access control scheme as the Tune
- methods of CMMTunerUtility
-
- @param aPi The programme identifier of the station to search for
- @param aStartFrequency The frequency to start searching from, or 0 to start at the
- beginning of the stated band.
- @param aBand The frequency band to search. This must be a FM band.
- @param aSearchDirection The direction to search in
- @param aCircularSeek If set to ETrue the station seek will loop back to the other
- end of the band once the end of the band has been reached. (Defaults to ETrue)
- If not set reaching the end of the band without finding a station will result
- in a callback to MToTuneComplete with error KErrNotFound.
- */
- IMPORT_C void StationSearchByProgrammeIdentifier(
- TRdsProgrammeIdentifier aPi,
- TFrequency aStartFrequency,
- CMMTunerUtility::TSearchDirection aSearchDirection
- );
-
- /**
- Find a radio station, with the specified traffic programme flag value starting at
- the start frequency and searching in the direction specified (i.e. Up or down).
-
- @note this function is subject to the same access control scheme as the Tune
- methods of CMMTunerUtility
-
- @param aTp The TP flag value of a station to search for
- @param aStartFrequency The frequency to start searching from, or 0 to start at the
- beginning of the stated band.
- @param aBand The frequency band to search. This must be a FM band.
- @param aSearchDirection The direction to search in
- @param aCircularSeek If set to ETrue the station seek will loop back to the other
- end of the band once the end of the band has been reached. (Defaults to ETrue)
- If not set reaching the end of the band without finding a station will result
- in a callback to MToTuneComplete with error KErrNotFound.
- */
- IMPORT_C void StationSearchByTrafficProgramme(
- TBool aTp,
- TFrequency aStartFrequency,
- CMMTunerUtility::TSearchDirection aSearchDirection
- );
-
- /**
- Cancels an ongoing RDS search as initiated by one of the functions
- StationSearchByRds, StationSearchByProgrammeType,
- StationSearchByProgrammeIdentifier or StationSearchByTrafficProgramme. The
- asynchronous callback will not occur if this is called.
-
- Has not affect if no RDS search operation is ongoing.
- */
- IMPORT_C void CancelRdsSearch();
-
- /**
- Requests notifications when all RDS data become invalid due to the tuner being
- retuned.
-
- @param aObserver The client to be notified.
- @param aWhichData The subset of data for which change notifications are required.
- @return A standard system wide error code.
- */
- IMPORT_C TInt NotifyRdsDataChange(MMMRdsDataObserver& aObserver, TUint32 aWhichData = TRdsData::KAllRdsData);
-
- /**
- Cancel a NotifyRdsDataChange request.
- */
- IMPORT_C void CancelNotifyRdsDataChange();
-
- /**
- Request some RDS data. This will complete immediately with whatever RDS data have already been
- received.
-
- When this function returns, and data that was requested but is not indicated to be
- valid can be assumed not to have been received.
-
- @param aData The RDS data will be written to this variable.
- @param aValid On return, indicates a subset of RDS data that are valid.
- @param aWhichData The subset of RDS data that are being requested.
- @return A standard system wide error code.
- */
- IMPORT_C TInt GetRdsData(TRdsData& aData, TUint32& aValid, TUint32 aWhichData = TRdsData::KAllRdsData) const;
-
- /**
- Converts an RDS language identifier into a Symbian TLanguage type. Note that not all
- languages defined by the RDS specification IEC62106 are present in the TLanguage
- enumeration; in these cases, a value of ELangOther will be returned.
-
- @param aRdsLangId An RDS language identification code
- @return The corresponding TLanguage member, or ELangOther if none exists.
- */
- IMPORT_C static TLanguage ConvertRdsLanguageId(TRdsLanguageIdentifier aRdsLangId);
-
- /**
- Get the length of the available radio text. If no radio text is available this
- function will return KErrNotFound. The maximum possible length for radio text is 64 characters.
-
- @param aLength The variable to set to the length of the avaiable radio text
- @return A standard system error code.
- */
- IMPORT_C TInt GetRadioTextLength(TUint& aLength) const;
-
- /**
- Get the radio text. If no radio text is available, this will return KErrNotFound. In this
- case, a client can call NotifyRadioText to receive a notification when it is received.
-
- The radio text will have been converted to unicode, eliminating any control characters
- within it.
-
- @param aRadioText The descriptor to fill with the radio text
- @return A standard system error code
- */
- IMPORT_C TInt GetRadioText(TDes& aRadioText) const;
-
- /**
- Request notification when the radio text is received or changes.
-
- @param aObserver The client to be notified when the radio text is received or changes.
- @return A standard system wide error code.
- */
- IMPORT_C TInt NotifyRadioText(MMMRdsDataObserver& aObserver);
-
- /**
- Cancel a NotifyRadioText request.
- */
- IMPORT_C void CancelNotifyRadioText();
-
- /**
- Turns regional link function on or off depending on the value of the parameter.
- A value of ETrue should be passed if you wish to stay tuned to the currently
- tuned local station regardless of signal quality and signal strength.
- i.e. don't switch to another local station in the region.
-
- @param aRegOn ETrue to turn regional link on, EFalse to turn it off
- @return A standard system error code
- */
- IMPORT_C TInt SetRegionalLink(TBool aRegOn);
-
- /**
- Finds out if the regional link function is currently on or off.
-
- @param aRegOn This will be set to ETrue on return if and only if the regional
- link function is currently enabled.
- @return A standard system error code.
- */
- IMPORT_C TInt GetRegionalLink(TBool& aRegOn) const;
-
- /**
- Turn the travel announcement function on or off depending on the value of the
- parameter. A value of ETrue turns on Traffic Announcements, EFalse turns them off.
-
- If Traffic announcements are disabled while the tuner is retuned to a traffic
- announcement, the tuner will not revert to the original frequency. To revert to
- the original frequency, StopAnnouncement() must be called before the traffic
- announcement feature is disabled.
-
- @param aTaOn ETrue to turn TA on, EFalse to turn it off
- @return A standard system error code
- */
- IMPORT_C TInt SetTrafficAnnouncement(TBool aTaOn);
-
- /**
- Finds out if the traffic announcement function is currently enabled or not.
-
- @param aTaOn This is set to ETrue on return if and only if the traffic
- announcement function is currenly enabled.
- */
- IMPORT_C TInt GetTrafficAnnouncement(TBool& aTaOn) const;
-
- /**
- Set the absolute volume to apply during a traffic or news announcement.
-
- @param aVolume The volume to use. Must be between 0 and MaxVolume.
- @return A standard system error code.
- */
- IMPORT_C TInt SetAnnouncementVolume(TInt aVolume);
-
- /**
- Find the current absolute volume level used for news of traffic annoucements.
-
- @param aVolume This will be set to the current volume used for annoucements.
- @return A standard system error code, KErrNotFound if a annoucement volume offset has been set.
- use.
- */
- IMPORT_C TInt GetAnnouncementVolume(TInt& aVolume) const;
-
- /**
- Set the offset to the system volume level to apply during a traffic or news announcement
-
- @param aVolumeOffset The offset to the volume level to set for announcements. Must be between -MaxVolume and MaxVolume inclusive.
- the actual volume with the offset applied will be clipped between 0 and MaxVolume if the offset would
- otherwise result in a volume outside this range.
- @return A standard system error code
- */
- IMPORT_C TInt SetAnnouncementVolumeOffset(TInt aVolumeOffset);
-
- /**
- Find the current offset of the system volume that applies during traffic and news announcements.
-
- @param aVolumeOffset This will be set to the current traffic and news announcement offset on return.
- @return A standard system error code, KErrNotFound if an absolute annoucement volume has been set.
- */
- IMPORT_C TInt GetAnnouncementVolumeOffset(TInt& aVolumeOffset) const;
-
- /**
- Turn the news announcement function on or off depending on the value of the
- parameter. The news announcement function when enabled causes the radio to
- retune to a station when that station is broadcasting a news report. When the
- news announcement is finished the radio will tune back to the original station.
- A value of ETrue turns on News Announcements, EFalse turns them off.
-
- If News announcements are disabled while the tuner is retuned to a news
- announcement, the tuner will not revert to the original frequency. To revert to
- the original frequency, StopAnnouncement() must be called before the news
- announcement feature is disabled.
-
- @param aNaOn ETrue to turn NA on, EFalse to turn it off
- @return A standard system error code
- */
- IMPORT_C TInt SetNewsAnnouncement(TBool aNaOn);
-
- /**
- Finds out whether the news announcement function is on or off.
-
- @param aNaOn This will be set to ETrue if and only if the new announcement
- function is currently on.
- @return A standard system error code.
- */
- IMPORT_C TInt GetNewsAnnouncement(TBool& aNaOn) const;
-
- /**
- Cancels any current announcement, reverting to the original frequency. The announcement
- feature will remain enabled. If no announcement is currently happening, this function
- has no affect. This can be used for both News and Traffic announcements.
-
- @return A standard system error code. KErrNone if an announcement was successfully
- stopped, or KErrNotReady if no announcement is currently happening.
- */
- IMPORT_C TInt StopAnnouncement();
-
- /**
- Turns alternative frequency function on or off depending on the value of the parameter.
- A value of ETrue should be passed if you wish to enable automatic retuning to the current
- station on an alternative frequency.
-
- @param aAfOn ETrue to turn alternative frequency on, EFalse to turn it off
- @return A standard system error code
- */
- IMPORT_C TInt SetAlternativeFrequency(TBool aAfOn);
-
- /**
- Finds out whether the alternative frequency function is on or off.
-
- @param aAfOn This will be set to ETrue if and only if the alternative frequency
- function is currently on.
- @return A standard system error code.
- */
- IMPORT_C TInt GetAlternativeFrequency(TBool& aAfOn) const;
-
- /**
- Requests a notification when RDS functionality is enabled or disabled, or when
- the traffic announcement volume offset is changed.
-
- @param aObserver The class which is to be notified of the changes.
- @return A standard system error code.
- */
- IMPORT_C TInt NotifyRdsStateChange(MMMRdsStateChangeObserver& aObserver);
-
- /**
- Cancels an outstanding RDS state change notification request.
- */
- IMPORT_C void CancelNotifyRdsStateChange();
-
- /**
- Get the current RDS time. This is an asynchronous function due to the latency of
- the RDS information becoming available. This information is broadcast at the start of
- every minute, and is not cached for obvious reasons. Thus, whenever a request is made,
- it will complete next time the Data and Time are broadcast. The RDS standard states
- that this is broadcast within 0.1s of the start of a minute, and is accurate to one
- minute. The latency of the notification reaching the application cannot be guarteed.
-
- @param aTimeAndDate The variable to set to the current RDS time and date
- @param aStatus A TRequestStatus. This will be signalled when the request completes
- and will contain the result of the request, this will be one of the system error codes.
- */
- IMPORT_C void GetRdsTime(TPckg<TDateTime>& aTimeAndDate, TRequestStatus& aStatus) const;
-
- /**
- Cancel the GetRdsTime request
- */
- IMPORT_C void CancelGetRdsTime();
-
- /**
- Request notification when a retune caused by an announcement occurs. This will be
- a traffic or news announcement. A notification will be provided both at
- the start of the announcement and at the end.
-
- @param aObserver The object wishing to receive announcement events
- @return A standard system error code
- */
- IMPORT_C TInt NotifyAnnouncement(MMMRdsAnnouncementObserver& aObserver);
-
- /**
- Cancel the NotifyAnnouncement request
- */
- IMPORT_C void CancelNotifyAnnouncement();
-
- /**
- Returns a list containing information about other networks broadcast with the currently tuned
- programmme. This call will return immediately with whatever EON information is currently available.
- Note that is is possible for this function to return no EON stations when several are being broadcast
- simply because not enough RDS frames have been received yet. An interested application should make a
- call to NotifyEonInfo to receive notifications when EON information is received or changes.
-
- @param aEonInfo An array to which the EON information will be appended.
- */
- IMPORT_C void GetEonInfoL(RArray<TEonStation>& aEonInfo) const;
-
- /**
- Gets the frequencies assoicated with an EON station. This will complete immediately with whatever
- frequencies are currently cached. An interested application should make a call to NotifyEonChange
- to receive notifications when more frequencies are received.
-
- @param aEonStation the EON station to get the frequencies for
- @param aFrequencies an array to which the frequencies associated with the given station will be
- appended.
- */
- IMPORT_C void GetEonFrequenciesL(const TEonStation& aEonStation, RArray<TFrequency>& aFrequencies) const;
-
- /**
- Gets the mapped frequencies associated with an EON station. This will complete immediately with whatever
- mapped frequencies are currently cached. An interested application should make a call to NotifyEonChange
- to receive notifications when more frequencies are received.
-
- @param aEonStation the EON station to get the mapped frequencies for
- @param aMappedFrequencies an array to which the mapped frequencies associated with the given station
- will be appended.
- */
- IMPORT_C void GetEonMappedFrequenciesL(const TEonStation& aEonStation, RArray<TEonMappedFrequency>& aMappedFrequencies) const;
-
- /**
- Request notification when the Enhanced Other Networks (EON) information changes.
-
- @param aObserver The client to be notifier when EON information changes or an error occurs.
- */
- IMPORT_C TInt NotifyEonInfo(MMMRdsEonObserver& aObserver);
-
- /**
- Cancels a NotifyEonInfo request.
- */
- IMPORT_C void CancelNotifyEonInfo();
-
- /**
- Tunes to a station represented by a TEonStation. This will result to a callback to MtoTuneComplete.
-
- @param aEonStation The EON station that is to be tuned to.
- */
- IMPORT_C void TuneToEonStation(const TEonStation& aEonStation);
-
- /**
- Send a synchronous custom command to the RDS tuner.
-
- @param aFunction The function number to indicate which function is to be called
- on the interface defined by the first IPC argument
- @param aArgs The IPC arguments to send to the RDS tuner. The first of these
- arguments must be the UID of the interface within the tuner to which the
- command is destined, represented as an integer. Failure to set the first
- argument properly will result in the command completing with
- KErrNotSupported at best, but possibly the client being panicked.
- @return A standard system error code
- */
- IMPORT_C TInt CustomCommandSync(TInt aFunction, const TIpcArgs& aArgs);
-
- /**
- Send an asynchronous custom command to the RDS tuner.
-
- @param aFunction The function number to indicate which function is to be called
- on the interface defined by the first IPC argument
- @param aArgs The IPC arguments to send to the RDS tuner. The first of these
- arguments must be the UID of the interface within the tuner to which the
- command is destined, represented as an integer. Failure to set the first
- argument properly will result in the command completing with
- KErrNotSupported at best, but possibly the client being panicked.
- @param aStatus The TRequestStatus of an active object. This will contain the
- result of the request on completion. The exact range of result values is
- dependent on the interface.
- */
- IMPORT_C void CustomCommandAsync(TInt aFunction, const TIpcArgs& aArgs, TRequestStatus& aStatus);
-
-private:
- CMMRdsTunerUtility();
-private:
- class CBody;
- CBody* iBody;
-
-};
-
-/**
-This mixin class should be implemented by applications wishing to receive notifications
-when RDS data is received, changes or becomes invalid. Each method corresponds to a
-particular request in CMMRdsTunerUtility. Only methods corresponding to requests in
-CMMRdsTunerUtility that are used by a client need be implemented - empty default
-implementations are provided.
-*/
-class MMMRdsDataObserver
-{
-public:
- /**
- Called when some error occurs which makes RDS data unavailable.
- */
- virtual void MrdoError(TInt aError) = 0;
-
- /**
- Called when some RDS data is received or has changed.
-
- Two subsets of the RDS data supplied are indicted: that which has changed and that which is
- valid. This information can be interpreted as follows:
- For an item of RDS data x:
- valid(x) & !changed(x) => x was received before and has not changed
- valid(x) & changed(x) => x has either just been received for the first time, or has just changed
- !valid(x) & changed(x) => x is no longer available
- !valid(x) & !changed(x) => x was not available before, and is still not available.
-
- When the tuner is retuned to a new station, all RDS data will be flushed. This will result in
- a call to this function indicating that all RDS data has changed and is longer valid.
-
- @param aData The RDS data.
- @param aValid Indicates a subset of aData that is valid (i.e. has been received)
- @param aChanged Indicates a subset of aData that has changed since the last call to this function.
- */
- virtual void MrdoDataReceived(const TRdsData& aData, TUint32 aValid, TUint32 aChanged) = 0;
-
- /**
- Called when the RDS Radio Text (RT) is received, changes, or is no longer available.
-
- @param aRt The Radio Text message. This will be empty if aValid==EFalse.
- @param aValid Indicates if the radio text is valid.
- @param aChanges Indicates if the radio test has changed.
- */
- virtual void MrdoRadioTextReceived(const TDesC& aRt, TBool aValid, TBool aChanged) = 0;
-};
-
-/**
-The state change observer mixin class defines the interface via which changes to
-the state of the RDS radio can be observed. These state changes will be a result
-of a client enabling or disabling RDS functionality.
-*/
-class MMMRdsStateChangeObserver
-{
-public:
- /**
- Called when the regional link functionality is enabled/disabled.
-
- @param aNewRegLinkOn The new setting: ETrue if the regional link function has
- just been enabled.
- */
- virtual void MrscoRegionalLinkChanged(TBool aNewRegLinkOn) = 0;
-
- /**
- Called when the traffic announcement functionality has just been enabled or
- disabled.
-
- @param aNewTaOn ETrue if the TA function is now on, EFalse otherwise.
- */
- virtual void MrscoTrafficAnnouncementChanged(TBool aNewTaOn) = 0;
-
- /**
- Called when the traffic and news announcement volume offset is changed. A callback to
- this method indicates the a volume offset is being used instead of an absolute volume.
-
- @param aOldOffset The announcement volume offset before the change
- @param aNewOffset The announcement volume offset after the change
- */
- virtual void MrscoAnnouncementVolumeOffsetChanged(TInt aOldOffset, TInt aNewOffset) = 0;
-
- /**
- Called when the traffic an news announcement volume is changed. A callback to
- this method indicates that an absolute volume is being used instead of volume offsets.
-
- @param aOldVolume The announcement volume before the change.
- @param aNewVolume The announcement volume after the change.
- */
- virtual void MrscoAnnouncementVolumeChanged(TInt aOldVolume, TInt aNewVolume) = 0;
-
- /**
- Called when the news announcement functionality has just been enabled or
- disabled.
-
- @param aNewNAOn ETrue if the NA function is now enabled, else EFalse.
- */
- virtual void MrscoNewsAnnouncementChanged(TBool aNewNAOn) = 0;
-
- /**
- Called when the alternative frequencies function is turned on or off.
-
- @param aNewAFOn ETrue if the AF function has just been turned on, else EFalse.
- */
- virtual void MrscoAlternativeFrequenciesChanged(TBool aNewAFOn) = 0;
-};
-
-
-/**
-The Announcement Observer mixin class defines the interface via which
-announcement events can be received. A client interested in such
-information calls the function NotifyAnnouncement.
-*/
-class MMMRdsAnnouncementObserver
-{
-public:
- /**
- Called when an announcement starts
-
- @param aType The type of announcement (travel or news)
- */
- virtual void MraoAnnouncementStart(CMMRdsTunerUtility::TAnnouncementType aType) = 0;
-
- /**
- Called when an announcement ends
-
- @param aType The type of announcement (travel or news)
- */
- virtual void MraoAnnouncementEnd(CMMRdsTunerUtility::TAnnouncementType aType) = 0;
-
- /**
- Called when an error occurs which results in announcement notifications
- becoming unavailable.
- */
- virtual void MraoError(TInt aError) = 0;
-};
-
-/**
-The enhanced other networks observer mixin class defines the interface via
-which changes to the enhanced other networks information can be notified. A
-client interested in such information calls the function NotifyEonChange.
-*/
-class MMMRdsEonObserver
-{
-public:
- /**
- Called when some details of an EON station change. The station can be referenced
- to an existing one using it's Programme Identifier, which cannot change.
-
- @param aStation A TEonStation containing the new information about the station.
- @param aChanged The subset of the members of aStation that have changed. Bits are
- set according to TEonStation::TField.
- */
- virtual void MreoEonStationChanged(const TEonStation& aStation, TUint32 aChanged) = 0;
-
- /**
- Called when details of a new EON station are received.
-
- @param aStation A TEonStation containing the new information about the station.
- */
- virtual void MreoNewEonStation(const TEonStation& aStation) = 0;
-
- /**
- Called when details of <b>all</b> EON stations cease to be broadcast. This will
- typically happen when the tuner is retuned. More EON stations may continue to be
- recieved: this call does not indicate that EON information is no longer available.
- */
- virtual void MreoAllEonStationsRemoved() = 0;
-
- /**
- Called when details of an EON station cease to be broadcast.
-
- @param aPi The programme identifier of the EON station which has been removed.
- */
- virtual void MreoEonStationRemoved(const TRdsProgrammeIdentifier& aPi) = 0;
-
- /**
- Called when an error occurs resulting in EON notifications not being available.
- */
- virtual void MreoError(TInt aError) = 0;
-};
-
-#include <tuner.inl>
-
-#endif // TUNER_H
-
-// End of file
-
--- a/javauis/amms_qt/src_tuner/native/external_include/tuner.inl Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Inline functions for Tuner component.
-*
-*/
-
-
-TTunerCapabilities::TTunerCapabilities()
- : iTunerBands(0), iAdditionalFunctions(0)
-{}
-
-TTunerCapabilities::TTunerCapabilities(TUint32 aTunerBands, TUint32 aAdditionalFunctions)
- : iTunerBands(aTunerBands), iAdditionalFunctions(aAdditionalFunctions)
-{}
-
-TFrequency::TFrequency()
- : iFrequency(0)
-{}
-
-TFrequency::TFrequency(TInt aFrequency)
- : iFrequency(aFrequency)
-{}
-
-TInt TFrequency::operator==(const TFrequency& aFrequency) const
-{
- return (iFrequency==aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator!=(const TFrequency& aFrequency) const
-{
- return (iFrequency!=aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator> (const TFrequency& aFrequency) const
-{
- return (iFrequency>aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator>=(const TFrequency& aFrequency) const
-{
- return (iFrequency>=aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator< (const TFrequency& aFrequency) const
-{
- return (iFrequency<aFrequency.iFrequency);
-}
-
-TInt TFrequency::operator<=(const TFrequency& aFrequency) const
-{
- return (iFrequency<=aFrequency.iFrequency);
-}
-
-TRdsData::TRdsData()
-{
-}
-
-TEonMappedFrequency::TEonMappedFrequency(TFrequency aTuningFrequency, TFrequency aMappedFrequency)
- : iTuningFrequency(aTuningFrequency), iMappedFrequency(aMappedFrequency)
-{
-}
-
-TInt TRdsProgrammeItemNumber::operator==(const TRdsProgrammeItemNumber& aPin) const
-{
- return ((iDayOfMonth==aPin.iDayOfMonth)&&(iHour==aPin.iHour)&&(iMinute==aPin.iMinute));
-}
-
-TInt TRdsProgrammeItemNumber::operator!=(const TRdsProgrammeItemNumber& aPin) const
-{
- return (!((*this)==aPin));
-}
-
-// End of file
--- a/javauis/amms_qt/src_tuner/native/inc/ammstunerfactory.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is used to create tuner player and control
-*
-*/
-
-
-
-#ifndef AMMSTUNERFACTORY_H
-#define AMMSTUNERFACTORY_H
-
-// INCLUDES
-#include <e32base.h>
-
-#include "CAMMSTunerControl.h"
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-class CAMMSTunerControl;
-
-// CLASS DECLARATION
-/**
-* This class is used to create tuner player and control.
-* It parses locator parameters and set them to control.
-*/
-
-NONSHARABLE_CLASS(AMMSTunerFactory)
-{
-public: // Constructors and destructor
-
- /**
- * Destructor.
- */
- virtual ~AMMSTunerFactory();
-
-public: // New functions
-
- /**
- * ?member_description.
- * @param aTunerPlayer
- * @param aLocatorParams
- */
- static void CreatePlayerL(CAMMSTunerPlayer** aTunerPlayer,
- const TDesC* aLocatorParams);
-
-protected: // New functions
-
- /**
- * Parse all locator parameters.
- * @param aLocatorParams
- * @param aFrequency
- * @param aStereoMode
- * @param aPreset
- */
- static void ParseParamsL(const TDesC* aLocatorParams,
- TInt& aFrequency,
- TInt& aStereoMode,
- TInt& aPreset);
-
- /**
- * Parses frequency parameter
- * @param aFrequency - locator's frequency parameter
- * @return frequency in TInt
- */
- static TInt ParseFreqL(const TPtrC aFrequency);
-
- /**
- * Converts TPtrC to TReal using TLex.
- * @param aHertz - hertzs in TPtrC
- * @return hertzs in TReal
- */
- static TReal TDesCToTRealL(const TPtrC aHertz);
-
-private:
-
- /**
- * C++ default constructor.
- */
- AMMSTunerFactory();
-};
-
-#endif // AMMSTUNERFACTORY_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunercontrol.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,290 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Control for tuner
-*
-*/
-
-
-#ifndef CAMMSTUNERCONTROL_H
-#define CAMMSTUNERCONTROL_H
-
-// INCLUDES
-#include <e32base.h>
-#include <tuner.h>
-
-#include <CMMAControl.h>
-
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-class CAMMSTunerPresetsHandler;
-
-// CLASS DECLARATION
-/**
-* Control for tuner
-*/
-
-NONSHARABLE_CLASS(CAMMSTunerControl) : public CMMAControl,
- public MMMTunerObserver,
- public MMMTunerChangeObserver,
- public MMMTunerStereoObserver
-{
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CAMMSTunerControl* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CAMMSTunerControl();
-
-public: // New functions
-
- /**
- * Getter for CMMTunerUtility
- * @return CMMTunerUtility
- */
- CMMTunerUtility* TunerUtility();
-
- /**
- * Gets the minimum frequency supported by this tuner
- * with the given modulation.
- * @return minimum frequency supported by this tuner
- */
- TInt MinFreqL();
-
- /**
- * Gets the maximum frequency supported by this tuner
- * with the given modulation.
- * @return maximum frequency supported by this tuner
- */
- TInt MaxFreqL();
-
- /**
- * Tunes to the given frequency or to the closest supported frequency.
- * @param aFreq - the frequency in Hertzs that will be taken into use
- * @return the frequency in 100 Hertzs that was taken into use
-
- */
- void SetFrequencyL(TInt aFreq);
-
- /**
- * Gets the frequency which the tuner has been tuned to.
- * @return the frequency to which the device has been tuned,
- * in 100 Hertzs
- */
- TInt FrequencyL();
-
- /**
- * Seeks for the next broadcast signal.
- * @param aStartFreq - the frequency in Hertzs wherefrom the scan starts
- * @param aUpwards - if true, the scan proceeds towards higher
- * frequencies, otherwise towards lower frequencies
- * @return the found frequency
- */
- TInt SeekL(TInt aStartFreq, TBool aUpwards);
-
- /**
- * Gets the current squelching (muting in frequencies without broadcast)
- * setting.
- * @return true if squelch is on or false if squelch is off
- */
- TBool SquelchL();
-
- /**
- * Sets squelching on or off.
- * @param aSquelch - true to turn the squelch on or false
- * to turn the squelch off
- */
- void SetSquelchL(TBool aSquelch);
-
- /**
- * Gets the strength of the recepted signal.
- * @return a value between 0 and 100 where 0 means the faintest
- * and 100 the strongest possible signal strength
- */
- TInt SignalStrengthL();
-
- /**
- * Gets the stereo mode in use.
- * @return stereo mode in use
- */
- TInt StereoModeL();
-
- /**
- * Sets the stereo mode.
- * @param aMode - the stereo mode to be used
- */
- void SetStereoModeL(TInt aMode);
-
- /**
- * Tunes the tuner by using settings specified in the preset.
- * @param aPreset - the preset to be used.
- */
- void UsePresetL(TInt aPreset);
-
- /**
- * Configures the preset using current frequency and modulation
- * and stereo mode.
- * @param aPreset - the preset to be set.
- */
- void SetPresetL(TInt aPreset);
-
- /**
- * Configures the preset using given settings.
- * @param aPreset - the preset to be set.
- * @param aFrequency - the frequency to be set.
- * @param aStereoMode - the stereo mode to be set.
- */
- void SetPresetL(TInt aPreset, TInt aFrequency, TInt aStereoMode);
-
- /**
- * Gets preset frequency
- * @param aPreset - the preset whose frequency is to be returned
- . * @return the frequency of the preset in 100 Hertzs
- */
- TInt PresetFrequencyL(TInt aPreset);
-
- /**
- * Gets preset stereo mode
- * @param aPreset - the preset whose stereo mode is to be returned
- . * @return the stereo mode of the preset.
- */
- TInt PresetStereoModeL(TInt aPreset);
-
- /**
- * Set preset name
- * @param aPreset - the preset whose name is to be set
- * @param aPresetName - the name of the preset
- */
- void SetPresetNameL(TInt aPreset, const TDesC* aPresetName);
-
- /**
- * Get preset name
- * @param aPreset - the preset whose name is asked
- * @param aPresetName - the name of the preset
- */
- void GetPresetNameL(TInt aPreset, TPtrC* aPresetName);
-
-public: // functions from base classes
-
- // from CMMAControl
-
- const TDesC& ClassName() const;
-
- const TDesC& PublicClassName() const;
-
- // from MMMTunerObserver
-
- void MToTuneComplete(TInt aError);
-
- // from class MMMTunerChangeObserver
-
- /**
- Called when the tuned frequency changes
-
- @param aOldFrequency The frequency in use before the change
- @param aNewFrequency The new tuned frequency
- */
- void MTcoFrequencyChanged(const TFrequency& aOldFrequency,
- const TFrequency& aNewFrequency);
-
- /**
- Called when the state of the tuner changes.
-
- @param aOldState The old state. Bits are set according to TTunerState.
- @param aNewState The new state. Bits are set according to TTunerState.
- */
- void MTcoStateChanged(const TUint32& aOldState,
- const TUint32& aNewState);
-
- /**
- This function is called when an external antenna is detached from the device.
- This does not necessarily indicate that the tuner can no longer be used; the
- capabilities of the tuner indicate if the external antenna is required in order
- to use the tuner.
- */
- void MTcoAntennaDetached();
-
- /**
- This function is called when an external antenna is attached to the device. If
- the antenna is required to use the tuner, this indicates that the tuner can be
- used again.
- */
- void MTcoAntennaAttached();
-
- /**
- This function is called when the device enters or leaves flight mode. If the tuner
- cannot be used in flight mode when the device enters this mode, this indicates
- that the tuner can no longer be used; the capabilities of the tuner indicate if
- it can be used in flight mode or not.
-
- @param aFlightMode ETrue if the device has just entered flight mode, EFalse if
- flight mode has just been left.
- */
- void FlightModeChanged(TBool aFlightMode);
-
- // from class MMMTunerStereoObserver
-
- /**
- Called when stereo reception is lost/restored.
-
- @param aStereo If true, indicates that stereo reception has just been restored.
- If false, indicates that stereo reception has just been lost.
- */
- void MTsoStereoReceptionChanged(TBool aStereo);
-
- /**
- Called when a client enables/disabled forced mono reception.
-
- @param aForcedMono ETrue if reception is forced to be mono, even when a stereo
- signal is available.
- */
- void MTsoForcedMonoChanged(TBool aForcedMono);
-
-
-private:
-
- /**
- * C++ default constructor.
- */
- CAMMSTunerControl();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- // Prohibit copy constructor if not deriving from CBase.
- // CAMMSTunerControl( const CAMMSTunerControl& );
- // Prohibit assigment operator if not deriving from CBase.
- // CAMMSTunerControl& operator=( const CAMMSTunerControl& );
-
-
-private: // Data
-
- TInt iMinFreq;
- TInt iMaxFreq;
-
- CMMTunerUtility* iTunerUtility;
- CActiveSchedulerWait* iActiveSchedulerWait;
- CAMMSTunerPresetsHandler* iPresetsHandler;
-};
-
-#endif // CAMMSTUNERCONTROL_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunerplayer.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-
-
-#ifndef CAMMSTUNERPLAYER_H
-#define CAMMSTUNERPLAYER_H
-
-// INCLUDES
-#include <CMMAPlayer.h>
-#include "CAMMSTunerControl.h"
-
-#include <e32base.h>
-#include <tuner.h>
-
-
-// CLASS DECLARATION
-
-/**
-* Player for tuner
-*
-*/
-NONSHARABLE_CLASS(CAMMSTunerPlayer) : public CMMAPlayer,
- public MMMTunerAudioPlayerObserver
-{
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CAMMSTunerPlayer* NewL(CAMMSTunerControl* aTunerControl);
-
- /**
- * Destructor.
- */
- virtual ~CAMMSTunerPlayer();
-
-public: // from CMMAPlayer
-
- void PrefetchL();
- void StartL();
- void StopL(TBool aPostEvent);
- void DeallocateL();
- void GetMediaTime(TInt64* aMediaTime);
-
-public: // from MMMTunerAudioPlayerObserver
-
- void MTapoInitializeComplete(TInt aError);
- void MTapoPlayEvent(MMMTunerAudioPlayerObserver::TEventType aEvent, TInt aError, TAny* aAdditionalInfo);
-
-private:
-
- /**
- * C++ default constructor.
- */
- CAMMSTunerPlayer();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL(CAMMSTunerControl* aTunerControl);
-
-
- TInt64 CurrentTime();
-
-private: // Data
- CMMTunerAudioPlayerUtility* iTunerPlayerUtility;
- CAMMSTunerControl* iTunerControl;
- CActiveSchedulerWait* iActiveSchedulerWait;
-
- TBool iIsInitialized;
- TInt64 iMediaTime;
- TInt64 iStartTime;
-};
-
-#endif // CAMMSTUNERPLAYER_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunerpresetshandler.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class handles presets central repository usage.
-*
-*/
-
-
-
-#ifndef CAMMSTUNERPRESETSHANDLER_H
-#define CAMMSTUNERPRESETSHANDLER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <centralrepository.h>
-
-
-// FORWARD DECLARATIONS
-class TAMMSTunerPreset;
-
-// CLASS DECLARATION
-/**
-* This class handles presets central repository usage.
-*
-* @lib ?library
-* @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CAMMSTunerPresetsHandler) : public CBase
-{
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CAMMSTunerPresetsHandler* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CAMMSTunerPresetsHandler();
-
-public: // New functions
-
- /**
- * Gets presets from central repository
- * @param aPreset - presets index
- * @param aTunerPreset
- */
- void GetPresetL(TInt aPreset, TAMMSTunerPreset &aTunerPreset);
-
- /**
- * Save presets to central repository
- * @param aPreset - presets index
- * @param aTunerPreset
- */
- void SavePresetL(TInt aPreset, TAMMSTunerPreset aTunerPreset);
-
-private:
-
- /**
- * C++ default constructor.
- */
- CAMMSTunerPresetsHandler();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- // Prohibit copy constructor if not deriving from CBase.
- // CAMMSTunerPresetsHandler( const CAMMSTunerPresetsHandler& );
- // Prohibit assigment operator if not deriving from CBase.
- // CAMMSTunerPresetsHandler& operator=( const CAMMSTunerPresetsHandler& );
-
-
-private: // Data
-
- CRepository* iCentralRepository;
-
-
-};
-
-#endif // CAMMSTUNERPRESETSHANDLER_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/cammstunervolumecontrol.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is used for setting volume to tuner player
-*
-*/
-
-
-#ifndef CAMMSTUNERVOLUMECONTROL_H
-#define CAMMSTUNERVOLUMECONTROL_H
-
-// INCLUDES
-#include <e32base.h>
-
-#include <CMMAVolumeControl.h>
-
-// FORWARD DECLARATIONS
-class CAMMSTunerPlayer;
-
-// CLASS DECLARATION
-/**
-* This class is used for setting volume to tuner player
-*/
-
-NONSHARABLE_CLASS(CAMMSTunerVolumeControl) : public CMMAVolumeControl
-{
-public: // Constructor
- static CAMMSTunerVolumeControl* NewL(CAMMSTunerPlayer* aTunerPlayer);
-
-public: // functions from base classes
-
- // from CMMAVolumeControl
-
- void DoSetLevelL(TInt aLevel);
-
-private:
-
- /**
- * C++ default constructor.
- */
- CAMMSTunerVolumeControl(CAMMSTunerPlayer* aTunerPlayer);
-
-
-private: // Data
-
- CAMMSTunerPlayer* iTunerPlayer;
-};
-
-#endif // CAMMSTUNERVOLUMECONTROL_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/inc/tammstunerpreset.h Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Helper class for preset handling, reads and writes preset
-* values in/out stream.
-*
-*/
-
-
-
-#ifndef TAMMSTUNERPRESET_H
-#define TAMMSTUNERPRESET_H
-
-// INCLUDES
-#include <e32base.h>
-
-
-// FORWARD DECLARATIONS
-class RWriteStream;
-class RReadStream;
-
-// CONSTANTS
-const TInt KPresetNameLength = 100;
-
-// CLASS DECLARATION
-/**
-* Helper class for preset handling, reads and writes preset
-* values in/out stream.
-*
-* @lib ?library
-* @since ?Series60_version
-*/
-NONSHARABLE_CLASS(TAMMSTunerPreset)
-{
-public:
-
- /**
- * C++ default constructor.
- */
- TAMMSTunerPreset();
-
- /**
- * Setter for preset name.
- */
- void SetPresetName(const TDesC* aPresetName);
-
- /**
- * Setter for preset frequency.
- */
- void SetPresetFrequency(const TInt aPresetFrequency);
-
- /**
- * Setter for preset stereo mode.
- */
- void SetPresetStereoMode(const TInt aPresetStereoMode);
-
- /**
- * Getter for preset name.
- */
- TPtrC PresetName();
-
- /**
- * Getter for preset frequency.
- */
- TInt PresetFrequency();
-
- /**
- * Getter for preset stereo mode.
- */
- TInt PresetStereoMode();
-
- /**
- * Serialize the data to stream.
- * @param aStream - used for write stream
- */
- void ExternalizeL(RWriteStream &aStream) const;
-
- /**
- * deserialize the data out of stream.
- * @param aStream used for read stream
- */
- void InternalizeL(RReadStream &aStream);
-
-private:
-
- TBuf<KPresetNameLength> iPresetName;
- TInt iPresetFrequency;
- TInt iPresetStereoMode;
-
-};
-
-#endif // TAMMSTUNERPRESET_H
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/ammstunerfactory.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is used to create tuner player and control
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "AMMSTunerFactory.h"
-#include "CAMMSTunerPlayer.h"
-#include "CAMMSTunerControl.h"
-//#include "CAMMSTunerVolumeControl.h"
-#include <CMMAPlayerProperties.h>
-
-#include <e32std.h>
-#include <e32math.h>
-#include <logger.h>
-
-// CONSTANTS
-_LIT(KFreqParam, "f");
-
-_LIT(KModulationParam, "mod");
-
-_LIT(KStereoModeParam, "st");
-MMA_PARAMETER_STR(KStereoModeParamMono, "mono");
-MMA_PARAMETER_STR(KStereoModeParamStereo, "stereo");
-MMA_PARAMETER_STR(KStereoModeParamAuto, "auto");
-MMA_PARAMETER_ARRAY(KValidStereoModeValues)
-{
- {
- &KStereoModeParamMono
- }, {&KStereoModeParamStereo}, {&KStereoModeParamAuto}
-};
-
-_LIT(KProgramIdParam, "id");
-_LIT(KPresetParam, "preset");
-
-_LIT(KModulationFm, "fm");
-
-_LIT(KStereoModeMono, "mono");
-_LIT(KStereoModeStereo, "stereo");
-_LIT(KStereoModeAuto, "auto");
-
-const TInt KMegaHertzChar = 'M';
-const TInt KKiloHertzChar = 'k';
-const TInt KFreqDotChar = '.';
-
-const TInt KMegaHzMultiplier = 1000000;
-const TInt KKiloHzMultiplier = 1000;
-
-const TInt KStereoModeMonoInt = 1;
-const TInt KStereoModeStereoInt = 2;
-const TInt KStereoModeAutoInt = 3;
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Destructor
-AMMSTunerFactory::~AMMSTunerFactory()
-{
-
-}
-
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::CreatePlayerL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void AMMSTunerFactory::CreatePlayerL(CAMMSTunerPlayer** aTunerPlayer,
- const TDesC* aLocatorParams)
-{
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL +");
-
- TInt frequency = 0;
- TInt stereoMode = 0;
- TInt preset = 0;
-
- if (aLocatorParams->Length() != 0)
- {
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL 1");
- ParseParamsL(aLocatorParams, frequency, stereoMode, preset);
- }
-
- //create tunercontrol
- CAMMSTunerControl* tunerControl = CAMMSTunerControl::NewL();
- CleanupStack::PushL(tunerControl);
-
- //set values to tunercontrol
- if (frequency > 0)
- {
- tunerControl->SetFrequencyL(frequency);
- }
-
- if (frequency == 0)
- {
- //by default frequency is fm modulation's min freq
- tunerControl->SetFrequencyL(tunerControl->MinFreqL());
- }
-
- if (stereoMode > 0)
- {
- tunerControl->SetStereoModeL(stereoMode);
- }
-
- if (preset > 0)
- {
- tunerControl->UsePresetL(preset);
- }
-
- //create tunerplayer
- *aTunerPlayer = CAMMSTunerPlayer::NewL(tunerControl);
-
- //create tunervolumeconrol
- //CAMMSTunerVolumeControl* tunerVolumeControl = CAMMSTunerVolumeControl::NewL( *aTunerPlayer );
-
- //add controls to player
- (*aTunerPlayer)->AddControlL(tunerControl);
- //(*aTunerPlayer)->AddControlL( tunerVolumeControl );
- CleanupStack::Pop(tunerControl);
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::CreatePlayerL -");
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::ParseParamsL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void AMMSTunerFactory::ParseParamsL(const TDesC* aLocatorParams,
- TInt& aFrequency,
- TInt& aStereoMode,
- TInt& aPreset)
-{
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseParamsL +");
- CMMAParameterRuleSet* rules = CMMAParameterRuleSet::NewLC();
-
- //freq rule
- TMMAParameterRuleDes freqRule(KFreqParam);
- rules->AppendRuleL(&freqRule);
-
- //modulation rule
- TMMAParameterRuleDes modulationRule(KModulationParam);
- rules->AppendRuleL(&modulationRule);
-
- //stereo mode rule
- TMMAParameterRuleDes stereoModeRule(KStereoModeParam, KValidStereoModeValues,
- MMA_PARAMETER_ARRAY_SIZE(KValidStereoModeValues));
- rules->AppendRuleL(&stereoModeRule);
-
- //preset rule KMinTInt-KMaxTInt
- TMMAParameterRuleInt presetRule(KPresetParam);
- rules->AppendRuleL(&presetRule);
-
- //id rule
- TMMAParameterRuleDes idRule(KProgramIdParam);
- rules->AppendRuleL(&idRule);
-
- CMMAPlayerProperties* properties = CMMAPlayerProperties::NewL(*aLocatorParams, *rules);
- CleanupStack::PushL(properties);
-
- // validating properties
- properties->ValidateL();
-
- //get freq
- TPtrC freq(NULL, 0);
- properties->GetProperty(KFreqParam, freq);
- //parse frequency
- if (freq.Length() != 0)
- {
- aFrequency = ParseFreqL(freq);
- }
-
- //get modulation
- TPtrC modulation(NULL, 0);
- properties->GetProperty(KModulationParam, modulation);
- if (modulation.Length() != 0)
- {
- // only fm modulation is supported
- if (modulation.Compare(KModulationFm) != 0)
- {
- User::Leave(KErrNotSupported);
- }
- }
-
- //get stereo mode
- TPtrC stereoMode(NULL, 0);
- properties->GetProperty(KStereoModeParam, stereoMode);
- if (stereoMode.Compare(KStereoModeMono) == 0)
- {
- aStereoMode = KStereoModeMonoInt;
- }
- else if (stereoMode.Compare(KStereoModeStereo) == 0)
- {
- aStereoMode = KStereoModeStereoInt;
- }
- else if (stereoMode.Compare(KStereoModeAuto) == 0)
- {
- aStereoMode = KStereoModeAutoInt;
- }
-
- //get preset
- properties->GetProperty(KPresetParam, aPreset);
-
- //get id
- TPtrC id(NULL, 0);
- properties->GetProperty(KProgramIdParam, id);
- if (id.Length() != 0)
- {
- // id is not supported
- User::Leave(KErrNotSupported);
- }
-
- CleanupStack::PopAndDestroy(properties);
- CleanupStack::PopAndDestroy(rules);
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseParamsL -");
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::ParseFreqL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt AMMSTunerFactory::ParseFreqL(const TPtrC aFrequency)
-{
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::ParseFreqL +");
- TReal freqReal = 0;
-
- //is value MHz or kHz or just hertz
- TInt freqPrefixMPos = aFrequency.Locate(KMegaHertzChar);
- TInt freqPrefixKPos = aFrequency.Locate(KKiloHertzChar);
-
- if (freqPrefixMPos != KErrNotFound)
- {
- //there is a M
- TPtrC hertz = aFrequency.Left(freqPrefixMPos);
- //TPtrC -> TReal
- TReal value = TDesCToTRealL(hertz);
-
- freqReal = value * KMegaHzMultiplier;
- }
- else if (freqPrefixKPos != KErrNotFound)
- {
- //there is a k
- TPtrC hertz = aFrequency.Left(freqPrefixKPos);
- //TPtrC -> TReal
- TReal value = TDesCToTRealL(hertz);
-
- freqReal = value * KKiloHzMultiplier;
- }
- else
- {
- //parameter value is simply hertz, there is no M or k
- //TPtrC -> TReal
- freqReal = TDesCToTRealL(aFrequency);
- }
- TInt32 freqInt = 0;
- //TReal -> TInt
- TInt err = Math::Int(freqInt, freqReal);
- if (err != KErrNone)
- {
- User::Leave(KErrArgument);
- }
-
- return freqInt;
-}
-
-// -----------------------------------------------------------------------------
-// AMMSTunerFactory::TDesCToTRealL
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TReal AMMSTunerFactory::TDesCToTRealL(const TPtrC aHertz)
-{
- LOG( EJavaAMMS, EInfo, "AMMSTunerFactory::TDesCToTRealL +");
- TReal valueReal = 0;
- TLex lex(aHertz);
- if ((lex.Val(valueReal, KFreqDotChar) != KErrNone) ||
- !lex.Eos())
- {
- User::Leave(KErrArgument);
- }
- return valueReal;
-}
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunercontrol.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,504 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is used to control tuner
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "CAMMSTunerControl.h"
-#include "CAMMSTunerPlayer.h"
-#include "CAMMSTunerPresetsHandler.h"
-#include "TAMMSTunerPreset.h"
-#include "AMMSTunerFactory.h"
-
-#include <tuner.h>
-#include <logger.h>
-
-
-// CONSTANTS
-_LIT(KControlImplName, "com.nokia.amms.control.tuner.TunerControlImpl");
-_LIT(KControlPublicName, "javax.microedition.amms.control.tuner.TunerControl");
-
-const TInt KStereoModeMono = 1;
-const TInt KStereoModeStereo = 2;
-const TInt KStereoModeAuto = 3;
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::CAMMSTunerControl
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerControl::CAMMSTunerControl()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerControl* CAMMSTunerControl::NewL()
-{
- CAMMSTunerControl* self = new(ELeave) CAMMSTunerControl;
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerControl::ConstructL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::ConstructL +");
-
- iTunerUtility = CMMTunerUtility::NewL(*this,
- CMMTunerUtility::ETunerBandFm,
- 1,
- CMMTunerUtility::ETunerAccessPriorityNormal);
-
- iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
-
- iPresetsHandler = CAMMSTunerPresetsHandler::NewL();
-
- iMinFreq = MinFreqL();
- iMaxFreq = MaxFreqL();
-
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::ConstructL -");
-}
-
-
-// Destructor
-CAMMSTunerControl::~CAMMSTunerControl()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::~CAMMSTunerControl +");
- delete iTunerUtility;
- delete iActiveSchedulerWait;
- delete iPresetsHandler;
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::~CAMMSTunerControl -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::TunerUtility()
-// -----------------------------------------------------------------------------
-CMMTunerUtility* CAMMSTunerControl::TunerUtility()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::TunerUtility");
- return iTunerUtility;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MinFreq()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::MinFreqL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MinFreqL +");
- TFrequency minFreq;
- TFrequency maxFreq;
- User::LeaveIfError(iTunerUtility->GetFrequencyBandRange(minFreq,
- maxFreq));
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::MinFreqL = %d", minFreq.iFrequency);
- return minFreq.iFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MaxFreq()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::MaxFreqL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MaxFreqL +");
- TFrequency minFreq;
- TFrequency maxFreq;
- User::LeaveIfError(iTunerUtility->GetFrequencyBandRange(minFreq,
- maxFreq));
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::MaxFreqL = %d", maxFreq.iFrequency);
- return maxFreq.iFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetFrequency()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetFrequencyL(TInt aFreq)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency +");
- if (aFreq < iMinFreq || aFreq > iMaxFreq)
- {
- User::Leave(KErrArgument);
- }
-
- TFrequency freq = TFrequency(aFreq);
-
- TUint32 state = 0;
- iTunerUtility->GetState(state);
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency, state = %d", state);
-
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency = %d", freq.iFrequency);
-
- iTunerUtility->Tune(freq);
- if (!iActiveSchedulerWait->IsStarted())
- {
- iActiveSchedulerWait->Start(); // CSI: 10 Active object state already checked. #
- }
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetFrequency -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::Frequency()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::FrequencyL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::Frequency +");
- TFrequency freq;
-
- User::LeaveIfError(iTunerUtility->GetFrequency(freq));
- TInt frequency = freq.iFrequency;
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::Frequency frequency = %d", frequency);
- return frequency;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SeekL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::SeekL(TInt aStartFreq, TBool aUpwards)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SeekL +");
- if (aStartFreq < iMinFreq || aStartFreq > iMaxFreq)
- {
- User::Leave(KErrArgument);
- }
-
- if (aUpwards)
- {
- iTunerUtility->StationSeek(CMMTunerUtility::ESearchDirectionUp);
- if (!iActiveSchedulerWait->IsStarted())
- {
- iActiveSchedulerWait->Start(); // CSI: 10 Active object state already checked. #
- }
- }
- else
- {
- iTunerUtility->StationSeek(CMMTunerUtility::ESearchDirectionDown);
- if (!iActiveSchedulerWait->IsStarted())
- {
- iActiveSchedulerWait->Start(); // CSI: 10 Active object state already checked. #
- }
- }
-
- return FrequencyL();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SquelchL()
-// -----------------------------------------------------------------------------
-TBool CAMMSTunerControl::SquelchL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SquelchL +");
- TBool enabled = EFalse;
- User::LeaveIfError(iTunerUtility->GetSquelch(enabled));
- return enabled;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetSquelchL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetSquelchL(TBool aSquelch)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetSquelchL +");
- User::LeaveIfError(iTunerUtility->SetSquelch(aSquelch));
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SignalStrengthL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::SignalStrengthL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL +");
- TInt maxSignalStrength = 0;
- TInt signalStrength = 0;
-
- User::LeaveIfError(iTunerUtility->GetMaxSignalStrength(maxSignalStrength));
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL, maxSignalStrength = %d", maxSignalStrength);
- User::LeaveIfError(iTunerUtility->GetSignalStrength(signalStrength));
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerControl::SignalStrengthL, signalStrength = %d", signalStrength);
- if (maxSignalStrength > 0)
- {
- return signalStrength / maxSignalStrength * 100; // CSI: 47 signal strength must be between 0 and 100 #
- }
- return KErrNotSupported;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::StereoModeL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::StereoModeL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::StereoModeL +");
- TBool mono = EFalse;
- TBool stereo = EFalse;
-
- User::LeaveIfError(iTunerUtility->GetForcedMonoReception(mono));
- if (mono)
- {
- return KStereoModeMono;
- }
-
- //User::LeaveIfError( iTunerUtility->IsStereoSignal( stereo ) );
- TInt err = iTunerUtility->IsStereoSignal(stereo);
- //this is for emulator testing, FIX IT
- if (err == KErrNotReady)
- {
- return KStereoModeAuto;
- }
- else if (err != KErrNone)
- {
- User::LeaveIfError(err);
- }
-
- if (stereo)
- {
- return KStereoModeStereo;
- }
-
- return KStereoModeAuto;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetStereoMode()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetStereoModeL(TInt aMode)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetStereoModeL +");
- if (aMode == KStereoModeMono)
- {
- User::LeaveIfError(iTunerUtility->ForceMonoReception(ETrue));
- }
-
- if (aMode == KStereoModeStereo)
- {
- User::LeaveIfError(iTunerUtility->ForceMonoReception(EFalse));
- TBool stereo = EFalse;
- User::LeaveIfError(iTunerUtility->IsStereoSignal(stereo));
- if (!stereo)
- {
- User::Leave(KErrNotSupported);
- }
- }
-
- if (aMode == KStereoModeAuto)
- {
- User::LeaveIfError(iTunerUtility->ForceMonoReception(EFalse));
- }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::UsePresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::UsePresetL(TInt aPreset)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::UsePresetL +");
- TAMMSTunerPreset tunerPreset;
-
- //get presets
- iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
- //set presets to tunerutility
- SetFrequencyL(tunerPreset.PresetFrequency());
- SetStereoModeL(tunerPreset.PresetStereoMode());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetL(TInt aPreset)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetL1 +");
- TAMMSTunerPreset tunerPreset;
-
- //get current frequency
- tunerPreset.SetPresetFrequency(FrequencyL());
- //get current stereo mode
- tunerPreset.SetPresetStereoMode(StereoModeL());
-
- iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetL(TInt aPreset,
- TInt aFrequency,
- TInt aStereoMode)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetL2 +");
- TAMMSTunerPreset tunerPreset;
-
- tunerPreset.SetPresetFrequency(aFrequency);
- tunerPreset.SetPresetStereoMode(aStereoMode);
-
- iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PresetFrequencyL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::PresetFrequencyL(TInt aPreset)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::PresetFrequencyL +");
- TAMMSTunerPreset tunerPreset;
-
- iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
- return tunerPreset.PresetFrequency();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PresetStereoModeL()
-// -----------------------------------------------------------------------------
-TInt CAMMSTunerControl::PresetStereoModeL(TInt aPreset)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::PresetStereoModeL +");
- TAMMSTunerPreset tunerPreset;
-
- iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
- return tunerPreset.PresetStereoMode();
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::SetPresetNameL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::SetPresetNameL(TInt aPreset, const TDesC* aPresetName)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::SetPresetNameL +");
- TAMMSTunerPreset tunerPreset;
-
- iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
- tunerPreset.SetPresetName(aPresetName);
-
- iPresetsHandler->SavePresetL(aPreset, tunerPreset);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::GetPresetNameL()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::GetPresetNameL(TInt aPreset, TPtrC* aPresetName)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::GetPresetNameL +");
- TAMMSTunerPreset tunerPreset;
-
- iPresetsHandler->GetPresetL(aPreset, tunerPreset);
-
- aPresetName->Set(tunerPreset.PresetName());
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::ClassName()
-// -----------------------------------------------------------------------------
-const TDesC& CAMMSTunerControl::ClassName() const
-{
- return KControlImplName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::PublicClassName()
-// -----------------------------------------------------------------------------
-const TDesC& CAMMSTunerControl::PublicClassName() const
-{
- return KControlPublicName;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MToTuneComplete()
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MToTuneComplete(TInt aError)
-{
- if (iActiveSchedulerWait->IsStarted())
- {
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MToTuneComplete AsyncStop");
- iActiveSchedulerWait->AsyncStop();
- }
- ELOG1( EJavaAMMS, "CAMMSTunerControl::MToTuneComplete ERROR = %d", aError);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoFrequencyChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoFrequencyChanged(const TFrequency& /*aOldFrequency*/,
- const TFrequency& /*aNewFrequency*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoFrequencyChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoStateChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoStateChanged(const TUint32& /*aOldState*/,
- const TUint32& /*aNewState*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoStateChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoAntennaDetached
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoAntennaDetached()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoAntennaDetached");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTcoAntennaAttached
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTcoAntennaAttached()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTcoAntennaAttached");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::FlightModeChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::FlightModeChanged(TBool /*aFlightMode*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::FlightModeChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTsoStereoReceptionChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTsoStereoReceptionChanged(TBool /*aStereo*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTsoStereoReceptionChanged");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerControl::MTsoForcedMonoChanged
-// -----------------------------------------------------------------------------
-void CAMMSTunerControl::MTsoForcedMonoChanged(TBool /*aForcedMono*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MTsoForcedMonoChanged");
-}
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunerplayer.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is a tuner player
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "CAMMSTunerPlayer.h"
-#include "CAMMSTunerControl.h"
-
-#include <tuner.h>
-#include <logger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::CAMMSTunerPlayer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPlayer::CAMMSTunerPlayer()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPlayer* CAMMSTunerPlayer::NewL(CAMMSTunerControl* aTunerControl)
-{
- CAMMSTunerPlayer* self = new(ELeave) CAMMSTunerPlayer;
-
- CleanupStack::PushL(self);
- self->ConstructL(aTunerControl);
- CleanupStack::Pop();
-
- return self;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPlayer::ConstructL(CAMMSTunerControl* aTunerControl)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::ConstructL +");
- iTunerControl = aTunerControl;
- iTunerPlayerUtility = iTunerControl->TunerUtility()->TunerPlayerUtilityL(*this);
- iActiveSchedulerWait = new(ELeave) CActiveSchedulerWait();
- iIsInitialized = EFalse;
-
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::ConstructL -");
-}
-
-// Destructor
-CAMMSTunerPlayer::~CAMMSTunerPlayer()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::~CAMMSTunerPlayer +");
- delete iTunerPlayerUtility;
- delete iActiveSchedulerWait;
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::~CAMMSTunerPlayer -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::PrefetchL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::PrefetchL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::PrefetchL +");
- //this must be called before play, stop, mute etc...
- iTunerPlayerUtility->InitializeL(EMdaPriorityNormal,
- EMdaPriorityPreferenceTimeAndQuality);
- if (!iActiveSchedulerWait->IsStarted())
- {
- iActiveSchedulerWait->Start(); // CSI: 10 Active object state already checked. #
- }
-
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::PrefetchL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::StartL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::StartL()
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StartL +");
- if (iIsInitialized)
- {
- // inform java side
- ChangeState(EStarted);
- iTunerPlayerUtility->Play();
- // set time when started
- iStartTime = CurrentTime();
-
- TInt64 time;
- GetMediaTime(&time);
- PostLongEvent(CMMAPlayerEvent::EStarted, time);
- }
- else
- {
- User::Leave(KErrNotReady);
- }
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StartL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::StopL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::StopL(TBool /*aPostEvent*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StopL +");
- if (iIsInitialized)
- {
- ChangeState(EPrefetched);
-
- iTunerPlayerUtility->Stop();
-
- TInt64 time;
- GetMediaTime(&time);
- iStartTime = KErrNotFound;
- PostLongEvent(CMMAPlayerEvent::EStopped, time);
- }
- else
- {
- User::Leave(KErrNotReady);
- }
-
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::StopL -");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::DeallocateL()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::DeallocateL()
-{
-
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::GetMediaTime()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::GetMediaTime(TInt64* aMediaTime)
-{
- if (iState == EStarted)
- {
- // add play time to media time
- iMediaTime += CurrentTime() - iStartTime;
- // set new start time
- iStartTime = CurrentTime();
- }
-
- // set value to parameter
- (*aMediaTime) = iMediaTime;
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::MTapoInitializeComplete
-// Initialize complete event. This event is asynchronous and is received after
-// a call to CMMTunerAudioPlayerUtility::InitializeL().
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::MTapoInitializeComplete(TInt aError)
-{
- ELOG1( EJavaAMMS, "CAMMSTunerPlayer::MTapoInitializeComplete aError = %d", aError);
- if (iActiveSchedulerWait->IsStarted())
- {
- LOG( EJavaAMMS, EInfo, "CAMMSTunerControl::MToTuneComplete AsyncStop");
- iActiveSchedulerWait->AsyncStop();
- }
- if (aError == KErrNone)
- {
- iIsInitialized = ETrue;
- ChangeState(EPrefetched);
- // Inform Java side.
- PostActionCompleted(KErrNone);
- }
- else
- {
- ELOG1( EJavaAMMS, "CAMMSTunerPlayer::MTapoInitializeComplete aError = %d", aError);
- PostLongEvent(CMMAPlayerEvent::EError, aError);
- //User::Leave( aError );
- }
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::MTapoPlayEvent
-// Passes an asychronous event to the tuner client.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-void CAMMSTunerPlayer::MTapoPlayEvent(
- MMMTunerAudioPlayerObserver::TEventType /*aEvent*/,
- TInt /*aError*/, TAny* /*aAdditionalInfo*/)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerPlayer::MTapoPlayEvent +");
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPlayer::CurrentTime()
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-TInt64 CAMMSTunerPlayer::CurrentTime()
-{
- TTime time;
- time.HomeTime();
- return time.Int64();
-}
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunerpresetshandler.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "CAMMSTunerPresetsHandler.h"
-#include "TAMMSTunerPreset.h"
-
-#include <FMRadioEngineCRKeys.h>
-#include <s32mem.h>
-#include <logger.h>
-
-
-// CONSTANTS
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::CAMMSTunerPresetsHandler
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPresetsHandler::CAMMSTunerPresetsHandler()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::ConstructL()
-{
- iCentralRepository = CRepository::NewL(KCRUidFMRadioEngine);
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CAMMSTunerPresetsHandler* CAMMSTunerPresetsHandler::NewL()
-{
- CAMMSTunerPresetsHandler* self = new(ELeave) CAMMSTunerPresetsHandler;
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
-}
-
-
-// Destructor
-CAMMSTunerPresetsHandler::~CAMMSTunerPresetsHandler()
-{
- delete iCentralRepository;
-}
-
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::GetPreset
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::GetPresetL(TInt aPreset, TAMMSTunerPreset &aTunerPreset)
-{
- // KFmRadioPresetChannel1 = The first preset channel's location in central repository
- TInt tempChannelIndex = KFmRadioPresetChannel1 + aPreset;
-
- HBufC8* buf = HBufC8::NewLC(sizeof(TAMMSTunerPreset));
- TPtr8 bufPtr = buf->Des();
-
- TInt err = iCentralRepository->Get(tempChannelIndex, bufPtr);
- if (err == KErrNone)
- {
- RDesReadStream inStream;
- inStream.Open(bufPtr);
- CleanupClosePushL(inStream);
- aTunerPreset.InternalizeL(inStream);
- CleanupStack::PopAndDestroy(&inStream);
- }
- else
- {
- User::Leave(err);
- }
- CleanupStack::PopAndDestroy(); // buf
-}
-
-// -----------------------------------------------------------------------------
-// CAMMSTunerPresetsHandler::SavePreset
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CAMMSTunerPresetsHandler::SavePresetL(TInt aPreset, TAMMSTunerPreset aTunerPreset)
-{
- // KFmRadioPresetChannel1 = The first preset channel's location in central repository
- TInt fieldNameIndex = KFmRadioPresetChannel1 + TUint32(aPreset);
-
- HBufC8* buf = HBufC8::NewLC(sizeof(TAMMSTunerPreset));
- TPtr8 bufPtr = buf->Des();
-
- RDesWriteStream outStream(bufPtr);
- CleanupClosePushL(outStream);
- aTunerPreset.ExternalizeL(outStream);
- outStream.CommitL();
- CleanupStack::PopAndDestroy(&outStream);
-
- iCentralRepository->Set(fieldNameIndex, bufPtr);
- CleanupStack::PopAndDestroy(); //buf
-}
-
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/cammstunervolumecontrol.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class is used for setting volume to tuner player
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "CAMMSTunerVolumeControl.h"
-#include "CAMMSTunerPlayer.h"
-
-#include <logger.h>
-
-
-CAMMSTunerVolumeControl::CAMMSTunerVolumeControl(CAMMSTunerPlayer* aTunerPlayer)
- : CMMAVolumeControl(aTunerPlayer)
-{
- iTunerPlayer = aTunerPlayer;
-}
-
-CAMMSTunerVolumeControl* CAMMSTunerVolumeControl::NewL(CAMMSTunerPlayer* aTunerPlayer)
-{
- LOG( EJavaAMMS, EInfo, "CAMMSTunerVolumeControl::NewL +");
- CAMMSTunerVolumeControl* self = new(ELeave) CAMMSTunerVolumeControl(aTunerPlayer);
-
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
-}
-
-void CAMMSTunerVolumeControl::DoSetLevelL(TInt aLevel)
-{
- LOG1( EJavaAMMS, EInfo, "CAMMSTunerVolumeControl::DoSetLevelL, aLevel = %d", aLevel);
- // TunerPlayer does not currently have SetVolumeL method
- User::Invariant();
-}
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/protocol.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Protocol JNI wrapper.
- *
-*/
-
-
-// EXTERNAL INCLUDES
-//#include <jutils.h>
-#include <logger.h>
-
-// INTERNAL INCLUDES
-#include "com_nokia_microedition_media_protocol_capture_radio_Protocol.h"
-#include <MMAFunctionServer.h>
-#include "CAMMSTunerControl.h"
-#include "CAMMSTunerPlayer.h"
-#include "AMMSTunerFactory.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-// Creates native tuner player
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_media_protocol_capture_radio_Protocol__1createNativeTunerPlayer(
- JNIEnv* aJniEnv,
- jobject /*aPeer*/,
- jint aEventSourceHandle,
- jstring aLocatorParameters)
-{
- LOG( EJavaAMMS, EInfo, "AMMS Java_com_nokia_microedition_media_protocol_capture_radio_Protocol__1createNativeTunerPlayer +");
- MMAFunctionServer* eventSource = reinterpret_cast< MMAFunctionServer* >(aEventSourceHandle);
-
- JStringUtils locatorParams(*aJniEnv, aLocatorParameters);
-
- CAMMSTunerPlayer* tunerPlayer = NULL;
-
- TInt error = eventSource->ExecuteTrap(
- &AMMSTunerFactory::CreatePlayerL,
- &tunerPlayer,
- (const TDesC*)&locatorParams);
-
- ELOG1( EJavaAMMS, "AMMS __1createNativeTunerPlayer, error = %d", error);
-
- if (error != KErrNone)
- {
- return error;
- }
-
- return reinterpret_cast<TInt>(tunerPlayer);
-}
-
--- a/javauis/amms_qt/src_tuner/native/src/tammstunerpreset.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: ?Description
-*
-*/
-
-
-
-// INCLUDE FILES
-#include "TAMMSTunerPreset.h"
-
-#include <s32mem.h>
-#include <logger.h>
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::TAMMSTunerPreset
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-TAMMSTunerPreset::TAMMSTunerPreset()
-{
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetName
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetName(const TDesC* aPresetName)
-{
- iPresetName.Copy(*aPresetName);
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetFrequency
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetFrequency(const TInt aPresetFrequency)
-{
- iPresetFrequency = aPresetFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::SetPresetStereoMode
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::SetPresetStereoMode(const TInt aPresetStereoMode)
-{
- iPresetStereoMode = aPresetStereoMode;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetName
-// -----------------------------------------------------------------------------
-//
-TPtrC TAMMSTunerPreset::PresetName()
-{
- return iPresetName;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetFrequency
-// -----------------------------------------------------------------------------
-//
-TInt TAMMSTunerPreset::PresetFrequency()
-{
- return iPresetFrequency;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::PresetStereoMode
-// -----------------------------------------------------------------------------
-//
-TInt TAMMSTunerPreset::PresetStereoMode()
-{
- return iPresetStereoMode;
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::ExternalizeL
-// Writes preset values to stream.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::ExternalizeL(RWriteStream& aStream) const
-{
- aStream<<iPresetName;
- aStream.WriteUint32L(iPresetFrequency);
- aStream.WriteUint32L(iPresetStereoMode);
-}
-
-// -----------------------------------------------------------------------------
-// TAMMSTunerPreset::InternalizeL
-// Reads preset values from stream.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void TAMMSTunerPreset::InternalizeL(RReadStream& aStream)
-{
- aStream>>iPresetName;
- iPresetFrequency = aStream.ReadUint32L();
- iPresetStereoMode = aStream.ReadUint32L();
-}
-
-// End of File
--- a/javauis/amms_qt/src_tuner/native/src/tunercontrol.cpp Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,731 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: TunerControl JNI wrapper.
- *
-*/
-
-
-// EXTERNAL INCLUDES
-//#include <jutils.h>
-
-// INTERNAL INCLUDES
-#include "com_nokia_amms_control_tuner_TunerControlImpl.h"
-#include <MMAFunctionServer.h>
-#include "CAMMSTunerControl.h"
-#include "jstringutils.h"
-using namespace java::util;
-
-/**
-* Static delegator function for getMinFreq
-*/
-LOCAL_C void GetMinFreqL(CAMMSTunerControl* aNativeClass,
- TInt *aMinFreq)
-{
-
- *aMinFreq = aNativeClass->MinFreqL();
-}
-
-/**
-* getMinFreq JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getMinFreq(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- TInt minFreq;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetMinFreqL,
- nativeHandle,
- &minFreq);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- return minFreq;
-}
-
-
-/**
-* Static delegator function for getMaxFreq
-*/
-LOCAL_C void GetMaxFreqL(CAMMSTunerControl* aNativeClass,
- TInt *aMaxFreq)
-{
-
- *aMaxFreq = aNativeClass->MaxFreqL();
-}
-
-/**
-* getMaxFreq JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getMaxFreq(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- TInt maxFreq;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetMaxFreqL,
- nativeHandle,
- &maxFreq);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- return maxFreq;
-}
-
-
-/**
-* Static delegator function for setFrequency
-*/
-LOCAL_C void SetFreqL(CAMMSTunerControl* aNativeClass,
- TInt aFreq)
-{
-
- aNativeClass->SetFrequencyL(aFreq);
-}
-
-/**
-* Static delegator function for getFrequency
-*/
-LOCAL_C void GetFreqL(CAMMSTunerControl* aNativeClass,
- TInt *aFreq)
-{
- *aFreq = aNativeClass->FrequencyL();
-}
-
-/**
-* setFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setFrequency(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aFreq)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SetFreqL,
- nativeHandle,
- aFreq);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- //get tuned frequency
- TInt tunedFreq;
- err = eventSource->ExecuteTrap(GetFreqL,
- nativeHandle,
- &tunedFreq);
- if (err != KErrNone)
- {
- return err;
- }
-
- return tunedFreq;
-}
-
-/**
-* getFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getFrequency(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- TInt freq;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetFreqL,
- nativeHandle,
- &freq);
- if (err != KErrNone)
- {
- return err;
- }
-
- return freq;
-}
-
-
-/**
-* Static delegator function for seek
-*/
-LOCAL_C void SeekL(CAMMSTunerControl* aNativeClass,
- TInt aStartFreq,
- TBool aUpwards,
- TInt* aSeekedFreq)
-{
-
- *aSeekedFreq = aNativeClass->SeekL(aStartFreq, aUpwards);
-}
-
-/**
-* seek JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1seek(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aStartFreq,
- jboolean aUpwards)
-{
- TInt seekedFreq;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SeekL,
- nativeHandle,
- aStartFreq,
- (TBool) aUpwards,
- &seekedFreq);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- return seekedFreq;
-}
-
-
-/**
-* Static delegator function for getSquelch
-*/
-LOCAL_C void GetSquelchL(CAMMSTunerControl* aNativeClass,
- TBool* aSquelch)
-{
-
- *aSquelch = aNativeClass->SquelchL();
-}
-
-/**
-* getSquelch JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getSquelch(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TBool squelch = EFalse;
-
- TInt err = eventSource->ExecuteTrap(GetSquelchL,
- nativeHandle,
- &squelch);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- if (!squelch)
- {
- //return 1 if false
- return 1;
- }
- //return 0 if true
- return KErrNone;
-}
-
-
-/**
-* Static delegator function for setSquelch
-*/
-LOCAL_C void SetSquelchL(CAMMSTunerControl* aNativeClass,
- TBool aSquelch)
-{
-
- aNativeClass->SetSquelchL(aSquelch);
-}
-
-/**
-* setSquelch JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setSquelch(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jboolean aSquelch)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SetSquelchL,
- nativeHandle,
- (TBool) aSquelch);
-
- if (err != KErrNone)
- {
- return err;
- }
-
- return KErrNone;
-}
-
-
-/**
-* Static delegator function for getSignalStrength
-*/
-LOCAL_C void GetSignalStrengthL(CAMMSTunerControl* aNativeClass,
- TInt *aSignalStrength)
-{
-
- *aSignalStrength = aNativeClass->SignalStrengthL();
-}
-
-/**
-* getSignalStrength JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getSignalStrength(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- TInt signalStrength;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetSignalStrengthL,
- nativeHandle,
- &signalStrength);
- if (err != KErrNone)
- {
- return err;
- }
-
- return signalStrength;
-}
-
-
-/**
-* Static delegator function for getStereoMode
-*/
-LOCAL_C void GetStereoModeL(CAMMSTunerControl* aNativeClass,
- TInt *aStereoMode)
-{
-
- *aStereoMode = aNativeClass->StereoModeL();
-}
-
-/**
-* getStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getStereoMode(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle)
-{
- TInt stereoMode;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetStereoModeL,
- nativeHandle,
- &stereoMode);
- if (err != KErrNone)
- {
- return err;
- }
-
- return stereoMode;
-}
-
-
-/**
-* Static delegator function for setStereoMode
-*/
-LOCAL_C void SetStereoModeL(CAMMSTunerControl* aNativeClass,
- TInt aStereoMode)
-{
- aNativeClass->SetStereoModeL(aStereoMode);
-}
-
-/**
-* setStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setStereoMode(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aStereoMode)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SetStereoModeL,
- nativeHandle,
- aStereoMode);
-
- return err;
-}
-
-
-/**
-* Static delegator function for usePreset
-*/
-LOCAL_C void UsePresetL(CAMMSTunerControl* aNativeClass,
- TInt aPreset)
-{
- aNativeClass->UsePresetL(aPreset);
-}
-
-/**
-* usePreset JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1usePreset(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(UsePresetL,
- nativeHandle,
- aPreset);
-
- return err;
-}
-
-
-/**
-* Static delegator function for setPreset__III
-*/
-LOCAL_C void SetPresetL(CAMMSTunerControl* aNativeClass,
- TInt aPreset)
-{
- aNativeClass->SetPresetL(aPreset);
-}
-
-/**
-* setPreset__III JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPreset__III(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SetPresetL,
- nativeHandle,
- aPreset);
-
- return err;
-}
-
-
-/**
-* Static delegator function for setPreset__IIIII
-*/
-LOCAL_C void SetPresetL(CAMMSTunerControl* aNativeClass,
- TInt aPreset,
- TInt aFrequency,
- TInt aStereoMode)
-{
- aNativeClass->SetPresetL(aPreset, aFrequency, aStereoMode);
-}
-
-/**
-* setPreset__IIIII JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPreset__IIIII(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset,
- jint aFrequency,
- jint aStereoMode)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(SetPresetL,
- nativeHandle,
- aPreset,
- aFrequency,
- aStereoMode);
-
- return err;
-}
-
-
-/**
-* Static delegator function for getPresetFrequency
-*/
-LOCAL_C void GetPresetFreqL(CAMMSTunerControl* aNativeClass,
- TInt aPreset,
- TInt *aPresetFreq)
-{
-
- *aPresetFreq = aNativeClass->PresetFrequencyL(aPreset);
-}
-
-/**
-* getPresetFrequency JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetFrequency(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset)
-{
- TInt presetFreq;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetPresetFreqL,
- nativeHandle,
- aPreset,
- &presetFreq);
- if (err != KErrNone)
- {
- return err;
- }
-
- return presetFreq;
-}
-
-
-/**
-* Static delegator function for getPresetStereoMode
-*/
-LOCAL_C void GetPresetStereoModeL(CAMMSTunerControl* aNativeClass,
- TInt aPreset,
- TInt *aPresetStereoMode)
-{
-
- *aPresetStereoMode = aNativeClass->PresetStereoModeL(aPreset);
-}
-
-/**
-* getPresetStereoMode JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetStereoMode(
- JNIEnv* /*aJni*/,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset)
-{
- TInt presetStereoMode;
-
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TInt err = eventSource->ExecuteTrap(GetPresetStereoModeL,
- nativeHandle,
- aPreset,
- &presetStereoMode);
- if (err != KErrNone)
- {
- return err;
- }
-
- return presetStereoMode;
-}
-
-
-/**
-* Static delegator function for setPresetName
-*/
-LOCAL_C void SetPresetNameL(CAMMSTunerControl* aNativeClass,
- TInt aPreset,
- const TDesC* aPresetName)
-{
- aNativeClass->SetPresetNameL(aPreset, aPresetName);
-}
-
-/**
-* setPresetName JNI function
-*/
-JNIEXPORT jint JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1setPresetName(
- JNIEnv* aJni,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset,
- jstring aPresetName)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- JStringUtils presetName(*aJni, aPresetName);
-
- TInt err = eventSource->ExecuteTrap(SetPresetNameL,
- nativeHandle,
- aPreset,
- (const TDesC*)&presetName);
-
- return err;
-}
-
-
-/**
-* Static delegator function for getPresetName
-*/
-LOCAL_C void GetPresetNameL(CAMMSTunerControl* aNativeClass,
- TInt aPreset,
- TPtrC* aPresetName)
-{
- aNativeClass->GetPresetNameL(aPreset, aPresetName);
-}
-
-/**
-* getPresetName JNI function
-*/
-JNIEXPORT jstring JNICALL
-Java_com_nokia_amms_control_tuner_TunerControlImpl__1getPresetName(
- JNIEnv* aJni,
- jobject /*aJobject*/,
- jint aEventSourceHandle,
- jint aTunerControlHandle,
- jint aPreset,
- jintArray aError)
-{
- MMAFunctionServer* eventSource =
- reinterpret_cast<MMAFunctionServer*>(aEventSourceHandle);
-
- CAMMSTunerControl* nativeHandle =
- reinterpret_cast<CAMMSTunerControl*>(aTunerControlHandle);
-
- TPtrC presetNamePtr(NULL, 0);
- jstring presetName = NULL;
-
- TInt err = eventSource->ExecuteTrap(GetPresetNameL,
- nativeHandle,
- aPreset,
- &presetNamePtr);
-
- if (err == KErrNone)
- {
- presetName = S60CommonUtils::NativeToJavaString(*aJni, presetNamePtr);
- if (!presetName)
- {
- err = KErrNotSupported;
- }
- }
-
- jint javaErr[ 1 ] = { err };
- aJni->SetIntArrayRegion(aError, 0, 1, javaErr);
-
- return presetName;
-}
-
-// End of file
--- a/javauis/eswt_qt/build/eswtqt/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/build/eswtqt/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -52,8 +52,10 @@
</properties>
</target>
+ <!-- Exclude CDCCompatibilityDelegate class from the build since we are
+ building for CLDC. -->
<target name="compile">
- <omj.javac classpath="${impl.cldc.jar}" excludes="**/CDCCompatibilityDelegate.java"/>
+ <omj.javac excludes="**/CDCCompatibilityDelegate.java"/>
</target>
<target name="create.public.api.jar">
--- a/javauis/eswt_qt/eswtuitestutils/javasrc/com/nokia/mj/impl/uitestutils/S60Utils.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/eswtuitestutils/javasrc/com/nokia/mj/impl/uitestutils/S60Utils.java Fri Jul 09 16:35:45 2010 +0300
@@ -6,7 +6,7 @@
static {
// Should use vmport, this is CDC/J2SE API
//System.loadLibrary("s60uitestutils");
- org.eclipse.swt.internal.Library.loadLibrary("s60uitestutils");
+ org.eclipse.swt.internal.Library.loadLibrary("eswtuitestutils");
}
/**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
+<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
+<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/>
+<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="setup.classpath,"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="auto,"/>
+<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/org.eclipse.swt" type="4"/> </launchConfigurationWorkingSet>}"/>
+<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/>
+<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.swt/build.xml}"/>
+<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
+</launchConfiguration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/.cvsignore Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,7 @@
+debug
+release
+libswt-animations.so
+libswt-animations.so.1.0
+libswt-animations.so.1.0.0
+libswt-animations.so.1
+Makefile*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/animations.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+TARGET = swt-animations
+QT += core \
+ gui
+
+unix {
+ INCLUDEPATH +=$(JAVA_HOME)/include \
+ $(JAVA_HOME)/include/linux
+}
+
+
+# Input
+HEADERS += os.h \
+ swt.h
+
+SOURCES += os.cpp \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="project" default="generate.jni.header" basedir="../../..">
+ <property file="Eclipse_SWT_PI/qt/library/build.properties"/>
+ <target name="generate.jni.header" >
+ <javah outputfile="Eclipse SWT Animation/qt/library/os.h" classpath="bin" verbose="yes">
+ <class name="org.eclipse.swt.animation.internal.qt.OS"/>
+ </javah>
+ </target>
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/os.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,280 @@
+#include "swt.h"
+#include "os.h"
+#include <QAbstractAnimation>
+#include <QPropertyAnimation>
+#include <QVariant>
+#include <QPoint>
+#include <QAnimationGroup>
+#include <QParallelAnimationGroup>
+#include <QSequentialAnimationGroup>
+
+using namespace Java::eSWT;
+
+#define OS_NATIVE(func) Java_org_eclipse_swt_animation_internal_qt_OS_##func
+
+#define POINTER_TO_HANDLE(pointer) reinterpret_cast<jint>(static_cast<QObject*>(pointer))
+#define HANDLE_TO_POINTER(type, variable, handle) type variable = qobject_cast<type>(static_cast<type>(reinterpret_cast<QObject*>( handle )))
+
+#define SWT_TRY try
+#define SWT_CATCH \
+catch(std::bad_alloc const&)\
+ {\
+ Throw( aJniEnv, ESwtErrorNoHandles );\
+ }\
+catch(std::exception const&)\
+ {\
+ Throw( aJniEnv, ESwtErrorUnspecified );\
+ }
+#define SWT_CATCH_1(err) \
+catch(std::exception const&)\
+ {\
+ Throw( aJniEnv, err );\
+ }
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+//TODO: use from jniutils
+void Throw( JNIEnv* aJniEnv, const int& aError )
+ {
+ jclass clazz = aJniEnv->FindClass("org/eclipse/swt/SWT");
+ if (clazz != NULL)
+ {
+ jmethodID id = aJniEnv->GetStaticMethodID(clazz, "error", "(I)V");
+ if (id != NULL)
+ aJniEnv->CallStaticVoidMethod(clazz, id, aError);
+ aJniEnv->DeleteLocalRef(clazz);
+ }
+ }
+
+JNIEXPORT jint JNICALL OS_NATIVE(QPropertyAnimation_1new)
+ (JNIEnv *aJniEnv, jclass, jint aHandle)
+ {
+ QPropertyAnimation* animation = NULL;
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QObject*, parent, aHandle );
+ animation = new QPropertyAnimation( parent );
+ }
+ SWT_CATCH
+ return POINTER_TO_HANDLE( animation );
+
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE( QAbstractAnimation_1start )
+ (JNIEnv *aJniEnv, jclass, jint aHandle)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QAbstractAnimation*, animation, aHandle );
+ animation->start();
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE( QAbstractAnimation_1stop )
+ (JNIEnv *aJniEnv, jclass, jint aHandle)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QAbstractAnimation*, animation, aHandle );
+ animation->stop();
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE (QAbstractAnimation_1setLoopCount)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aLoopCount)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QAbstractAnimation*, animation, aHandle );
+ animation->setLoopCount( aLoopCount );
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT jint JNICALL OS_NATIVE( QAbstractAnimation_1duration)
+ (JNIEnv *aJniEnv, jclass, jint aHandle )
+ {
+ int duration = 0;
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QAbstractAnimation*, animation, aHandle );
+ duration= animation->duration();
+ }
+ SWT_CATCH
+ return duration;
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE( QPropertyAnimation_1setPropertyName)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jstring string)
+ {
+ SWT_TRY
+ {
+ jboolean isCopy;
+ const jchar* javaChars = aJniEnv->GetStringChars( string, &isCopy );
+
+ jsize length = aJniEnv->GetStringLength( string );
+ QString s = QString::fromUtf16( javaChars, length );
+ QByteArray a =s.toAscii();
+
+ HANDLE_TO_POINTER( QPropertyAnimation*, animation, aHandle );
+
+ animation->setPropertyName( a );
+ aJniEnv->ReleaseStringChars( string, javaChars );
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE(QPropertyAnimation_1setTargetObject)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aWidgetHandle)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QPropertyAnimation*, animation, aHandle );
+ HANDLE_TO_POINTER( QObject*, object, aWidgetHandle );
+ animation->setTargetObject( object );
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE( QVariantAnimation_1setDuration )
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aDuration)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ animation->setDuration( aDuration );
+ }
+ SWT_CATCH
+ }
+
+
+JNIEXPORT void JNICALL OS_NATIVE( QVariantAnimation_1setEasingCurve)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aEasing )
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ QEasingCurve* easing = static_cast<QEasingCurve*>(reinterpret_cast<QEasingCurve*>( aEasing ));
+ animation->setEasingCurve( *easing );
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE(QVariantAnimation_1swt_1setEndValuePoint)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aX, jint aY)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ QPoint point(static_cast<int>(aX), static_cast<int>(aY));
+ animation->setEndValue(QVariant(point));
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE(QVariantAnimation_1swt_1setStartValuePoint)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aX, jint aY)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ QPoint point(static_cast<int>(aX), static_cast<int>(aY));
+ animation->setStartValue(QVariant(point));
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE (QVariantAnimation_1swt_1setEndValueDouble)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jdouble aDouble)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ animation->setEndValue(QVariant(static_cast<double>(aDouble)));
+ }
+ SWT_CATCH
+ }
+
+
+JNIEXPORT void JNICALL OS_NATIVE (QVariantAnimation_1swt_1setStartValueDouble )
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jdouble aDouble)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QVariantAnimation*, animation, aHandle );
+ animation->setStartValue(QVariant(static_cast<double>(aDouble)));
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT void JNICALL OS_NATIVE(QAnimationGroup_1addAnimation)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aAnimation)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QAnimationGroup*, group, aHandle );
+ HANDLE_TO_POINTER( QAbstractAnimation*, animation, aAnimation );
+ group->addAnimation(animation);
+ }
+ SWT_CATCH
+ }
+
+JNIEXPORT jint JNICALL OS_NATIVE( QSequentialAnimationGroup_1new)
+ (JNIEnv *aJniEnv, jclass, jint aHandle)
+ {
+ QSequentialAnimationGroup* animation = NULL;
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QObject*, parent, aHandle );
+ animation = new QSequentialAnimationGroup ( parent );
+ }
+ SWT_CATCH
+ return POINTER_TO_HANDLE( animation );
+ }
+
+
+JNIEXPORT void OS_NATIVE( QSequentialAnimationGroup_1addPause)
+ (JNIEnv *aJniEnv, jclass, jint aHandle, jint aMsec)
+ {
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QSequentialAnimationGroup*, animation, aHandle );
+ animation->addPause(aMsec);
+ }
+ SWT_CATCH
+}
+
+JNIEXPORT jint OS_NATIVE( QParallelAnimationGroup_1new)
+ (JNIEnv *aJniEnv, jclass, jint aHandle)
+ {
+ QParallelAnimationGroup* animation = NULL;
+ SWT_TRY
+ {
+ HANDLE_TO_POINTER( QObject*, parent, aHandle );
+ animation = new QParallelAnimationGroup( parent );
+ }
+ SWT_CATCH
+ return POINTER_TO_HANDLE( animation );
+ }
+
+JNIEXPORT jint OS_NATIVE( QEasingCurve_1new)
+ (JNIEnv *aJniEnv, jclass, jint aType)
+ {
+ QEasingCurve* easing = NULL;
+ SWT_TRY
+ {
+ easing = new QEasingCurve( static_cast<QEasingCurve::Type>(aType) );
+ }
+ SWT_CATCH
+ return reinterpret_cast<jint>(easing);
+
+ }
+
+#ifdef __cplusplus
+}
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/swt.h Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nokia Corporation
+ *******************************************************************************/
+
+#ifndef _SWT_H_
+#define _SWT_H_
+
+namespace Java { namespace eSWT {
+
+enum SwtError
+ {
+ ESwtErrorNone = 0,
+ ESwtErrorUnspecified = 1,
+ ESwtErrorNoHandles = 2,
+ ESwtErrorNoMoreCallbacks = 3,
+ ESwtErrorNullArgument = 4,
+ ESwtErrorInvalidArgument = 5,
+ ESwtErrorInvalidRange = 6,
+ ESwtErrorCannotBeZero = 7,
+ ESwtErrorCannotGetItem = 8,
+ ESwtErrorCannotGetSelection = 9,
+ ESwtErrorCannotGetItemHeight = 11,
+ ESwtErrorCannotGetText = 12,
+ ESwtErrorCannotSetText = 13,
+ ESwtErrorItemNotAdded = 14,
+ ESwtErrorItemNotRemoved = 15,
+ ESwtErrorNotImplemented = 20,
+ ESwtErrorMenuNotDropDown = 21,
+ ESwtErrorThreadInvalidAccess = 22,
+ ESwtErrorWidgetDisposed = 24,
+ ESwtErrorMenuItemNotCascade = 27,
+ ESwtErrorCannotSetSelection = 28,
+ ESwtErrorCannotSetMenu = 29,
+ ESwtErrorCannotSetEnabled = 30,
+ ESwtErrorCannotGetEnabled = 31,
+ ESwtErrorInvalidParent = 32,
+ ESwtErrorMenuNotBar = 33,
+ ESwtErrorCannotGetCount = 36,
+ ESwtErrorMenuNotPopUp = 37,
+ ESwtErrorUnsupportedDepth = 38,
+ ESwtErrorIO = 39,
+ ESwtErrorInvalidImage = 40,
+ ESwtErrorUnsupportedFormat = 42,
+ ESwtErrorInvalidSubclass = 43,
+ ESwtErrorGraphicDisposed = 44,
+ ESwtErrorDeviceDisposed = 45,
+ ESwtErrorFailedExec = 46,
+ ESwtErrorFailedLoadLibrary = 47
+ };
+
+// Implementation specific event codes, not real Qt events but only used in this implementation
+// to implement events in situations that don't have a corresponding Qt event. These have to
+// match the ones defined on OS.java.
+static const int QSWTEVENT_ID_RANGE_FIRST = 2000;
+static const int QSWTEVENT_FOCUSWASGAINED = QSWTEVENT_ID_RANGE_FIRST + 1;
+static const int QSWTEVENT_FOCUSWASLOST = QSWTEVENT_ID_RANGE_FIRST + 2;
+
+}}
+
+#endif // _SWT_H_
+
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Browser/qt/org/eclipse/swt/browser/QtWebKit.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Browser/qt/org/eclipse/swt/browser/QtWebKit.java Fri Jul 09 16:35:45 2010 +0300
@@ -12,7 +12,7 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.internal.qt.OS;
-import org.eclipse.swt.internal.qt.webkit.OS_webkit;
+import org.eclipse.swt.internal.qt.webkit.WebkitOS;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
@@ -39,7 +39,7 @@
// At this point, browser.handle is the view port of QScrollArea, set by Composite
int scrollAreaHandle = Internal_PackageSupport.topHandle(browser);
int viewPortHandle = Internal_PackageSupport.handle(browser);
- webViewHandle = OS_webkit.QWebView_new();
+ webViewHandle = WebkitOS.QWebView_new();
OS.QWidget_setParent(webViewHandle, scrollAreaHandle);
int layout = OS.QVBoxLayout_new(0);
@@ -111,10 +111,10 @@
* @see WebBrowser
*/
public boolean back() {
- if (OS_webkit.QWebView_swt_canGoBack(webViewHandle)) {
+ if (WebkitOS.QWebView_swt_canGoBack(webViewHandle)) {
if (sendLocationEventChanging((int)System.currentTimeMillis(),
- OS_webkit.QWebView_swt_backUrl(webViewHandle))) {
- OS_webkit.QWebView_back(webViewHandle);
+ WebkitOS.QWebView_swt_backUrl(webViewHandle))) {
+ WebkitOS.QWebView_back(webViewHandle);
return true;
}
}
@@ -125,17 +125,17 @@
* @see WebBrowser
*/
public boolean execute(String script) {
- return OS_webkit.QWebView_swt_evaluateJavaScript(webViewHandle, script);
+ return WebkitOS.QWebView_swt_evaluateJavaScript(webViewHandle, script);
}
/**
* @see WebBrowser
*/
public boolean forward() {
- if (OS_webkit.QWebView_swt_canGoForward(webViewHandle)) {
+ if (WebkitOS.QWebView_swt_canGoForward(webViewHandle)) {
if (sendLocationEventChanging((int)System.currentTimeMillis(),
- OS_webkit.QWebView_swt_forwardUrl(webViewHandle))) {
- OS_webkit.QWebView_forward(webViewHandle);
+ WebkitOS.QWebView_swt_forwardUrl(webViewHandle))) {
+ WebkitOS.QWebView_forward(webViewHandle);
return true;
}
}
@@ -160,21 +160,21 @@
* @see WebBrowser
*/
public String getUrl() {
- return OS_webkit.QWebView_url(webViewHandle);
+ return WebkitOS.QWebView_url(webViewHandle);
}
/**
* @see WebBrowser
*/
public boolean isBackEnabled() {
- return OS_webkit.QWebView_swt_canGoBack(webViewHandle);
+ return WebkitOS.QWebView_swt_canGoBack(webViewHandle);
}
/**
* @see WebBrowser
*/
public boolean isForwardEnabled() {
- return OS_webkit.QWebView_swt_canGoForward(webViewHandle);
+ return WebkitOS.QWebView_swt_canGoForward(webViewHandle);
}
/**
@@ -182,8 +182,8 @@
*/
public void refresh() {
if (sendLocationEventChanging((int)System.currentTimeMillis(),
- OS_webkit.QWebView_url(webViewHandle))) {
- OS_webkit.QWebView_reload(webViewHandle);
+ WebkitOS.QWebView_url(webViewHandle))) {
+ WebkitOS.QWebView_reload(webViewHandle);
}
}
@@ -192,7 +192,7 @@
*/
public boolean setText(String html) {
if (sendLocationEventChanging((int)System.currentTimeMillis(), "about:blank")) {
- OS_webkit.QWebView_setHtml(webViewHandle, html);
+ WebkitOS.QWebView_setHtml(webViewHandle, html);
return true;
}
else {
@@ -205,7 +205,7 @@
*/
public boolean setUrl(String url) {
if (sendLocationEventChanging((int)System.currentTimeMillis(), url)) {
- OS_webkit.QWebView_setUrl(webViewHandle, url);
+ WebkitOS.QWebView_setUrl(webViewHandle, url);
return true;
}
else {
@@ -217,7 +217,7 @@
* @see WebBrowser
*/
public void stop() {
- OS_webkit.QWebView_stop(webViewHandle);
+ WebkitOS.QWebView_stop(webViewHandle);
}
final boolean eventProcess( int widgetHandle, int eventType, int time,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/common/version.txt Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,1 @@
+version 3.524
\ No newline at end of file
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/MobileDevice.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/MobileDevice.java Fri Jul 09 16:35:45 2010 +0300
@@ -44,521 +44,524 @@
*/
public class MobileDevice {
- private static int handleMobileDevice;
- private Vector mobileDeviceListeners;
- private Screen[] screens;
- private Input[] inputs;
- private int alertLevel;
- private boolean isOpen;
- private static int desktopWidgetHandle;
+ private static int handleMobileDevice;
+ private Vector mobileDeviceListeners;
+ private Screen[] screens;
+ private Input[] inputs;
+ private int alertLevel;
+ private boolean isOpen;
+ private static int desktopWidgetHandle;
static MobileDevice currentMobileDevice;
- private int activeScreenId;
+ private int activeScreenId;
/**
* feature which is permanently attached to the mobile device and always available
- */
+ */
public static final int LOCAL = 0;
- /**
- * local feature which is only available when mobile device is opened
- */
- public static final int INTERNAL = 1;
+ /**
+ * local feature which is only available when mobile device is opened
+ */
+ public static final int INTERNAL = 1;
- /**
- * local feature which is only available when mobile device is closed
- */
- public static final int EXTERNAL = 2;
-
- /**
- * feature which is not part of the mobile device unless connected via wire or wireless signal
- */
- public static final int REMOTE = 3;
-
- /**
- * alert level indicating simple notification (ex. e-mail arrival)
- */
- public static final int ALERT_LOW_IMPORTANCE = 1;
-
- /**
- * alert level indicating user attention desired (ex. instant message arrival)
- */
- public static final int ALERT_HIGH_IMPORTANCE = 2;
-
- /**
- * alert level indicating immediate attention is required (ex. battery level at 1%)
- */
- public static final int ALERT_CRITICAL = 3;
+ /**
+ * local feature which is only available when mobile device is closed
+ */
+ public static final int EXTERNAL = 2;
+
+ /**
+ * feature which is not part of the mobile device unless connected via wire or wireless signal
+ */
+ public static final int REMOTE = 3;
+
+ /**
+ * alert level indicating simple notification (ex. e-mail arrival)
+ */
+ public static final int ALERT_LOW_IMPORTANCE = 1;
+
+ /**
+ * alert level indicating user attention desired (ex. instant message arrival)
+ */
+ public static final int ALERT_HIGH_IMPORTANCE = 2;
+
+ /**
+ * alert level indicating immediate attention is required (ex. battery level at 1%)
+ */
+ public static final int ALERT_CRITICAL = 3;
/**
* virtual keyboard status indicating normal show and hide operation
*/
- public static final int VK_NORMAL = 1;
+ public static final int VK_NORMAL = 1;
- /**
- * virtual keyboard status indicating keyboard is always visible
- */
- public static final int VK_ALWAYS_ON = 2;
+ /**
+ * virtual keyboard status indicating keyboard is always visible
+ */
+ public static final int VK_ALWAYS_ON = 2;
- /**
- * virtual keyboard status indicating keyboard is always hidden
- */
- public static final int VK_ALWAYS_OFF = 3;
-
- /**
- * Constructs a new instance of this class. Non-public to prevent
- * instantiation outside this package.
- *
- */
- MobileDevice () {
-
- (getDisplay()).syncExec(new Runnable() {
- public void run() {
- handleMobileDevice = Internal_PackageSupport.initializeMobileDevice(
- Internal_PackageSupport.getDisplayInstance());
- OS.MobileDevice_createFlipWatch(handleMobileDevice);
- }
- });
- mobileDeviceListeners = new Vector();
- isOpen = true;
- }
-
- private static Display getDisplay(){
- Display display = Internal_PackageSupport.getDisplayInstance();
-
- // Following if-statement (getting default display) should be removed
- // if agreed that MobileDevice shouldn't create the display.
- if(display==null){
- display = Display.getDefault();
- }
-
- if(display == null || display.isDisposed()){
- SWT.error(SWT.ERROR_DEVICE_DISPOSED);
- }
- return display;
- }
-
- private void sendMobileDeviceChangedEvent(int eventType) {
- // MobileDevice changed event for open and closed
- int count = mobileDeviceListeners.size();
- for (int i = 0; i <count; ++i) {
- MobileDeviceEvent event = new MobileDeviceEvent(this);
- event.type = eventType;
- MobileDeviceListener listener = (MobileDeviceListener) mobileDeviceListeners.elementAt(i);
- listener.deviceChanged(event);
- }
- }
-
- void qt_swt_event_mobiledevice_changed(boolean aStatus) {
- // update MobileDevice status to opened/closed
- isOpen = aStatus;
-
- if(isOpen){
- sendMobileDeviceChangedEvent(MobileDeviceEvent.OPENED);
- }else{
- sendMobileDeviceChangedEvent(MobileDeviceEvent.CLOSED);
- }
- }
-
- void qt_swt_event_mobiledevice_screen_activate(boolean aStatus) {
-
- if(screens.length > 0 && activeScreenId<screens.length){
- if(aStatus){
- // update the active screen
- activeScreenId = OS.getScreenDeviceNumber();
- //forward to screen activated event to new active screen
- screens[activeScreenId].internal_sendScreenEventActivated();
- }else {
- //forward to screen deactivated event to old active screen
- screens[activeScreenId].internal_sendScreenEventDeactivated();
- }
- }
- }
-
- void qt_swt_event_mobiledevice_orientationchanged() {
- activeScreenId = OS.getScreenDeviceNumber();
- if(activeScreenId<screens.length){
- // forward to orientation change event to active screen
- screens[activeScreenId].internal_sendOrientationScreenChanged();
- }
- }
-
- private void sendMobileDeviceScreenChangedEvent(int eventType, Screen screen) {
- int count = mobileDeviceListeners.size();
- for (int i = 0; i <count; ++i) {
- MobileDeviceEvent event = new MobileDeviceEvent(this);
- event.type = eventType;
- event.data = screen;
- event.feature = screen;
- MobileDeviceListener listener = (MobileDeviceListener) mobileDeviceListeners.elementAt(i);
- listener.screenChanged(event);
- }
- }
-
- void qt_signal_screen_changed(int aCount) {
- int type = 0;
- Screen screen = null;
- Screen []newScreens = new Screen[aCount];
-
- // if getScreen is not called and if still want
- // screen changed event in the MobileDevice
- if(screens.length==0){
- getScreens();
- }
-
- if(screens.length > aCount){
- // screen removed
- int screenHandle = 0;
- for(int j=0; j<screens.length; j++) {
- // found removed screen
- boolean found = false;
- for(int i=0; i<aCount; i++) {
- screenHandle = OS.QDesktopWidget_screen(desktopWidgetHandle, i);
- if(screens[j].screenHandle== screenHandle){
- newScreens[i] = screens[j];
- newScreens[i].id = i;
- found = true;
- break;
- }
- }
- if(!found){
- screen = screens[j];
- screens[j].internal_dispose();
- }
- }
- screens = new Screen[aCount];
- // remove detached screen from 'screens'
- System.arraycopy(newScreens, 0, screens, 0, aCount);
- type = MobileDeviceEvent.REMOVED;
- } else if( screens.length < aCount){
- // screen attached
- for(int i=0; i<aCount; i++) {
- // found added screen
- int screenHandle = OS.QDesktopWidget_screen(desktopWidgetHandle, i);
- boolean found=false;
- for(int j=0; j<screens.length; j++) {
- if(screens[j].screenHandle== screenHandle){
- newScreens[i] = screens[j];
- newScreens[i].id = i;
- found = true;
- break;
- }
- }
- if(!found){
- screen = screens[i];
- newScreens[i] = new Screen(i, desktopWidgetHandle);
- }
- }
- screens = new Screen[aCount];
- // add attached screen to 'screens'
- System.arraycopy(newScreens, 0, screens, 0, aCount);
- type = MobileDeviceEvent.ADDED;
- }
- sendMobileDeviceScreenChangedEvent(type, screen);
- activeScreenId = OS.getScreenDeviceNumber();
- }
-
- private static void hookEvents() {
- int screenSignalProxy = OS.SignalHandler_new(desktopWidgetHandle, OS.QSIGNAL_QDESKTOPWIDGET_SCREENCOUNTCHANGED);
- OS.QObject_connectOrThrow(desktopWidgetHandle, "screenCountChanged(int)", screenSignalProxy,
- "widgetSignal(int)", OS.QT_AUTOCONNECTION);
- }
+ /**
+ * virtual keyboard status indicating keyboard is always hidden
+ */
+ public static final int VK_ALWAYS_OFF = 3;
+
+ /**
+ * Constructs a new instance of this class. Non-public to prevent
+ * instantiation outside this package.
+ *
+ */
+ MobileDevice () {
+
+ (getDisplay()).syncExec(new Runnable() {
+ public void run() {
+ handleMobileDevice = Internal_PackageSupport.initializeMobileDevice(
+ Internal_PackageSupport.getDisplayInstance());
+ if (handleMobileDevice == 0) {
+ SWT.error(SWT.ERROR_NO_HANDLES);
+ }
+ OS.MobileDevice_createFlipWatch(handleMobileDevice);
+ }
+ });
+ mobileDeviceListeners = new Vector();
+ isOpen = true;
+ }
+
+ private static Display getDisplay(){
+ Display display = Internal_PackageSupport.getDisplayInstance();
+
+ // Following if-statement (getting default display) should be removed
+ // if agreed that MobileDevice shouldn't create the display.
+ if(display==null){
+ display = Display.getDefault();
+ }
+
+ if(display == null || display.isDisposed()){
+ SWT.error(SWT.ERROR_DEVICE_DISPOSED);
+ }
+ return display;
+ }
+
+ private void sendMobileDeviceChangedEvent(int eventType) {
+ // MobileDevice changed event for open and closed
+ int count = mobileDeviceListeners.size();
+ for (int i = 0; i <count; ++i) {
+ MobileDeviceEvent event = new MobileDeviceEvent(this);
+ event.type = eventType;
+ MobileDeviceListener listener = (MobileDeviceListener) mobileDeviceListeners.elementAt(i);
+ listener.deviceChanged(event);
+ }
+ }
+
+ void qt_swt_event_mobiledevice_changed(boolean aStatus) {
+ // update MobileDevice status to opened/closed
+ isOpen = aStatus;
+
+ if(isOpen){
+ sendMobileDeviceChangedEvent(MobileDeviceEvent.OPENED);
+ }else{
+ sendMobileDeviceChangedEvent(MobileDeviceEvent.CLOSED);
+ }
+ }
+
+ void qt_swt_event_mobiledevice_screen_activate(boolean aStatus) {
+
+ if(screens.length > 0 && activeScreenId<screens.length){
+ if(aStatus){
+ // update the active screen
+ activeScreenId = OS.getScreenDeviceNumber();
+ //forward to screen activated event to new active screen
+ screens[activeScreenId].internal_sendScreenEventActivated();
+ }else {
+ //forward to screen deactivated event to old active screen
+ screens[activeScreenId].internal_sendScreenEventDeactivated();
+ }
+ }
+ }
+
+ void qt_swt_event_mobiledevice_orientationchanged() {
+ activeScreenId = OS.getScreenDeviceNumber();
+ if(activeScreenId<screens.length){
+ // forward to orientation change event to active screen
+ screens[activeScreenId].internal_sendOrientationScreenChanged();
+ }
+ }
+
+ private void sendMobileDeviceScreenChangedEvent(int eventType, Screen screen) {
+ int count = mobileDeviceListeners.size();
+ for (int i = 0; i <count; ++i) {
+ MobileDeviceEvent event = new MobileDeviceEvent(this);
+ event.type = eventType;
+ event.data = screen;
+ event.feature = screen;
+ MobileDeviceListener listener = (MobileDeviceListener) mobileDeviceListeners.elementAt(i);
+ listener.screenChanged(event);
+ }
+ }
+
+ void qt_signal_screen_changed(int aCount) {
+ int type = 0;
+ Screen screen = null;
+ Screen []newScreens = new Screen[aCount];
+
+ // if getScreen is not called and if still want
+ // screen changed event in the MobileDevice
+ if(screens.length==0){
+ getScreens();
+ }
+
+ if(screens.length > aCount){
+ // screen removed
+ int screenHandle = 0;
+ for(int j=0; j<screens.length; j++) {
+ // found removed screen
+ boolean found = false;
+ for(int i=0; i<aCount; i++) {
+ screenHandle = OS.QDesktopWidget_screen(desktopWidgetHandle, i);
+ if(screens[j].screenHandle== screenHandle){
+ newScreens[i] = screens[j];
+ newScreens[i].id = i;
+ found = true;
+ break;
+ }
+ }
+ if(!found){
+ screen = screens[j];
+ screens[j].internal_dispose();
+ }
+ }
+ screens = new Screen[aCount];
+ // remove detached screen from 'screens'
+ System.arraycopy(newScreens, 0, screens, 0, aCount);
+ type = MobileDeviceEvent.REMOVED;
+ } else if( screens.length < aCount){
+ // screen attached
+ for(int i=0; i<aCount; i++) {
+ // found added screen
+ int screenHandle = OS.QDesktopWidget_screen(desktopWidgetHandle, i);
+ boolean found=false;
+ for(int j=0; j<screens.length; j++) {
+ if(screens[j].screenHandle== screenHandle){
+ newScreens[i] = screens[j];
+ newScreens[i].id = i;
+ found = true;
+ break;
+ }
+ }
+ if(!found){
+ screen = screens[i];
+ newScreens[i] = new Screen(i, desktopWidgetHandle);
+ }
+ }
+ screens = new Screen[aCount];
+ // add attached screen to 'screens'
+ System.arraycopy(newScreens, 0, screens, 0, aCount);
+ type = MobileDeviceEvent.ADDED;
+ }
+ sendMobileDeviceScreenChangedEvent(type, screen);
+ activeScreenId = OS.getScreenDeviceNumber();
+ }
+
+ private static void hookEvents() {
+ int screenSignalProxy = OS.SignalHandler_new(desktopWidgetHandle, OS.QSIGNAL_QDESKTOPWIDGET_SCREENCOUNTCHANGED);
+ OS.QObject_connectOrThrow(desktopWidgetHandle, "screenCountChanged(int)", screenSignalProxy,
+ "widgetSignal(int)", OS.QT_AUTOCONNECTION);
+ }
- /**
- * Adds the listener to the collection of listeners who will be notified when a device
- * configuration change occurs, by calling one of the methods defined in the
- * <code>MobileDeviceListener</code> interface.
- * <p>
- * <code>screenChanged</code> is called when a monitor configuration changes.<br>
- * <code>inputChanged</code> is called when an input configuration changes.<br>
- * <code>deviceChanged</code> is called when the device is opened or closed.<br>
- *
- * @param listener instance called when device events occur
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
- * </ul>
- *
- * @see #removeMobileDeviceListener
- * @see MobileDeviceListener
- */
- public void addMobileDeviceListener(MobileDeviceListener listener) {
- if (listener == null) {
- SWT.error (SWT.ERROR_NULL_ARGUMENT);
- }
- mobileDeviceListeners.addElement(listener);
- }
-
-
- /**
- * Alerts the user using device specific mechanisms such as sounds, flashing, or
- * vibration. <code>Level</code> must be one of ALERT_LOW_IMPORTANCE,
- * ALERT_HIGH_IMPORTANCE, or ALERT_CRITICAL. The method maps these levels to
- * device specific features that may also be dependent upon user configuration
- * or current profile.
- *
- * @param level
- * constant describing the importance of the alert
- *
- * @exception IllegalArgumentException
- * <ul>
- * <li>ERROR_INVALID_ARGUMENT - if level is not one of the
- * allowed class constants</li>
- * </ul>
- *
- * @see #ALERT_LOW_IMPORTANCE
- * @see #ALERT_HIGH_IMPORTANCE
- * @see #ALERT_CRITICAL
- */
- public void alert(int level) {
- if ( level != ALERT_LOW_IMPORTANCE &&
- level != ALERT_HIGH_IMPORTANCE &&
- level != ALERT_CRITICAL) {
- SWT.error(SWT.ERROR_INVALID_ARGUMENT);
- }
- alertLevel = level;
- (getDisplay()).syncExec(new Runnable() {
- public void run() {
- if(alertLevel == ALERT_LOW_IMPORTANCE){
- OS.QApplication_beep();
- }else if(alertLevel == ALERT_HIGH_IMPORTANCE){
- OS.MobileDevice_flashLights(handleMobileDevice, 3000);
- OS.MobileDevice_vibration(handleMobileDevice, 3000);
- }else if(alertLevel == ALERT_CRITICAL){
- OS.QApplication_beep();
- OS.MobileDevice_flashLights(handleMobileDevice, 3000);
- OS.MobileDevice_vibration(handleMobileDevice, 3000);
- }
-
- }
- });
- }
-
-
- /**
- * Returns an array of Input objects describing the input features available to the device.
- * The return value may be <code>null</code> if there are no input features available.
- *
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because
- * of an operating system failure</li>
- * </ul>
- *
- * @see Input
- */
- public Input[] getInputs() {
- if(inputs == null) {
- try {
- (getDisplay()).syncExec(new Runnable() {
- public void run() {
- int mask = OS.getHwInputs();
- int nbInputs = 0;
-
- // finding out number of keyboards available
- if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
- nbInputs+=2;
- }
-
- if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
- nbInputs+=2;
- }
- // create java counter part of Inputs and
- // add location and type
- inputs = new Input[nbInputs];
- int i=0;
- int location;
- if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
- if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
- location = MobileDevice.INTERNAL;
- } else {
- location = MobileDevice.LOCAL;
- }
- inputs[i] = new Input(i);
- inputs[i].setLocation(location);
- inputs[i].setType(Input.SOFTKEYS);
- i+=1;
- inputs[i] = new Input(i);
- inputs[i].setLocation(location);
- inputs[i].setType(Input.FULL_KEYBOARD);
- i+=1;
- }
-
- if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
- if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
- location = MobileDevice.EXTERNAL;
- } else {
- location = MobileDevice.LOCAL;
- }
- inputs[i] = new Input(i);
- inputs[i].setLocation(location);
- inputs[i].setType(Input.SOFTKEYS);
- i+=1;
- inputs[i] = new Input(i);
- inputs[i].setLocation(location);
- inputs[i].setType(Input.KEYPAD);
- }
- }
- });
- } catch(Throwable e) {
- SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
- }
- }
- return inputs;
- }
-
-
- /**
- * Returns an array of Screen objects describing the display features available to the device.
- * The return value may be <code>null</code> if there are no display screens available.
- *
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because
- * of an operating system failure</li>
- * </ul>
- *
- * @see Screen
- */
- public Screen[] getScreens() {
- if(screens == null) {
- try {
- (getDisplay()).syncExec(new Runnable() {
- public void run() {
- int nbScreens = OS.QDesktopWidget_screenCount(desktopWidgetHandle);
- activeScreenId = OS.getScreenDeviceNumber();
- screens = new Screen[nbScreens];
- for(int i=0; i<nbScreens; i++) {
- screens[i] = new Screen(i, desktopWidgetHandle);
- }
- }
- });
- } catch(Throwable e) {
- SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
- }
- }
- return screens;
- }
-
-
- /**
- * Returns singleton instance of MobileDevice class.
- *
- * @return singleton of MobileDevice class. Must not be Null.
- *
- * @exception SWTError <ul>
- * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because of
- * an operating system failure</li>
- * </ul>
- */
- public static MobileDevice getMobileDevice() {
- if(currentMobileDevice == null) {
- try {
- currentMobileDevice = new MobileDevice();
- Internal_PackageSupport.setMobileDevice(getDisplay(),currentMobileDevice);
- desktopWidgetHandle = OS.QApplication_desktop();
- hookEvents();
- } catch (Throwable e) {
- SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
- }
- }
- return currentMobileDevice;
- }
-
-
- /**
- * Returns whether device is opened. For devices that have no internal screens
- * or input features, the method always returns <code>true</code>.
- */
- public boolean isOpen() {
- getDisplay();
+ /**
+ * Adds the listener to the collection of listeners who will be notified when a device
+ * configuration change occurs, by calling one of the methods defined in the
+ * <code>MobileDeviceListener</code> interface.
+ * <p>
+ * <code>screenChanged</code> is called when a monitor configuration changes.<br>
+ * <code>inputChanged</code> is called when an input configuration changes.<br>
+ * <code>deviceChanged</code> is called when the device is opened or closed.<br>
+ *
+ * @param listener instance called when device events occur
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+ * </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_ITEM_NOT_ADDED - if the operation fails because of an operating system failure</li>
+ * </ul>
+ *
+ * @see #removeMobileDeviceListener
+ * @see MobileDeviceListener
+ */
+ public void addMobileDeviceListener(MobileDeviceListener listener) {
+ if (listener == null) {
+ SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ }
+ mobileDeviceListeners.addElement(listener);
+ }
+
+
+ /**
+ * Alerts the user using device specific mechanisms such as sounds, flashing, or
+ * vibration. <code>Level</code> must be one of ALERT_LOW_IMPORTANCE,
+ * ALERT_HIGH_IMPORTANCE, or ALERT_CRITICAL. The method maps these levels to
+ * device specific features that may also be dependent upon user configuration
+ * or current profile.
+ *
+ * @param level
+ * constant describing the importance of the alert
+ *
+ * @exception IllegalArgumentException
+ * <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if level is not one of the
+ * allowed class constants</li>
+ * </ul>
+ *
+ * @see #ALERT_LOW_IMPORTANCE
+ * @see #ALERT_HIGH_IMPORTANCE
+ * @see #ALERT_CRITICAL
+ */
+ public void alert(int level) {
+ if ( level != ALERT_LOW_IMPORTANCE &&
+ level != ALERT_HIGH_IMPORTANCE &&
+ level != ALERT_CRITICAL) {
+ SWT.error(SWT.ERROR_INVALID_ARGUMENT);
+ }
+ alertLevel = level;
+ (getDisplay()).syncExec(new Runnable() {
+ public void run() {
+ if(alertLevel == ALERT_LOW_IMPORTANCE){
+ OS.QApplication_beep();
+ }else if(alertLevel == ALERT_HIGH_IMPORTANCE){
+ OS.MobileDevice_flashLights(handleMobileDevice, 3000);
+ OS.MobileDevice_vibration(handleMobileDevice, 3000);
+ }else if(alertLevel == ALERT_CRITICAL){
+ OS.QApplication_beep();
+ OS.MobileDevice_flashLights(handleMobileDevice, 3000);
+ OS.MobileDevice_vibration(handleMobileDevice, 3000);
+ }
+
+ }
+ });
+ }
+
+
+ /**
+ * Returns an array of Input objects describing the input features available to the device.
+ * The return value may be <code>null</code> if there are no input features available.
+ *
+ * @exception SWTError <ul>
+ * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because
+ * of an operating system failure</li>
+ * </ul>
+ *
+ * @see Input
+ */
+ public Input[] getInputs() {
+ if(inputs == null) {
+ try {
+ (getDisplay()).syncExec(new Runnable() {
+ public void run() {
+ int mask = OS.getHwInputs();
+ int nbInputs = 0;
+
+ // finding out number of keyboards available
+ if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
+ nbInputs+=2;
+ }
+
+ if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
+ nbInputs+=2;
+ }
+ // create java counter part of Inputs and
+ // add location and type
+ inputs = new Input[nbInputs];
+ int i=0;
+ int location;
+ if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
+ if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
+ location = MobileDevice.INTERNAL;
+ } else {
+ location = MobileDevice.LOCAL;
+ }
+ inputs[i] = new Input(i);
+ inputs[i].setLocation(location);
+ inputs[i].setType(Input.SOFTKEYS);
+ i+=1;
+ inputs[i] = new Input(i);
+ inputs[i].setLocation(location);
+ inputs[i].setType(Input.FULL_KEYBOARD);
+ i+=1;
+ }
+
+ if((mask & OS.SYMBIAN_KEYBOARD_KEYPAD)!=0){
+ if((mask & OS.SYMBIAN_KEYBOARD_FULL)!=0){
+ location = MobileDevice.EXTERNAL;
+ } else {
+ location = MobileDevice.LOCAL;
+ }
+ inputs[i] = new Input(i);
+ inputs[i].setLocation(location);
+ inputs[i].setType(Input.SOFTKEYS);
+ i+=1;
+ inputs[i] = new Input(i);
+ inputs[i].setLocation(location);
+ inputs[i].setType(Input.KEYPAD);
+ }
+ }
+ });
+ } catch(Throwable e) {
+ SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
+ }
+ }
+ return inputs;
+ }
+
+
+ /**
+ * Returns an array of Screen objects describing the display features available to the device.
+ * The return value may be <code>null</code> if there are no display screens available.
+ *
+ * @exception SWTError <ul>
+ * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because
+ * of an operating system failure</li>
+ * </ul>
+ *
+ * @see Screen
+ */
+ public Screen[] getScreens() {
+ if(screens == null) {
+ try {
+ (getDisplay()).syncExec(new Runnable() {
+ public void run() {
+ int nbScreens = OS.QDesktopWidget_screenCount(desktopWidgetHandle);
+ activeScreenId = OS.getScreenDeviceNumber();
+ screens = new Screen[nbScreens];
+ for(int i=0; i<nbScreens; i++) {
+ screens[i] = new Screen(i, desktopWidgetHandle);
+ }
+ }
+ });
+ } catch(Throwable e) {
+ SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
+ }
+ }
+ return screens;
+ }
+
+
+ /**
+ * Returns singleton instance of MobileDevice class.
+ *
+ * @return singleton of MobileDevice class. Must not be Null.
+ *
+ * @exception SWTError <ul>
+ * <li>ERROR_CANNOT_GET_SELECTION - if the operation fails because of
+ * an operating system failure</li>
+ * </ul>
+ */
+ public static MobileDevice getMobileDevice() {
+ if(currentMobileDevice == null) {
+ try {
+ currentMobileDevice = new MobileDevice();
+ Internal_PackageSupport.setMobileDevice(getDisplay(),currentMobileDevice);
+ desktopWidgetHandle = OS.QApplication_desktop();
+ hookEvents();
+ } catch (Throwable e) {
+ SWT.error(SWT.ERROR_CANNOT_GET_SELECTION);
+ }
+ }
+ return currentMobileDevice;
+ }
+
+
+ /**
+ * Returns whether device is opened. For devices that have no internal screens
+ * or input features, the method always returns <code>true</code>.
+ */
+ public boolean isOpen() {
+ getDisplay();
- return isOpen;
- }
+ return isOpen;
+ }
-
- /**
- * Call to dispose the Screen object.
- *
- */
- void internal_dispose() {
- if (inputs != null) {
- for (int i = 0; i < inputs.length; i++) {
- if (inputs[i] != null) {
- inputs[i].internal_dispose();
- }
- }
- }
+
+ /**
+ * Call to dispose the Screen object.
+ *
+ */
+ void internal_dispose() {
+ if (inputs != null) {
+ for (int i = 0; i < inputs.length; i++) {
+ if (inputs[i] != null) {
+ inputs[i].internal_dispose();
+ }
+ }
+ }
- if (screens != null) {
- for (int i = 0; i < screens.length; i++) {
- if (screens[i] != null) {
- screens[i].internal_dispose();
- }
- }
- }
- // actual native counter part is deleted in display
- currentMobileDevice = null;
- handleMobileDevice = 0;
- inputs = null;
- screens = null;
- desktopWidgetHandle = 0;
- }
-
-
- /**
- * Removes the listener from the collection of listeners who will be notified when a device
- * configuration change occurs.
- *
- * @param listener instance called when device events occur
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- * @exception SWTError <ul>
- * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because
- * of an operating system failure</li>
- * </ul>
- *
- * @see #addMobileDeviceListener
- * @see MobileDeviceListener
- */
- public void removeMobileDeviceListener(MobileDeviceListener listener) {
- if (listener == null) {
- SWT.error (SWT.ERROR_NULL_ARGUMENT);
- }
+ if (screens != null) {
+ for (int i = 0; i < screens.length; i++) {
+ if (screens[i] != null) {
+ screens[i].internal_dispose();
+ }
+ }
+ }
+ // actual native counter part is deleted in display
+ currentMobileDevice = null;
+ handleMobileDevice = 0;
+ inputs = null;
+ screens = null;
+ desktopWidgetHandle = 0;
+ }
+
+
+ /**
+ * Removes the listener from the collection of listeners who will be notified when a device
+ * configuration change occurs.
+ *
+ * @param listener instance called when device events occur
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
+ * </ul>
+ * @exception SWTError <ul>
+ * <li>ERROR_ITEM_NOT_REMOVED - if the operation fails because
+ * of an operating system failure</li>
+ * </ul>
+ *
+ * @see #addMobileDeviceListener
+ * @see MobileDeviceListener
+ */
+ public void removeMobileDeviceListener(MobileDeviceListener listener) {
+ if (listener == null) {
+ SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ }
- //remove listener
- //Remove method of Vector class never fails,
- //so ERROR_ITEM_NOT_REMOVED could never be thrown.
- mobileDeviceListeners.removeElement(listener);
- }
-
- /**
- * Sets the status of the system virtual keyboard (if one is available).
- * By default, or when status is set to VK_NORMAL, a system virtual keyboard
- * is displayed when a widget capable of text input gains focus and is
- * hidden when that widget looses focus. However, there are cases where
- * an application may wish to continuously display the virtual keyboard
- * or always keep it hidden. Setting the status to VK_ALWAYS_ON or VK_ALWAYS_OFF
- * will accomplish this and the effect is immediate. Changing focus will
- * then have no affect on the virtual keyboard. Note: By default, widgets which
- * normally accept input but are set to <i>read only</i> do not cause the
- * the virtual keyboard to display.
- *
- * @param status virtual keyboard mode. One of VK_NORMAL, VK_ALWAYS_ON, VK_ALWAYS_OFF
- *
- * @exception IllegalArgumentException <ul>
- * <li>ERROR_INVALID_ARGUMENT - if the status parameter is not valid</li>
- * </ul>
- *
- * @see #VK_NORMAL
- * @see #VK_ALWAYS_ON
- * @see #VK_ALWAYS_OFF
- */
- public void setVKStatus(int status){
-
- }
+ //remove listener
+ //Remove method of Vector class never fails,
+ //so ERROR_ITEM_NOT_REMOVED could never be thrown.
+ mobileDeviceListeners.removeElement(listener);
+ }
+
+ /**
+ * Sets the status of the system virtual keyboard (if one is available).
+ * By default, or when status is set to VK_NORMAL, a system virtual keyboard
+ * is displayed when a widget capable of text input gains focus and is
+ * hidden when that widget looses focus. However, there are cases where
+ * an application may wish to continuously display the virtual keyboard
+ * or always keep it hidden. Setting the status to VK_ALWAYS_ON or VK_ALWAYS_OFF
+ * will accomplish this and the effect is immediate. Changing focus will
+ * then have no affect on the virtual keyboard. Note: By default, widgets which
+ * normally accept input but are set to <i>read only</i> do not cause the
+ * the virtual keyboard to display.
+ *
+ * @param status virtual keyboard mode. One of VK_NORMAL, VK_ALWAYS_ON, VK_ALWAYS_OFF
+ *
+ * @exception IllegalArgumentException <ul>
+ * <li>ERROR_INVALID_ARGUMENT - if the status parameter is not valid</li>
+ * </ul>
+ *
+ * @see #VK_NORMAL
+ * @see #VK_ALWAYS_ON
+ * @see #VK_ALWAYS_OFF
+ */
+ public void setVKStatus(int status){
+
+ }
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Composite.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Composite.java Fri Jul 09 16:35:45 2010 +0300
@@ -200,16 +200,9 @@
boolean doHandleMouseEvent(int type, int widgetHandle, int button, int x, int y, int state, int buttons) {
boolean cancel = super.doHandleMouseEvent(type, widgetHandle, button, x, y, state, buttons);
+ // From the CANVAS flag it's known if this is a Shell/stand-alone Composite/Canvas.
if((this.state & WidgetState.CANVAS) != 0) {
- // From the CANVAS flag it's known if this is a Shell/stand-alone
- // Composite/Canvas. Those don't process the native mouse event but let it
- // through to the widget below. If the widget below also passes the event
- // to this Java widget then it will be getting multiple events. To avoid this
- // the native event must be canceled.
- // Note: Also WA_NoMousePropagation could be used for this.
- cancel = true;
-
- // Set focus for a canvas with no children
+ // Set focus for a Canvas with no children.
if(type == SWT.MouseDown) {
if ((style & SWT.NO_FOCUS) == 0 && hooksKeys ()) {
Control[] children = getChildren();
@@ -510,7 +503,7 @@
return new Point (width, height);
}
-void qt_swt_event_widgetResized_pp(int widgetHandle, int oldWidth, int oldHeight, int width, int height) {
+void qt_swt_event_widgetResized_pp(int widgetHandle, int oldWidth, int oldHeight, int width, int height, boolean sendResizeEvent) {
if (isDisposed ()) return;
if((widgetHandle == handle) && isMirrored()) {
// In real coordinate system the children need to be moved so that they
@@ -533,7 +526,7 @@
}
}
}
- super.qt_swt_event_widgetResized_pp(widgetHandle, oldWidth, oldHeight, width, height);
+ super.qt_swt_event_widgetResized_pp(widgetHandle, oldWidth, oldHeight, width, height, sendResizeEvent);
if (layout != null) {
markLayout (false, false);
updateLayout (false);
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Control.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Control.java Fri Jul 09 16:35:45 2010 +0300
@@ -811,6 +811,14 @@
}
}
+void fixMousePropagation() {
+ // In SWT mouse events are not supposed to propagate to the parent like in
+ // Qt. Thus, the default is never to propagate.
+ if(handle != 0) {
+ OS.QWidget_setAttribute(handle, OS.QT_WA_NOMOUSEPROPAGATION, true);
+ }
+}
+
void flushBuffers() {
if (bufferedGcs != null) {
for (int i = 0; i < bufferedGcs.size(); i++) {
@@ -1857,23 +1865,23 @@
}
// Add the actions that may be added by CommandArranger
- if(commandList != null) {
- CommandUtils.sort(commandList);
- for (int i = 0; i < commandList.length; i++) {
- OS.QMenu_addAction(menuHandle, Internal_PackageSupport.topHandle(commandList[i]));
- }
- }
+ if(commandList != null) {
+ CommandUtils.sort(commandList);
+ for (int i = 0; i < commandList.length; i++) {
+ OS.QMenu_addAction(menuHandle, Internal_PackageSupport.topHandle(commandList[i]));
+ }
+ }
OS.QMenu_exec(menuHandle, event.x, event.y, 0);
// Clean-up the QActions from CommandArranger and QMenu
if(commandList != null && menuHandle != 0) {
- for (int i = 0; i < commandList.length; i++) {
- int action = Internal_PackageSupport.topHandle(commandList[i]);
- if(action != 0) {
- OS.QWidget_removeAction(menuHandle, action);
- }
- }
+ for (int i = 0; i < commandList.length; i++) {
+ int action = Internal_PackageSupport.topHandle(commandList[i]);
+ if(action != 0) {
+ OS.QWidget_removeAction(menuHandle, action);
+ }
+ }
}
if (commandMenu) {
QObjectDeleteWrapper.deleteSafely(menuHandle);
@@ -1977,10 +1985,10 @@
sendEvent(SWT.Move);
}
-void qt_swt_event_widgetResized_pp(int widgetHandle, int oldWidth, int oldHeight, int width, int height) {
+void qt_swt_event_widgetResized_pp(int widgetHandle, int oldWidth, int oldHeight, int width, int height, boolean sendResizeEvent) {
// Resize events are sent only for top native widget,
// as some Controls are made of multiple native widgets.
- if (widgetHandle == topHandle)
+ if (widgetHandle == topHandle && sendResizeEvent)
sendEvent(SWT.Resize);
}
@@ -2008,9 +2016,8 @@
Display.focusEvent = SWT.None;
}
}
- if(display != null && !display.isDisposed()) {
- Display.commandArranger.focusedControlChanged();
- }
+
+
}
void qt_swt_event_focusWasLost() {
try {
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Decorations.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Decorations.java Fri Jul 09 16:35:45 2010 +0300
@@ -902,13 +902,17 @@
boolean qt_event_windowActivate(int widgetHandle) {
if(widgetHandle == topHandle) {
- sendEvent(SWT.Activate);
+ if (display != null && display.commandArranger != null) {
+ display.commandArranger.shellActivityChanged();
+ sendEvent(SWT.Activate);
+ }
}
return false;
}
boolean qt_event_windowDeactivate(int widgetHandle) {
if(widgetHandle == topHandle) {
+ display.commandArranger.shellActivityChanged();
sendEvent(SWT.Deactivate);
saveFocus();
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Display.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Display.java Fri Jul 09 16:35:45 2010 +0300
@@ -136,6 +136,12 @@
static Widget[] widgetTable;
final static int GROW_SIZE = 64;
+/*
+ * Set to have relevant QWidgets have their QObject names set to the SWT
+ * widget class names for easier debugging.
+ */
+static boolean objectNames /*= true*/;
+
static MobileDevice mobileDevice;
static int mobileDeviceHandle;
@@ -2192,6 +2198,8 @@
lastWidget = null;
indexTable = null;
widgetTable = null;
+ freeSlot = 0;
+ lastHandle = 0;
}
thread = null;
disposeList = null;
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Scrollable.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Scrollable.java Fri Jul 09 16:35:45 2010 +0300
@@ -212,6 +212,12 @@
}
}
createBars();
+ if(Display.objectNames) {
+ if(scrollAreaHandle != 0 && scrollAreaHandle != topHandle && scrollAreaHandle != handle) {
+ OS.QObject_setObjectName(scrollAreaHandle,
+ this.getClass().getName() + " Scrollable.scrollAreaHandle");
+ }
+ }
}
private void createBars() {
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Widget.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Widget.java Fri Jul 09 16:35:45 2010 +0300
@@ -50,6 +50,11 @@
* @see #checkSubclass
*/
public abstract class Widget {
+ // The handles of the child-most and the root-most QObject within the
+ // Widget, respectively. For Controls these are QWidgets but for some
+ // Widgets only QObjects (e.g. QActions for MenuItems). Both can be
+ // assigned the same QObject. If the handles are nonzero and not equal then
+ // handle is always (directly or indirectly) a QObject child of topHandle.
int handle, topHandle;
int style, state;
@@ -312,6 +317,14 @@
} else {
createHandle_pp (index);
}
+ if(Display.objectNames) {
+ if(handle != 0) {
+ OS.QObject_setObjectName(handle, this.getClass().getName() + " Widget.handle");
+ }
+ if(topHandle != 0 && topHandle != handle) {
+ OS.QObject_setObjectName(topHandle, this.getClass().getName() + " Widget.topHandle");
+ }
+ }
// If subclasses didn't specify topHandle then it's assumed that there's
// only one QWidget. I.e. handle is the root widget.
if(topHandle == 0) topHandle = handle;
@@ -325,6 +338,7 @@
} else {
register_pp();
}
+ fixMousePropagation();
}
void deregister_pp () {
@@ -380,6 +394,9 @@
return Display.filters (eventType);
}
+void fixMousePropagation() {
+}
+
static final Command[] getCommands(Control control) {
return control.getCommands();
}
@@ -511,12 +528,6 @@
return style;
}
-// Experimental support for StyleSheets
-public String getStyleSheet(){
- checkWidget();
- return OS.QWidget_styleSheet(handle);
-}
-
void hookEvents_pp () {
}
@@ -1183,9 +1194,9 @@
}
if(key.equals(WidgetConstant.CSS_ID)){
- OS.QObject_setObjectName(topHandle,(String)value);
- // Do not return here and let Widget store the key
- // value.
+ OS.QObject_setObjectName(topHandle,(String)value);
+ // Do not return here and let Widget store the key
+ // value.
}
int index = 1;
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/os.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/os.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -5332,7 +5332,7 @@
jboolean isCopy;
jint* imagesHandles = NULL;
- const QPixmap** detailImages = const_cast<const QPixmap**>(new QPixmap*[aDetailImageCount]);
+ QPixmap** detailImages = new QPixmap*[aDetailImageCount];
if( !detailImages )
{
throw std::bad_alloc();
@@ -5342,6 +5342,7 @@
imagesHandles = aJniEnv->GetIntArrayElements(aDetailImageHandles, &isCopy);
if( !imagesHandles )
{
+ delete [] detailImages;
throw std::bad_alloc();
}
for(int i = 0; i < aDetailImageCount; i++)
@@ -5351,9 +5352,10 @@
aJniEnv->ReleaseIntArrayElements(aDetailImageHandles, imagesHandles, JNI_ABORT);
}
- const QPixmap** headingImages = const_cast<const QPixmap**>(new QPixmap*[aHeadingImageCount]);
+ QPixmap** headingImages = new QPixmap*[aHeadingImageCount];
if( !headingImages )
{
+ delete [] detailImages; // allocated earlier
throw std::bad_alloc();
}
if(aHeadingImageHandles)
@@ -5361,6 +5363,8 @@
imagesHandles = aJniEnv->GetIntArrayElements(aHeadingImageHandles, &isCopy);
if( !imagesHandles )
{
+ delete [] detailImages;
+ delete [] headingImages;
throw std::bad_alloc();
}
for(int i = 0; i < aHeadingImageCount; i++)
@@ -5371,8 +5375,10 @@
}
ListModel* listDataModel = reinterpret_cast< ListModel* > ( aHandle );
- listDataModel->appendItem( swtApp->jniUtils().JavaStringToQString( aJniEnv, aDetailText ), detailImages, aDetailImageCount,
- swtApp->jniUtils().JavaStringToQString( aJniEnv, aHeadingText ), headingImages, aHeadingImageCount );
+ listDataModel->appendItem( swtApp->jniUtils().JavaStringToQString( aJniEnv, aDetailText ),
+ const_cast<const QPixmap**>(detailImages), aDetailImageCount,
+ swtApp->jniUtils().JavaStringToQString( aJniEnv, aHeadingText ),
+ const_cast<const QPixmap**>(headingImages), aHeadingImageCount );
}
SWT_CATCH
}
@@ -11662,7 +11668,7 @@
SWT_LOG_JNI_CALL();
SWT_LOG_DATA_2( "handle=%x duration=%x", aHandle, aDuration );
CSwtMobileDevice* mobileDevice = reinterpret_cast<CSwtMobileDevice*>(aHandle);
- vibraSupport = mobileDevice->Vibrate((TTimeIntervalMicroSeconds32)static_cast<TInt>(aDuration));
+ vibraSupport = mobileDevice->Vibrate(static_cast<TInt>(aDuration));
}
SWT_CATCH
#endif
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtapplication.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtapplication.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -123,7 +123,7 @@
SWT_LOG_FUNC_CALL();
int handle = 0;
#ifdef __SYMBIAN32__
- handle = reinterpret_cast<int>(CSwtMobileDevice::NewL());
+ TRAP_IGNORE(handle = reinterpret_cast<int>(CSwtMobileDevice::NewL()));
#endif
return handle;
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtmobiledevice.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtmobiledevice.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -146,7 +146,7 @@
{
if ((aLevel < 0) || (aLevel > KMIDMaxLightLevel))
{
- User::Leave(KErrArgument);
+ return;
}
if (!iHWRMLight)
@@ -226,14 +226,13 @@
// ---------------------------------------------------------------------------
//
#if defined(__WINSCW__)
-TBool CSwtMobileDevice::Vibrate(const TTimeIntervalMicroSeconds32& /*aDuration*/)
+TBool CSwtMobileDevice::Vibrate(const TInt /*aDuration*/)
{
return EFalse;
}
#else // __WINSCW__
-TBool CSwtMobileDevice::Vibrate(const TTimeIntervalMicroSeconds32& aDuration)
+TBool CSwtMobileDevice::Vibrate(const TInt aDuration)
{
- TInt duration = aDuration.Int() / 1000; // convert micro to milli
if (!iVibra)
{
TRAPD(err1, iVibra = CHWRMVibra::NewL());
@@ -244,9 +243,9 @@
}
TInt err2 = KErrNone;
- if (duration)
+ if (aDuration)
{
- TRAP(err2, iVibra->StartVibraL(duration));
+ TRAP(err2, iVibra->StartVibraL(aDuration));
}
else
{
@@ -265,16 +264,16 @@
#endif // __WINSCW__
// -----------------------------------------------------------------------------
-// CSwtMobileDevice::AppForegroundL
+// CSwtMobileDevice::AppForeground
// -----------------------------------------------------------------------------
//
void CSwtMobileDevice::AppForeground()
{
if (iDuration > 0)
{
- TTime* now = new TTime();
- now->HomeTime();
- TInt nowDuration = now->MicroSecondsFrom(*iStartTime).Int64()/1000;
+ TTime now;
+ now.HomeTime();
+ TInt nowDuration = now.MicroSecondsFrom(*iStartTime).Int64()/1000;
if (nowDuration >= iDuration)
{
iDuration = 0;
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtmobiledevice.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swtmobiledevice.h Fri Jul 09 16:35:45 2010 +0300
@@ -67,7 +67,7 @@
* Printing InfoMsg for the user for the duration given to vibrate
* Must return true if the vibrator can be controlled by the application
*/
- TBool Vibrate(const TTimeIntervalMicroSeconds32& aDuration);
+ TBool Vibrate(const TInt aDuration);
void AppForeground();
public: // From MHWRMLightObserver
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swts60.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/swts60.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -39,8 +39,8 @@
// Stack size for the UI thread, 0x14000 = 80kB
const TInt KSwtUiThreadStackSize = 0x14000;
-// Stack size for the support thread, 0x1F40 = 8kB
-const TInt KSwtSupportThreadStackSize = 0x1F40;
+// Stack size for the support thread
+const TInt KSwtSupportThreadStackSize = KSwtUiThreadStackSize;
static const char* const EVENT_FILTER = "swt_event_filter";
@@ -164,7 +164,8 @@
// Launch the support thread
startSupportThread(reinterpret_cast<TAny*>(data));
- return KErrNone;
+ // Return the support thread initialization status
+ return data->initStatus.Int();
}
void SymbianUtils::cleanupUiThread()
@@ -471,7 +472,7 @@
JNIEnv* env = NULL;
void* args = NULL;
jint attachStatus = vm->AttachCurrentThread((void**)&env, args);
- __ASSERT_DEBUG(attachStatus == 0, User::Panic(KSwtDllName, 0));
+ // Continue even if attach failed ->
// Notify the waiting Java thread that we have attached and it can continue
notifyThreadInitStatus(attachStatus, data->initThreadId, &data->initStatus);
@@ -495,9 +496,11 @@
if(vm && openStatus == KErrNone) {
if(uiThread.ExitType() != EExitPending)
{
- // Notify once and detach the thread.
- notifyUIThreadExit(env);
- vm->DetachCurrentThread();
+ if(attachStatus == 0) {
+ // Notify once and detach the thread.
+ notifyUIThreadExit(env);
+ vm->DetachCurrentThread();
+ }
env = NULL;
vm = NULL;
}
@@ -505,7 +508,7 @@
}
// Because the thread is waiting until the process terminates,
- // execution will neve reach here.
+ // execution will never reach here.
}
void SymbianUtils::startSupportThread(TAny* aParams)
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/webkit/os.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/webkit/os.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -15,13 +15,13 @@
#include <QWebHistory>
#endif
-#include "org_eclipse_swt_internal_qt_webkit_OS_0005fwebkit.h"
+#include "org_eclipse_swt_internal_qt_webkit_WebkitOS.h"
#include "swt.h"
#include "swtlog.h"
#include "swtapplication.h"
#include "jniutils.h"
-#define OS_NATIVE(func) Java_org_eclipse_swt_internal_qt_webkit_OS_1webkit_##func
+#define OS_NATIVE(func) Java_org_eclipse_swt_internal_qt_webkit_WebkitOS_##func
using namespace Java::eSWT;
--- a/javauis/javalegacyutils/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/javalegacyutils/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -31,5 +31,11 @@
com.nokia.mj.impl.rt.legacy.MemoryUtil,
com.nokia.mj.impl.rt.legacy.MIDEventServer,
com.nokia.mj.impl.rt.legacy.NativeError"/>
+
+ <target name="create.internal.api.jar">
+ <omj.internal.apis includes="com/nokia/mj/impl/rt/legacy/MIDEventServer.class,
+ com/nokia/mj/impl/rt/legacy/Security.class"/>
+ </target>
+
</project>
--- a/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitInvoker.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitInvoker.java Fri Jul 09 16:35:45 2010 +0300
@@ -88,15 +88,6 @@
*/
public abstract boolean isNgaEnabled();
-
- /**
- * NGA specific change.
- * LCDUI's client APIs (e.g M3G) can check are they on foreground or not.
- * @return <code>true</code> if MIDlet is on foreground.
- * @since S60 9.2
- */
- public abstract boolean isForeground();
-
//
// Image access
//
--- a/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitObserverNGAExtension.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/javalegacyutils/javasrc/com/nokia/mj/impl/rt/legacy/ToolkitObserverNGAExtension.java Fri Jul 09 16:35:45 2010 +0300
@@ -21,9 +21,7 @@
public interface ToolkitObserverNGAExtension extends ToolkitObserver
{
/**
- * Notification about MIDlet going to background or coming foreground.
- * @param foreground true, when MIDlet came to foreground
- * false, when MIDlet was sent to background
+ * Notification that observer should free all graphics memory immediately.
*/
- void foregroundEvent(boolean foreground);
+ void freeGraphicsMemory();
}
\ No newline at end of file
--- a/javauis/javauis.pro Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/javauis.pro Fri Jul 09 16:35:45 2010 +0300
@@ -18,7 +18,7 @@
SUBDIRS += eswt_qt/build
SUBDIRS += lcdui_qt/build/openlcdui.pro
SUBDIRS += runtimeui_qt/build/javaruntimeui.pro
-SUBDIRS += nokiauiapi_qt/build/nokiauiapiqt.pro
+SUBDIRS += nokiauiapi_qt/build/javanokiaui.pro
SUBDIRS += mmapi_qt/build/javamobilemedia.pro
SUBDIRS += amms_qt/build/javaamms.pro
SUBDIRS += m3g_qt/build/javam3g.pro
--- a/javauis/lcdui_qt/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -26,10 +26,6 @@
<property name="java.src.paths" value="../src:../src_j2me"/>
- <target name="compile">
- <omj.javac classpath="${impl.cldc.jar}"/>
- </target>
-
<target name="system.properties">
<properties>
com.nokia.mid.ui.version=1.2
@@ -85,5 +81,12 @@
com/nokia/mid/ui/FullCanvas.class,
com/nokia/mid/ui/TactileFeedback.class"/>
</target>
+
+
+ <target name="create.internal.api.jar">
+ <omj.internal.apis includes=
+ "com/nokia/mj/impl/nokialcdui/LCDUIInvoker.class,
+ com/nokia/mj/impl/nokialcdui/ItemControlStateChangeListener.class"/>
+ </target>
</project>
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Buffer.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Buffer.java Fri Jul 09 16:35:45 2010 +0300
@@ -56,12 +56,16 @@
final static int HOST_TYPE_CUSTOMITEM = 3;
// Flags for raising settings validation
- private final static int NONE = 0;
- private final static int COLOR = 1;
- private final static int CLIP = 2;
- private final static int FONT = 4;
- private final static int STROKESTYLE = 8;
- private final static int COORS_TRANSLATION = 16;
+ // FORCE_SETTINGS Forces settings to validated also in case
+ // there's only one Graphics instance as client, normally
+ // settings are not checked in such case
+ final static int NONE = 0;
+ final static int COLOR = 1;
+ final static int CLIP = 2;
+ final static int FONT = 4;
+ final static int STROKESTYLE = 8;
+ final static int COORDS_TRANSLATION = 16;
+ final static int FORCE_SETTINGS = 32;
// Graphics settings active in buffer
// all values are comparable to those
@@ -107,35 +111,35 @@
*/
static Buffer createInstance(Object host, Control control)
{
- if(host instanceof Canvas)
- {
- if(OS.windowServer == OS.WS_SYMBIAN_S60)
- {
- return new CanvasBufferSymbian((Canvas) host, control);
- }
- else if(OS.windowServer == OS.WS_X11)
- {
- return new CanvasBufferLinux((Canvas) host, control);
- }
- return null;
- }
- else if(host instanceof CustomItem)
- {
- if(OS.windowServer == OS.WS_SYMBIAN_S60)
- {
- return new CustomItemBufferSymbian((CustomItem) host, control);
- }
- else if(OS.windowServer == OS.WS_X11)
- {
- return new CustomItemBufferLinux((CustomItem) host, control);
- }
- return null;
- }
- else if(host instanceof Image)
- {
- return new ImageBuffer((Image) host);
- }
- return null;
+ if(host instanceof Canvas)
+ {
+ if(OS.windowServer == OS.WS_SYMBIAN_S60)
+ {
+ return new CanvasBufferSymbian((Canvas) host, control);
+ }
+ else if(OS.windowServer == OS.WS_X11)
+ {
+ return new CanvasBufferLinux((Canvas) host, control);
+ }
+ return null;
+ }
+ else if(host instanceof CustomItem)
+ {
+ if(OS.windowServer == OS.WS_SYMBIAN_S60)
+ {
+ return new CustomItemBufferSymbian((CustomItem) host, control);
+ }
+ else if(OS.windowServer == OS.WS_X11)
+ {
+ return new CustomItemBufferLinux((CustomItem) host, control);
+ }
+ return null;
+ }
+ else if(host instanceof Image)
+ {
+ return new ImageBuffer((Image) host);
+ }
+ return null;
}
/**
@@ -154,8 +158,7 @@
/**
* Defines the bounds of the host.
* Bounds are used for restricting the rendering in
- * the area of the control that is being updated. With Images
- * the bounds are not used.
+ * the area of the control that is being updated.
*
* @param crtl The Control of the host
* @param clienArea The area of the control which can be drawn by Graphics
@@ -177,6 +180,20 @@
}
/**
+ * Defines the bounds of the host.
+ *
+ * @param crtl The Control of the host
+ * @param clienArea The area of the control which can be drawn by Graphics
+ */
+ void setImageBounds(int width, int height)
+ {
+ hostBounds.x = 0;
+ hostBounds.y = 0;
+ hostBounds.width = width;
+ hostBounds.height = height;
+ }
+
+ /**
* Prepares surface for a new frame and starts paint session.
* Must be called in UI thread (sync calls this automatically)
* and at the start of new frame. The rectangle provided as
@@ -189,11 +206,11 @@
*/
void startFrame(int x, int y, int w, int h)
{
- if(!isSurfaceSessionOpen)
- {
- beginPaint(x, y, w, h);
- isSurfaceSessionOpen = true;
- }
+ if(!isSurfaceSessionOpen)
+ {
+ beginPaint(x, y, w, h);
+ isSurfaceSessionOpen = true;
+ }
}
/**
@@ -202,11 +219,11 @@
*/
void endFrame()
{
- if(isSurfaceSessionOpen)
- {
- endPaint();
- isSurfaceSessionOpen = false;
- }
+ if(isSurfaceSessionOpen)
+ {
+ endPaint();
+ isSurfaceSessionOpen = false;
+ }
}
/**
@@ -216,8 +233,8 @@
*/
void blitToDisplay(GraphicsContext gc, Widget widget)
{
- endFrame();
- blit(gc, widget);
+ endFrame();
+ blit(gc, widget);
}
/**
@@ -286,7 +303,7 @@
// write the default values to the buffer
if(clientCount == 1)
{
- writeDefaultValuesToBuffer();
+ writeDefaultValuesToBuffer();
}
return new Graphics(this, hostBounds );
}
@@ -299,7 +316,7 @@
*/
void sync()
{
- sync(true);
+ sync(true);
}
/**
@@ -325,7 +342,7 @@
}
// Start surface session if not started yet
- startFrame(hostBounds.x, hostBounds.y , hostBounds.width , hostBounds.height);
+ startFrame(hostBounds.x, hostBounds.y , hostBounds.width , hostBounds.height);
doRelease();
bindToHost(gc);
@@ -365,12 +382,12 @@
*/
void dispose()
{
- if(gc != null)
- {
+ if(gc != null)
+ {
doRelease();
gc.dispose();
gc = null;
- }
+ }
commandBuffer = null;
}
@@ -381,31 +398,31 @@
void fillRect(int x, int y, int w, int h, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION), client);
gc.fillRect(x, y, w, h);
}
void fillRoundRect(int x, int y, int w, int h, int arcW, int arcH, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION), client);
gc.fillRoundRect(x, y, w, h, arcW, arcH);
}
void fillArc(int x, int y, int w, int h, int startAngle, int arcAngle, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION), client);
gc.fillArc(x, y, w, h, startAngle, arcAngle);
}
void fillTriangle(int[] points, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION), client);
gc.fillPolygon(points);
}
void setClip(int x, int y, int w, int h, Graphics client)
{
- validateAndApplySettings(COORS_TRANSLATION, client);
+ validateAndApplySettings(COORDS_TRANSLATION, client);
// check if given clip is already active in buffer
if((bufferClip.x == x) && (bufferClip.y == y) &&
(bufferClip.width == w) && (bufferClip.height== h))
@@ -420,7 +437,7 @@
}
// translate clip to display coordinates and apply
- Rectangle rect = clipToDisplayCoords(x, y, w, h);
+ Rectangle rect = clipToWindowCoords(x, y, w, h);
if(rect.isEmpty())
{
// check is buffer clip is already up to date
@@ -452,6 +469,11 @@
gc.setClip(rect.x, rect.y, rect.width, rect.height, false);
}
+ void setGraphicsDefaults(Graphics client)
+ {
+ validateAndApplySettings((FONT|COLOR|STROKESTYLE|COORDS_TRANSLATION|FORCE_SETTINGS), client);
+ }
+
void setColor(int r, int g, int b, Graphics client)
{
// check if given color is already active in buffer
@@ -503,37 +525,37 @@
void drawLine(int xStart, int yStart, int xEnd, int yEnd, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|STROKESTYLE), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|STROKESTYLE), client);
gc.drawLine(xStart, yStart, xEnd, yEnd);
}
void drawRect(int x, int y, int w, int h, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|STROKESTYLE), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|STROKESTYLE), client);
gc.drawRect(x, y, w, h);
}
void drawRoundRect(int x, int y, int w, int h, int arcW, int arcH, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|STROKESTYLE), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|STROKESTYLE), client);
gc.drawRoundRect(x, y, w, h, arcW, arcH);
}
void drawArc(int x, int y, int w, int h, int startAngle, int arcAngle, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|STROKESTYLE), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|STROKESTYLE), client);
gc.drawArc(x, y, w, h, startAngle, arcAngle);
}
void drawString(String string, int x, int y, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|FONT), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|FONT), client);
gc.drawString(string, x, y, true);
}
void drawImage(org.eclipse.swt.internal.qt.graphics.Image image, int x,int y, Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawImage(image, x, y);
}
@@ -541,7 +563,7 @@
int wDst, int hDst, int xSrc, int ySrc, int wSrc, int hSrc,
int transform, Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawImage(image, xDst, yDst, wDst, hDst, xSrc, ySrc, wSrc, hSrc, transform);
}
@@ -555,7 +577,7 @@
boolean alpha,
Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawRGB(rgb, offset, scanlength, x, y, w, h, alpha);
}
@@ -570,7 +592,7 @@
int manipulation,
Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawRGB(rgb, offset, scanlength, x, y, w, h, alpha, manipulation);
}
@@ -586,7 +608,7 @@
int format,
Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawRGB(rgb, transparencyMask, offset, scanlength, x, y, w, h, manipulation, format);
}
@@ -602,19 +624,19 @@
int format,
Graphics client)
{
- validateAndApplySettings((CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((CLIP|COORDS_TRANSLATION), client);
gc.drawRGB(rgb, offset, scanlength, x, y, w, h, alpha, manipulation, format);
}
void drawPolygon(int[] points, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION|STROKESTYLE), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION|STROKESTYLE), client);
gc.drawPolygon(points);
}
void fillPolygon(int[] points, Graphics client)
{
- validateAndApplySettings((COLOR|CLIP|COORS_TRANSLATION), client);
+ validateAndApplySettings((COLOR|CLIP|COORDS_TRANSLATION), client);
gc.fillPolygon(points);
}
@@ -658,8 +680,16 @@
return null;
}
+ boolean containsDrawnPrimitives() {
+ boolean result = false;
+ if(commandBuffer != null) {
+ result = commandBuffer.containsDrawnPrimitives();
+ }
+ return result;
+ }
+
/**
- * Translates given rectangle to display/window surface coordinates
+ * Translates given rectangle to window surface coordinates
* and outlines the clip inside the control bounds.
*
* @param x The x-coordinate of the rectangle
@@ -668,7 +698,7 @@
* @param h The height of the rectangle
*
*/
- private Rectangle clipToDisplayCoords(int x, int y, int w, int h)
+ private Rectangle clipToWindowCoords(int x, int y, int w, int h)
{
// Bottom-right corner of control bounds in window coordinates
final int hostX2 = hostBounds.x + hostBounds.width;
@@ -701,7 +731,7 @@
clipY2 = clipY2Dpy < hostBounds.y ? (clipY2 + (hostBounds.y - clipY1Dpy)) : clipY2;
clipY2 = clipY2Dpy > hostY2 ? (clipY2 - (clipY1Dpy - hostY2)) : clipY2;
- return new Rectangle(clipX1, clipY1, (clipX2 - clipX1) , (clipY1 - clipY2));
+ return new Rectangle(clipX1, clipY1, (clipX2 - clipX1) , (clipY2 - clipY1));
}
/**
@@ -715,7 +745,7 @@
*/
private void validateAndApplySettings(int flags, Graphics client)
{
- if(!clientChanged(client))
+ if(!clientChanged(client) && (FORCE_SETTINGS & flags) == 0)
{
return;
}
@@ -736,7 +766,7 @@
client.currentClip[3] != bufferClip.height)
{
- Rectangle rect = clipToDisplayCoords(client.currentClip[0], client.currentClip[1],
+ Rectangle rect = clipToWindowCoords(client.currentClip[0], client.currentClip[1],
client.currentClip[2], client.currentClip[3]);
gc.setClip(rect.x, rect.y, rect.width, rect.height, false);
bufferClip.x = client.currentClip[0];
@@ -745,7 +775,7 @@
bufferClip.height = client.currentClip[3];
}
}
- if((COORS_TRANSLATION & flags) != 0)
+ if((COORDS_TRANSLATION & flags) != 0)
{
if((bufferTranslateX != client.translateX) && (bufferTranslateY != client.translateY))
{
@@ -815,6 +845,9 @@
/**
* Writes Graphics default values to buffer
+ * @param force If true defaults are written unconditionally to buffer,
+ * otherwise only values that different than the ones in buffer
+ * are written
*/
private void writeDefaultValuesToBuffer()
{
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Canvas.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Canvas.java Fri Jul 09 16:35:45 2010 +0300
@@ -372,7 +372,7 @@
Composite eswtConstructContent(int style)
{
// Get JAD attribute
- setMode(NO_BACKGROUND, JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_UI_ENHANCEMENT,
+ setMode(NO_BACKGROUND, !JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_UI_ENHANCEMENT,
JadAttributeUtil.VALUE_CANVAS_HAS_BACKGROUND));
if(isMode(NO_BACKGROUND))
{
@@ -434,11 +434,12 @@
canvasComp.setVisible(false);
createOnScreenKeypad();
+ return canvasComp;
+ }
+ void eswtInitGraphics() {
// create graphics buffer
- graphicsBuffer = Buffer.createInstance(this, canvasComp);
-
- return canvasComp;
+ graphicsBuffer = Buffer.createInstance(this, canvasComp);
}
/**
@@ -760,18 +761,17 @@
*/
public int getHeight()
{
- ESWTUIThreadRunner.syncExec(new Runnable()
+ if(onScreenkeypad != null)
{
- public void run()
+ ESWTUIThreadRunner.syncExec(new Runnable()
{
- if(onScreenkeypad != null)
+ public void run()
{
oskHeight = onScreenkeypad.getHeight();
}
- }
- });
+ });
+ }
return (super.getHeight() - oskHeight);
-
}
/**
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Fri Jul 09 16:35:45 2010 +0300
@@ -130,6 +130,7 @@
eswtSetTitle();
contentComp = eswtConstructContent(SWT.NONE);
contentArea = eswtLayoutShellContent();
+ eswtInitGraphics();
}
});
}
@@ -184,6 +185,13 @@
}
/**
+ * Initializes the Displayable for Graphics drawing.
+ */
+ void eswtInitGraphics() {
+
+ }
+
+ /**
* Called by Display when Displayable should become visible.
*/
void eswtHandleShowCurrentEvent()
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/ESWTUIThreadRunner.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/ESWTUIThreadRunner.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -30,27 +30,19 @@
/**
* Singleton class which is responsible to run the eSWT UI thread. This class is
* also access-point to eSWT's Display-class.<br>
- * <br>
- * UI thread is started in static initialization block. If another UI Thread is
- * created before that the run()-method will fail and this class won't try to
- * run UI thread anymore. Instead, existing UI-thread will be used to run LCDUI.
- * <br>
- * <br>
- * Note that the method getDisplay() will still work normally.<br>
- * <br>
- * Also note that if the other thread which is running eSWT stops executing then
- * this class stops working too.
*/
final class ESWTUIThreadRunner implements Listener, ShutdownListener, Runnable
{
-
+ // States of the UI event loop
private static final int NONE = 1;
private static final int CREATING = 2;
private static final int RUNNING = 4;
private static final int EXITING = 8;
private static final int ALL = NONE | CREATING | RUNNING | EXITING;
+ // Singleton instance
private static ESWTUIThreadRunner instance;
+
private static int lastKeyScancode;
private static int lastKeyModifier;
private static int keyRepeatCount;
@@ -60,6 +52,12 @@
private Object lock = new Object();
+ // For synchronously shutting down
+ private Object uiThreadShutdownLock = new Object();
+ private boolean uiThreadStarted;
+ private boolean uiThreadShutdownRequested;
+ private boolean uiThreadExitNotified;
+
private Display display;
private int state = NONE;
@@ -70,12 +68,6 @@
// Create dispose storage to clean up newly created Fonts and Images.
ds = new DisposeStorage();
-
- // Starting thread here makes sure that eSWT services
- // are always available when they are needed.
-
- // uiThread = new Thread(getInstance(), UI_THREAD_NAME);
- // uiThread.start();
}
/**
@@ -83,7 +75,7 @@
*/
private ESWTUIThreadRunner()
{
- Logger.info("Starting up");
+ Logger.info("ESWTUIThreadRunner: Starting up");
// TODO: check if the startUI throws RuntimeException on already
// existing UI thread
@@ -259,7 +251,7 @@
{
case SWT.Close:
{
- Logger.info("Close event");
+ Logger.info("ESWTUIThreadRunner: Close event");
// Check if the No-Exit attribute is set
if(JadAttributeUtil.isValue(JadAttributeUtil.ATTRIB_NOKIA_MIDLET_NO_EXIT, JadAttributeUtil.VALUE_TRUE))
{
@@ -302,20 +294,91 @@
*/
public void shuttingDown()
{
- Logger.info("Shutting Down");
- EventDispatcher.instance().terminate(new Runnable()
+ Logger.info("ESWTUIThreadRunner: Shutdown requested, performing synchronous shutdown");
+
+ synchronized(uiThreadShutdownLock)
{
- public void run()
+ // Set a flag that prevents the UI thread from starting the event
+ // loop if it hasn't done that yet.
+ uiThreadShutdownRequested = true;
+
+ Logger.info("ESWTUIThreadRunner: Asynchronously signalling LCDUI event dispatcher to exit");
+ EventDispatcher.instance().terminate(new Runnable()
{
- changeState(EXITING);
+ public void run()
+ {
+ Logger.info("ESWTUIThreadRunner: LCDUI event dispatcher signalled having completed its exit procedure, initiating UI event loop exit");
+ changeState(EXITING);
+ }
+ });
+
+ // Wait until UI cleanup completes.
+ try {
+ // Don't wait if the UI thread hasn't started.
+ if(!uiThreadStarted)
+ {
+ Logger.info("ESWTUIThreadRunner: The UI thread has not been started, shutdown complete");
+ return;
+ }
+ // Don't wait if the UI thread already went past the exit
+ // notification phase.
+ if(uiThreadExitNotified)
+ {
+ Logger.info("ESWTUIThreadRunner: The UI thread has notified having exited, no need to wait, shutdown complete");
+ return;
+ }
+
+ // The UI thread is running, wait for it to exit
+ Logger.info("ESWTUIThreadRunner: Waiting for the UI thread to exit");
+ uiThreadShutdownLock.wait(3000);
+
+ if(uiThreadExitNotified)
+ {
+ Logger.info("ESWTUIThreadRunner: The UI thread notified having completed its exit procedure");
+ }
+ else
+ {
+ Logger.error("ESWTUIThreadRunner: UI thread exit wait timed out");
+ return;
+ }
}
- });
+ catch(InterruptedException e)
+ {
+ Logger.error("ESWTUIThreadRunner: The wait for the UI thread to exit was interrupted");
+ }
+ }
+ Logger.info("ESWTUIThreadRunner: Synchronous UI shutdown is complete");
+ }
+
+ /*
+ * The entry point of the UI thread.
+ */
+ public void run() {
+ try {
+ synchronized(uiThreadShutdownLock)
+ {
+ uiThreadStarted = true;
+ if(uiThreadShutdownRequested)
+ {
+ return;
+ }
+ }
+ runEventLoop();
+ }
+ finally
+ {
+ synchronized(uiThreadShutdownLock)
+ {
+ uiThreadExitNotified = true;
+ uiThreadShutdownLock.notifyAll();
+ }
+ }
}
/**
- * Creates new eSWT Display and runs eSWT UI-thread.
+ * Creates new eSWT Display and runs eSWT UI event loop.
*/
- public void run()
+ private void runEventLoop()
{
changeState(CREATING);
onStartup();
@@ -340,19 +403,19 @@
if(t != null && t instanceof RuntimeException)
{
// this might be an expected exception of safeSyncExec
- Logger.warning("eSWT Thread Exception: " + ex);
+ Logger.warning("ESWTUIThreadRunner: eSWT Thread Exception: " + ex);
// t.printStackTrace();
}
}
else
{
- Logger.error("eSWT Thread Exception: " + ex);
+ Logger.error("ESWTUIThreadRunner: eSWT Thread Exception: " + ex);
ex.printStackTrace();
}
}
catch(Error er)
{
- Logger.error("eSWT Thread Error" + er);
+ Logger.error("ESWTUIThreadRunner: eSWT Thread Error" + er);
er.printStackTrace();
}
}
@@ -370,7 +433,7 @@
private void changeState(int newstate)
{
- Logger.info(getStateString(state) + " --> " + getStateString(newstate));
+ Logger.info("ESWTUIThreadRunner: Event loop state: " + getStateString(state) + " --> " + getStateString(newstate));
if(display != null)
{
try
@@ -454,6 +517,4 @@
}
finalizers.clear();
}
-
-
}
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Graphics.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Graphics.java Fri Jul 09 16:35:45 2010 +0300
@@ -95,15 +95,19 @@
private DirectGraphics directGraphics;
private Buffer graphicsBuffer;
-
- // Current font for rendering texts.
+
+ // Cache for settings
+ // these members have package visibility,
+ // however they meant to be accessed only by
+ // this (Graphics) instance or related (Buffer)
+ // greaphicsBuffer instance
Font currentFont;
int currentColor;
int translateX;
int translateY;
int[] currentClip = new int[4];
int currentStrokeStyle;
-
+
private com.nokia.mj.impl.rt.support.Finalizer finalizer;
//Constructor
@@ -135,8 +139,8 @@
currentClip[1] = clipRect.y;
currentClip[2] = clipRect.width;
currentClip[3] = clipRect.height;
+ setDefaultSettings();
graphicsBuffer = buffer;
- reset();
}
@@ -154,16 +158,29 @@
/**
* Resets Graphics state to initial.
+ * Reset does not set the clip.
*/
void reset()
{
+ synchronized(graphicsBuffer) {
+ // setDefaultSettings() must be called
+ // before the setGraphicsDefaults() since
+ // graphicsBuffer (Buffer implementation) uses
+ // the member values of this instance when setting the defaults
+ setDefaultSettings();
+ graphicsBuffer.setGraphicsDefaults(this);
+ }
+ }
+
+ void setDefaultSettings()
+ {
currentFont = Buffer.defaultFont;
currentColor = Buffer.defaultColor;
currentStrokeStyle = Buffer.defaultStrokeStyle;
translateX = Buffer.defaultTranslateX;
translateY = Buffer.defaultTranslateY;
}
-
+
/**
* Cleans the Canvas background.
*/
@@ -193,11 +210,11 @@
*/
void setSyncStrategy(int strategy)
{
- if((strategy != SYNC_LEAVE_SURFACE_SESSION_CLOSED) && (strategy != SYNC_LEAVE_SURFACE_SESSION_OPEN))
- {
- throw new IllegalArgumentException("Internal: Invalid strategy value");
- }
- syncStrategy = strategy;
+ if((strategy != SYNC_LEAVE_SURFACE_SESSION_CLOSED) && (strategy != SYNC_LEAVE_SURFACE_SESSION_OPEN))
+ {
+ throw new IllegalArgumentException("Internal: Invalid strategy value");
+ }
+ syncStrategy = strategy;
}
/**
@@ -264,7 +281,7 @@
{
synchronized(graphicsBuffer)
{
- return currentColor >> 16;
+ return (currentColor >> 16) & COMPONENT_MASK;
}
}
@@ -875,20 +892,15 @@
{
final Image localLcduiImage = image;
final org.eclipse.swt.internal.qt.graphics.Image localCgfxImage =
- Internal_GfxPackageSupport.getImage(Image.getESWTImage(image));
+ Internal_GfxPackageSupport.getImage(Image.getESWTImage(image));
final int localX = x;
final int localY = y;
final Graphics self = this;
- ESWTUIThreadRunner.safeSyncExec(new Runnable()
- {
- public void run()
- {
- localLcduiImage.sync(false);
- graphicsBuffer.drawImage(localCgfxImage, localX, localY, self);
- }
- });
-
+ if(image.graphicsBuffer.containsDrawnPrimitives()) {
+ localLcduiImage.sync(true);
+ }
+ graphicsBuffer.drawImage(localCgfxImage, localX, localY, self);
}
}
}
@@ -1182,26 +1194,22 @@
final int gcTransform = Image.getCgTransformValue(transform);
synchronized(srcImage.graphicsBuffer)
{
- final Image localLcduiSrcImage = srcImage;
- final org.eclipse.swt.internal.qt.graphics.Image localCgfxImage =
- Internal_GfxPackageSupport.getImage(Image.getESWTImage(srcImage));
- final int localX = x;
- final int localY = y;
- final int localW = width;
- final int localH = height;
- final int localXSrc = xSrc;
- final int localYSrc = ySrc;
- final int localGcTransform = gcTransform;
- final Graphics self = this;
- ESWTUIThreadRunner.safeSyncExec(new Runnable()
- {
- public void run()
- {
- localLcduiSrcImage.sync(false);
- graphicsBuffer.drawImage(localCgfxImage,
- localX, localY, localW, localH, localXSrc, localYSrc, localW, localH, localGcTransform, self);
- }
- });
+ final Image localLcduiSrcImage = srcImage;
+ final org.eclipse.swt.internal.qt.graphics.Image localCgfxImage =
+ Internal_GfxPackageSupport.getImage(Image.getESWTImage(srcImage));
+ final int localX = x;
+ final int localY = y;
+ final int localW = width;
+ final int localH = height;
+ final int localXSrc = xSrc;
+ final int localYSrc = ySrc;
+ final int localGcTransform = gcTransform;
+ final Graphics self = this;
+ if(srcImage.graphicsBuffer.containsDrawnPrimitives()) {
+ localLcduiSrcImage.sync(true);
+ }
+ graphicsBuffer.drawImage(localCgfxImage,
+ localX, localY, localW, localH, localXSrc, localYSrc, localW, localH, localGcTransform, self);
}
}
}
@@ -1212,21 +1220,21 @@
*/
void sync()
{
- synchronized(graphicsBuffer)
- {
- if(syncStrategy == SYNC_LEAVE_SURFACE_SESSION_OPEN)
- {
- // This instance is used only with paint callbacks, thus
- // sync is called with the indication that surface paint
- // session can be left open as it will be closed when the
- // callback returns.
- graphicsBuffer.sync(false);
- }
- else
- {
- graphicsBuffer.sync(true);
- }
- }
+ synchronized(graphicsBuffer)
+ {
+ if(syncStrategy == SYNC_LEAVE_SURFACE_SESSION_OPEN)
+ {
+ // This instance is used only with paint callbacks, thus
+ // sync is called with the indication that surface paint
+ // session can be left open as it will be closed when the
+ // callback returns.
+ graphicsBuffer.sync(false);
+ }
+ else
+ {
+ graphicsBuffer.sync(true);
+ }
+ }
}
@@ -1243,14 +1251,14 @@
}
/**
- * Getter for graphics buffer.
- * @return The Buffer.
- */
+ * Getter for graphics buffer.
+ * @return The Buffer.
+ */
Buffer getGraphicsBuffer()
{
return graphicsBuffer;
}
-
+
/**
* Maps stroke style constant from values used by
* Graphics to values defined in GraphicsContext
--- a/javauis/lcdui_qt/tsrc/src/com/nokia/openlcdui/mt/AllTests.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/lcdui_qt/tsrc/src/com/nokia/openlcdui/mt/AllTests.java Fri Jul 09 16:35:45 2010 +0300
@@ -186,6 +186,7 @@
addTest(com.nokia.openlcdui.mt.gauge.GaugeTest.suite());
addTest(com.nokia.openlcdui.mt.graphics.DirectGraphicsTest.suite());
addTest(com.nokia.openlcdui.mt.graphics.GraphicsTest.suite());
+ addTest(com.nokia.openlcdui.mt.graphics.CommandBufferingTest.suite());
addTest(com.nokia.openlcdui.mt.image.ImageTest.suite());
addTest(com.nokia.openlcdui.mt.imageitem.ImageItemTest.suite());
addTest(com.nokia.openlcdui.mt.item.ItemTest.suite());
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/lcdui_qt/tsrc/src/com/nokia/openlcdui/mt/graphics/CommandBufferingTest.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,913 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+package com.nokia.openlcdui.mt.graphics;
+
+import junit.framework.*;
+import javax.microedition.lcdui.*;
+import com.nokia.openlcdui.mt.SWTTestCase;
+
+public class CommandBufferingTest extends SWTTestCase
+{
+ private Image testImage;
+ private final int testImageWidth = 20;
+ private final int testImageHeight = 20;
+ private int[] pixelData;
+
+ private final int GRAPHICS_SETTINGS_1 = 1;
+ private final int GRAPHICS_SETTINGS_2 = 2;
+
+ private final int WHITE = 0x00ffffff;
+ private final int BLACK = 0x00000000;
+ private final int RED = 0x00ff0000;
+ private final int GREEN = 0x0000ff00;
+ private final int BLUE = 0x000000ff;
+
+ /**
+ * Constructor.
+ */
+ public CommandBufferingTest()
+ {
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param sTestName Test name.
+ * @param rTestMethod Test method.
+ */
+ public CommandBufferingTest(String sTestName)
+ {
+ super(sTestName);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ testImage = Image.createImage(testImageWidth, testImageHeight);
+ pixelData = new int[testImageWidth*testImageHeight];
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ testImage = null;
+ pixelData = null;
+ }
+
+ /**
+ * To create the test suite. You need to add a new aSuite.addTest entry for
+ * any new test methods.
+ *
+ * @return new testsuite.
+ */
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+
+ java.util.Vector methodNames;
+ java.util.Enumeration e;
+
+ // Add widget tests
+ methodNames = CommandBufferingTest.methodNames();
+ e = methodNames.elements();
+ while(e.hasMoreElements())
+ {
+ suite.addTest(new CommandBufferingTest((String)e.nextElement()));
+ }
+
+ return suite;
+ }
+
+ public static java.util.Vector methodNames()
+ {
+ java.util.Vector methodNames = new java.util.Vector();
+ methodNames.addElement("testDefaultValues");
+ methodNames.addElement("testClip1");
+ methodNames.addElement("testClip2");
+ methodNames.addElement("testDrawArc");
+ methodNames.addElement("testDrawImage");
+ methodNames.addElement("testDrawLine");
+ methodNames.addElement("testDrawRect");
+ methodNames.addElement("testDrawRGB");
+ methodNames.addElement("testDrawRoundRect");
+ methodNames.addElement("testDrawString");
+ methodNames.addElement("testFillArc");
+ methodNames.addElement("testFillRect");
+ methodNames.addElement("testFillRoundRect");
+ methodNames.addElement("testFillTriangle");
+
+ return methodNames;
+ }
+
+ protected void runTest() throws Throwable
+ {
+ if(getName().equals("testDefaultValues")) testDefaultValues();
+ else if(getName().equals("testClip1")) testClip1();
+ else if(getName().equals("testClip2")) testClip2();
+ else if(getName().equals("testDrawArc")) testDrawArc();
+ else if(getName().equals("testDrawImage")) testDrawImage();
+ else if(getName().equals("testDrawLine")) testDrawLine();
+ else if(getName().equals("testDrawRect")) testDrawRect();
+ else if(getName().equals("testDrawRGB")) testDrawRGB();
+ else if(getName().equals("testDrawRoundRect")) testDrawRoundRect();
+ else if(getName().equals("testDrawString")) testDrawString();
+ else if(getName().equals("testFillArc")) testFillArc();
+ else if(getName().equals("testFillRect")) testFillRect();
+ else if(getName().equals("testFillRoundRect")) testFillRoundRect();
+ else if(getName().equals("testFillTriangle")) testFillTriangle();
+
+ else super.runTest();
+ }
+
+ /**
+ * Tests the default value of a newly created Graphics object
+ */
+ void testDefaultValues()
+ {
+ boolean pass = true;
+ String errorMsg = "";
+ Graphics g = testImage.getGraphics();
+
+ // Validate default color
+ final int color = g.getColor();
+ if(color != BLACK)
+ {
+ pass = false;
+ errorMsg += "Default color was " + color + ", while expected " + BLACK+". ";
+ }
+
+ // Validate default clip
+ final int clipX = g.getClipX();
+ final int clipY = g.getClipY();
+ final int clipW = g.getClipWidth();
+ final int clipH = g.getClipHeight();
+ if((clipX != 0) || (clipY != 0) ||
+ (clipW != testImageWidth) || (clipH != testImageHeight))
+ {
+ pass = false;
+ errorMsg += "Default clip was ("+clipX+","+clipY+","+clipW+","+clipH+"), " +
+ "while expected (0,0,"+testImageWidth+","+testImageHeight+"). ";
+ }
+
+ // Validate that origin is in the top left corner
+ final int transX = g.getTranslateX();
+ final int transY = g.getTranslateY();
+ if((transX != 0) || (transY != 0))
+ {
+ pass = false;
+ errorMsg += "Default origo was ("+transX+","+transY+"), while expected (0,0). ";
+ }
+
+ // Validate default font
+ final Font font = g.getFont();
+ final Font refFont = Font.getDefaultFont();
+ if((font.getFace() != refFont.getFace()) ||
+ (font.getHeight() != refFont.getHeight()) ||
+ (font.getSize() != refFont.getSize()) ||
+ (font.getStyle() != refFont.getStyle()))
+ {
+ pass = false;
+ errorMsg += "Default font from Graphics does not match with the font returned by Font.getDefaultFont() . ";
+ }
+
+ // Validate stroke style
+ final int style = g.getStrokeStyle();
+ if(style != Graphics.SOLID)
+ {
+ pass = false;
+ errorMsg += "Default stroke style was "+ style +", while expected (SOLID) "+Graphics.SOLID;
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test default clip by the values returned from Graphics
+ * and by rendering dots in corners and validating them
+ */
+ void testClip1()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel validation failed at: ";
+ Graphics g = testImage.getGraphics();
+ g.drawLine(0, 0, 0, 0); // top-left
+ g.drawLine(testImageWidth-1, 0, testImageWidth-1, 0); // top-right
+ g.drawLine(0, testImageHeight-1, 0, testImageHeight-1); // bottom-left
+ g.drawLine(testImageWidth-1, testImageHeight-1, testImageWidth-1, testImageHeight-1); // bottom-right
+
+ readTestImagePixels();
+
+ if(!validatePixel(0, 0, BLACK))
+ {
+ pass = false;
+ errorMsg += "top-left, ";
+ }
+ if(!validatePixel(testImageWidth-1, 0, BLACK))
+ {
+ pass = false;
+ errorMsg += "top-right, ";
+ }
+ if(!validatePixel(0, testImageHeight-1, BLACK))
+ {
+ pass = false;
+ errorMsg += "bottom-left, ";
+ }
+ if(!validatePixel(testImageWidth-1, testImageHeight-1, BLACK))
+ {
+ pass = false;
+ errorMsg += "bottom-right.";
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test clip with two different graphics objects
+ */
+ void testClip2()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+ final int[] clip1 = {1,1,testImageWidth-2, testImageHeight-2};
+ final int[] clip2 = {4,4,testImageWidth-9, testImageHeight-9};
+ final int[] clip3 = {8,8,testImageWidth-17, testImageHeight-17};
+
+ // Set clip one pixel smaller than the test image
+ // and fill whole image with red, using graphics object 1
+ g1.setClip(clip1[0], clip1[1], clip1[2], clip1[3]);
+ g1.setColor(RED);
+ g1.fillRect(0, 0, testImageWidth, testImageHeight);
+
+ // Set clip four pixels smaller than the test image
+ // and fill whole image with green, using graphics object 2
+ g2.setClip(clip2[0], clip2[1], clip2[2], clip2[3]);
+ g2.setColor(GREEN);
+ g2.fillRect(0, 0, testImageWidth, testImageHeight);
+
+ // Set clip eight pixels smaller than the test image
+ // and fill whole image with blue, using again graphics object 1
+ g1.setClip(clip3[0], clip3[1], clip3[2], clip3[3]);
+ g1.setColor(BLUE);
+ g1.fillRect(0, 0, testImageWidth, testImageHeight);
+
+ // read image pixels to member array
+ readTestImagePixels();
+
+ final int[] spotsToValidate = {
+ clip1[0]-1, clip1[1], WHITE, // left border (outside) of clip 1, white
+ clip1[0]+clip1[2], clip1[1], WHITE, // right border (outside) of clip 1, white
+ clip1[0]+1, clip1[1]-1, WHITE, // top border (outside) of clip 1, white
+ clip1[0]+1, clip1[1]+clip1[3], WHITE, // bottom border (outside) of clip 1, white
+
+ clip1[0], clip1[1], RED, // left border (inside) of clip 1, red
+ clip1[0]+clip1[2]-1, clip1[1], RED, // right border (inside) of clip 1, red
+ clip1[0], clip1[1]+1, RED, // top border (inside) of clip 1, red
+ clip1[0]+1, clip1[1]+clip1[3]-1, RED, // bottom border (inside) of clip 1, red
+
+ clip2[0]-1, clip2[1], RED, // left border (outside) of clip 2, red
+ clip2[0]+clip2[2], clip2[1], RED, // right border (outside) of clip 2, red
+ clip2[0]+1, clip2[1]-1, RED, // top border (outside) of clip 2, red
+ clip2[0]+1, clip2[1]+clip2[3], RED, // bottom border (outside) of clip 2, red
+
+ clip2[0], clip2[1], GREEN, // left border (inside) of clip 2, green
+ clip2[0]+clip2[2]-1, clip2[1], GREEN, // right border (inside) of clip 2, green
+ clip2[0], clip2[1]+1, GREEN, // top border (inside) of clip 2, green
+ clip2[0]+1, clip2[1]+clip2[3]-1, GREEN, // bottom border (inside) of clip 2, green
+
+ clip3[0]-1, clip3[1], GREEN, // left border (outside) of clip 3, green
+ clip3[0]+clip3[2], clip3[1], GREEN, // right border (outside) of clip 3, green
+ clip3[0]+1, clip3[1]-1, GREEN, // top border (outside) of clip 3, green
+ clip3[0]+1, clip3[1]+clip3[3], GREEN, // bottom border (outside) of clip 3, green
+
+ clip3[0], clip3[1], BLUE, // left border (inside) of clip 3, blue
+ clip3[0]+clip3[2]-1, clip3[1], BLUE, // right border (inside) of clip 3, blue
+ clip3[0], clip3[1]+1, BLUE, // top border (inside) of clip 3, blue
+ clip3[0]+1, clip3[1]+clip3[3]-1, BLUE, // bottom border (inside) of clip 3, blue
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test drawArc with two graphics
+ */
+ void testDrawArc()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawArc(0, 0, 8, 8, 0, 180);
+ g2.drawArc(0, 0, 8, 8, 0, 180);
+ g1.drawArc(0, 8, 8, 8, 0, 180);
+
+ // read image pixels to member array
+ readTestImagePixels();
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ 1, 9, BLUE, // Starting point of the first arc drawn with g1. Y location is arc y + ((height/2)+1) as specified in lcdui spec
+ 9, 9, BLUE, // end point
+ 5, 5, BLUE, // tip of the arc
+ 10, 8, RED, // start arc 2
+ 18, 8, RED, // end arc 2
+ 14, 4, RED, // tip of arc 2
+ 1, 17, BLUE, // start arc 3
+ 9, 17, BLUE, // end arc 3
+ 5, 13, BLUE, // tip of arc 3
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test drawImage with two graphics
+ */
+ void testDrawImage()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+
+ // prepare image to be drawn
+ Image img = Image.createImage(5,5);
+ Graphics ig = img.getGraphics();
+ ig.fillRect(0, 0, 5, 5);
+
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawImage(img, 0, 0, 0);
+ g2.drawImage(img, 0, 0, 0);
+ g1.drawImage(img, 0, 8, 0);
+
+ // read image pixels to member array
+ readTestImagePixels();
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ 1, 5, BLACK, // top-left corner of image 1
+ 5, 5, BLACK, // top-right corner of image 1
+ 1, 9, BLACK, // bottom-left corner of image 1
+ 5, 9, BLACK, // bottom-right corner of image 1
+
+ 0, 7, WHITE, // Left border (outside) of image 1
+ 6, 7, WHITE, // Right border (outside) of image 1
+ 3, 4, WHITE, // Top border (outside) of image 1
+ 3, 10, WHITE, // Bottom border (outside) of image 1
+
+ 10, 4, BLACK, // top-left corner of image 2
+ 14, 4, BLACK, // top-right corner of image 2
+ 10, 8, BLACK, // bottom-left corner of image 2
+ 14, 8, BLACK, // bottom-right corner of image 2
+
+ 9, 6, WHITE, // Left border (outside) of image 2
+ 15, 6, WHITE, // Right border (outside) of image 2
+ 12, 3, WHITE, // Top border (outside) of image 2
+ 12, 9, WHITE, // Bottom border (outside) of image 2
+
+ 1, 13, BLACK, // top-left corner of image 3
+ 5, 13, BLACK, // top-right corner of image 3
+ 1, 17, BLACK, // bottom-left corner of image 3
+ 5, 17, BLACK, // bottom-right corner of image 3
+
+ 0, 15, WHITE, // Left border (outside) of image 3
+ 6, 15, WHITE, // Right border (outside) of image 3
+ 3, 12, WHITE, // Top border (outside) of image 3
+ 3, 18, WHITE, // Bottom border (outside) of image 3
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ void testDrawLine()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawLine(0, 0, 0, 7);
+ g2.drawLine(0, 0, 0, 5);
+ g1.drawLine(0, 12, 7, 12);
+
+ // read image pixels to member array
+ readTestImagePixels();
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ // Dotted blue line 1
+ 1, 4, WHITE, // point before line 1 start
+ 1, 5, BLUE, // start of line 1
+ 1, 7, WHITE, // middle of line 1, verify that its dotted
+ 1, 11, BLUE, // end of line 1
+ 1, 12, WHITE, // point after line 1 end
+
+ // Solid red line 2
+ 10, 3, WHITE, // point before line 2 start
+ 10, 4, RED, // start of line 2
+ 10, 9, RED, // end of line 2
+ 10, 10, WHITE, // point after line 2 end
+
+ // Dotted blue line 3
+ 0, 17, WHITE, // point before line 1 start
+ 1, 17, BLUE, // start of line 1
+ 3, 17, WHITE, // middle of line 1, verify that its dotted
+ 7, 17, BLUE, // end of line 1
+ 8, 17, WHITE, // point after line 1 end
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test drawRect with two graphics
+ */
+ void testDrawRect()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawRect(0, 0, 6, 6);
+ g2.drawRect(0, 0, 6, 6);
+ g1.drawRect(0, 8, 3, 3);
+
+ // read image pixels to member array
+ readTestImagePixels();
+ //print(pixelData, testImageWidth);
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ // Dotted rectangle
+ 1, 5, BLUE, // top-left corner of rectangle 1
+ 7, 5, BLUE, // top-right corner of rectangle 1
+ 1, 11, BLUE, // bottom-left corner of rectangle 1
+ 7, 11, BLUE, // bottom-right corner of rectangle 1
+ 3, 5, WHITE, // middle of one side, verify that its dotted
+
+ 0, 7, WHITE, // Left border (outside) of rectangle 1
+ 8, 7, WHITE, // Right border (outside) of rectangle 1
+ 3, 4, WHITE, // Top border (outside) of rectangle 1
+ 3, 12, WHITE, // Bottom border (outside) of rectangle 1
+
+ // Solid rectangle
+ 10, 4, RED, // top-left corner of rectangle 2
+ 16, 4, RED, // top-right corner of rectangle 2
+ 10, 10, RED, // bottom-left corner of rectangle 2
+ 16, 10, RED, // bottom-right corner of rectangle 2
+
+ 9, 6, WHITE, // Left border (outside) of rectangle 2
+ 17, 6, WHITE, // Right border (outside) of rectangle 2
+ 12, 3, WHITE, // Top border (outside) of rectangle 2
+ 14, 11, WHITE, // Bottom border (outside) of rectangle 2
+
+ // Dotted rectangle
+ 1, 13, BLUE, // top-left corner of rectangle 3
+ 4, 13, BLUE, // top-right corner of rectangle 3
+ 1, 16, BLUE, // bottom-left corner of rectangle 3
+ 4, 16, BLUE, // bottom-right corner of rectangle 3
+ 3, 13, WHITE, // middle of one side, verify that its dotted
+
+ 0, 14, WHITE, // Left border (outside) of rectangle 3
+ 5, 14, WHITE, // Right border (outside) of rectangle 3
+ 3, 12, WHITE, // Top border (outside) of rectangle 3
+ 3, 17, WHITE, // Bottom border (outside) of rectangle 3
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test drawRGB with two graphics
+ */
+ void testDrawRGB()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+
+ // prepare test rgbdata
+ final int r = 0xffff0000;
+ final int b = 0xff0000ff;
+ final int[] rgb1 = {
+ r,r,r,r,r,
+ r,r,r,r,r,
+ r,r,r,r,r,
+ r,r,r,r,r,
+ r,r,r,r,r
+ };
+
+ final int[] rgb2 = {
+ b,b,b,b,b,
+ b,b,b,b,b,
+ b,b,b,b,b,
+ b,b,b,b,b,
+ b,b,b,b,b
+ };
+
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawRGB(rgb1, 0, 5, 0, 0, 5, 5, false);
+ g2.drawRGB(rgb2, 0, 5, 0, 0, 5, 5, false);
+ g1.drawRGB(rgb1, 0, 5, 0, 8, 5, 5, false);
+
+ // read image pixels to member array
+ readTestImagePixels();
+ //print(pixelData, testImageWidth);
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ 1, 5, RED, // top-left corner of rectangle 1
+ 5, 5, RED, // top-right corner of rectangle 1
+ 1, 9, RED, // bottom-left corner of rectangle 1
+ 5, 9, RED, // bottom-right corner of rectangle 1
+
+ 0, 7, WHITE, // Left border (outside) of rectangle 1
+ 6, 7, WHITE, // Right border (outside) of rectangle 1
+ 3, 4, WHITE, // Top border (outside) of rectangle 1
+ 3, 10, WHITE, // Bottom border (outside) of rectangle 1
+
+ 10, 4, BLUE, // top-left corner of rectangle 2
+ 14, 4, BLUE, // top-right corner of rectangle 2
+ 10, 8, BLUE, // bottom-left corner of rectangle 2
+ 14, 8, BLUE, // bottom-right corner of rectangle 2
+
+ 9, 6, WHITE, // Left border (outside) of rectangle 2
+ 15, 6, WHITE, // Right border (outside) of rectangle 2
+ 12, 3, WHITE, // Top border (outside) of rectangle 2
+ 12, 9, WHITE, // Bottom border (outside) of rectangle 2
+
+ 1, 13, RED, // top-left corner of rectangle 3
+ 5, 13, RED, // top-right corner of rectangle 3
+ 1, 17, RED, // bottom-left corner of rectangle 3
+ 5, 17, RED, // bottom-right corner of rectangle 3
+
+ 0, 14, WHITE, // Left border (outside) of rectangle 3
+ 6, 14, WHITE, // Right border (outside) of rectangle 3
+ 3, 12, WHITE, // Top border (outside) of rectangle 3
+ 3, 18, WHITE, // Bottom border (outside) of rectangle 3
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ /**
+ * Test drawRoundRect with two graphics
+ */
+ void testDrawRoundRect()
+ {
+ boolean pass = true;
+ String errorMsg = "Pixel check failed at: ";
+
+ Graphics g1 = testImage.getGraphics();
+ Graphics g2 = testImage.getGraphics();
+
+ // run different settings in the graphics instances
+ applyGraphicsSettings(g1, GRAPHICS_SETTINGS_1);
+ applyGraphicsSettings(g2, GRAPHICS_SETTINGS_2);
+
+ g1.drawRoundRect(0, 0, 6, 6, 2, 2);
+ g2.drawRoundRect(0, 0, 6, 6, 2, 2);
+ g1.drawRoundRect(0, 8, 5, 5, 2, 2);
+
+ // read image pixels to member array
+ readTestImagePixels();
+ //print(pixelData, testImageWidth);
+
+ // Most of the points to validate are based on the values
+ // set by applyGraphicsSettings() -method
+ final int[] spotsToValidate = {
+ // Dotted rectangle
+ 1, 6, BLUE, // left side of rectangle 1
+ 7, 6, BLUE, // right side of rectangle 1
+ 3, 5, BLUE, // top side of rectangle 1
+ 3, 11, BLUE, // bottom side of rectangle 1
+ 5, 5, WHITE, // middle of one side, verify that its dotted
+
+ 0, 7, WHITE, // Left border (outside) of rectangle 1
+ 7, 7, WHITE, // Right border (outside) of rectangle 1
+ 3, 4, WHITE, // Top border (outside) of rectangle 1
+ 3, 12, WHITE, // Bottom border (outside) of rectangle 1
+
+ // Solid rectangle
+ 10, 6, RED, // left side of rectangle 2
+ 16, 6, RED, // right side of rectangle 2
+ 12, 4, RED, // top side of rectangle 2
+ 12, 10, RED, // bottom side corner of rectangle 2
+
+ 9, 6, WHITE, // Left border (outside) of rectangle 2
+ 17, 6, WHITE, // Right border (outside) of rectangle 2
+ 12, 3, WHITE, // Top border (outside) of rectangle 2
+ 14, 11, WHITE, // Bottom border (outside) of rectangle 2
+
+ // Dotted rectangle
+ 1, 15, BLUE, // left side of of rectangle 3
+ 6, 14, BLUE, // right side of of rectangle 3
+ 2, 13, BLUE, // top side of rectangle 3
+ 2, 18, BLUE, // bottom side of rectangle 3
+ 1, 4, WHITE, // middle of one side, verify that its dotted
+
+ 0, 14, WHITE, // Left border (outside) of rectangle 3
+ 7, 14, WHITE, // Right border (outside) of rectangle 3
+ 3, 12, WHITE, // Top border (outside) of rectangle 3
+ 3, 19, WHITE, // Bottom border (outside) of rectangle 3
+ };
+
+ // Validate test points against reference color
+ for(int i = 0; i < spotsToValidate.length ; i=i+3)
+ {
+ if(!validatePixel(spotsToValidate[i], spotsToValidate[i+1], spotsToValidate[i+2]))
+ {
+ pass = false;
+ errorMsg += "("+spotsToValidate[i]+","+spotsToValidate[i+1]+"), expected "+colorToString(spotsToValidate[i+2])+
+ ", got "+ colorToString(getPixelIgnoreAlpha(spotsToValidate[i], spotsToValidate[i+1]))+" : ";
+ }
+ }
+
+ if(!pass)
+ {
+ fail(errorMsg);
+ }
+ }
+
+ void testDrawString()
+ {
+
+ }
+
+ void testFillArc()
+ {
+
+ }
+
+ void testFillRect()
+ {
+
+ }
+
+ void testFillRoundRect()
+ {
+
+ }
+
+ void testFillTriangle()
+ {
+
+ }
+
+
+ private void applyGraphicsSettings(Graphics g, int settings)
+ {
+
+ Font defaultFont = Font.getDefaultFont();
+ if(settings == GRAPHICS_SETTINGS_1)
+ {
+ Font font = Font.getFont(defaultFont.getFace(), defaultFont.getStyle(), Font.SIZE_LARGE);
+ g.setColor(BLUE);
+ g.translate(1, 5);
+ g.setStrokeStyle(Graphics.DOTTED);
+ }
+ else if(settings == GRAPHICS_SETTINGS_2)
+ {
+ Font font = Font.getFont(defaultFont.getFace(), defaultFont.getStyle(), Font.SIZE_SMALL);
+ g.setColor(RED);
+ g.translate(10, 4);
+ g.setStrokeStyle(Graphics.SOLID);
+ }
+ }
+
+ /**
+ * Reads all pixels of the testImage to the class member array pixelData
+ */
+ private void readTestImagePixels()
+ {
+ testImage.getRGB(pixelData, 0, testImageWidth, 0, 0, testImageWidth, testImageHeight);
+ }
+
+ void print(int[] array, int scanlength) {
+ final int width = scanlength;
+ String output = "";
+
+ int y = 0;
+ for(int i = 0; i < array.length; i++) {
+
+ int a = ((array[i] >> 24) & 0xff);
+ int r = ((array[i] >> 16) & 0xff);
+ int g = ((array[i] >> 8 ) & 0xff);
+ int b = ( array[i] & 0xff);
+
+ if (a == 255 && r == 0 && g == 0 && b == 0) {
+ output += "B,";
+ } else if (a == 255 && r == 255 && g == 255 && b == 255) {
+ output += "0,";
+ }
+ else if(a == 255 && r == 255 && g == 0 && b == 0) {
+ output += "r,";
+ }
+ else if(a == 255 && r == 0 && g == 255 && b == 0) {
+ output += "g,";
+ }
+ else if(a == 255 && r == 0 && g == 0 && b == 255) {
+ output += "b,";
+ }
+ else {
+ //output += "x,";
+ output += "("+a+","+r+","+g+","+b+")";
+ }
+
+ if(i==((y*width) + (width-1))) {
+ output += "\n";
+ y++;
+ }
+ }
+ System.out.println(output);
+ }
+
+
+ /**
+ * Validates that the pixel in given coordinate equals given color and ignores alpha.
+ * @return True if given pixel has given refColor value, otherwise false
+ */
+ private boolean validatePixel(final int x, final int y, final int refColor)
+ {
+ final int sweetSpot = pixelData[(testImageWidth*y)+x];
+ final int[] sweetSpotComponents = getColorComponents(sweetSpot);
+ final int[] refColorComponents = getColorComponents(refColor);
+
+ if((sweetSpotComponents[1] == refColorComponents[1]) && // red
+ (sweetSpotComponents[2] == refColorComponents[2]) && // green
+ (sweetSpotComponents[3] == refColorComponents[3])) // blue
+ {
+ return true;
+ }
+ return false;
+ }
+
+ private int getPixel(int x, int y)
+ {
+ return pixelData[(testImageWidth*y)+x];
+ }
+
+ private int getPixelIgnoreAlpha(int x, int y)
+ {
+ int pixel = pixelData[(testImageWidth*y)+x];
+ return pixel & 0x00ffffff; // mask alpha to zero
+ }
+
+ private String colorToString(final int color)
+ {
+ int[] c = getColorComponents(color);
+ return new String("("+c[0]+","+c[1]+","+c[2]+","+c[3]+") ");
+ }
+
+ private int[] getColorComponents(final int color)
+ {
+ final int a = ((color >> 24) & 0xff);
+ final int r = ((color >> 16) & 0xff);
+ final int g = ((color >> 8 ) & 0xff);
+ final int b = ( color & 0xff);
+ return new int[] {a, r, g, b};
+ }
+
+ private void printColor(final int color) {
+ int[] components = getColorComponents(color);
+ System.out.println("Color components ("+color+"): r="+components[0]+", g="+components[1]+
+ ", b="+components[2]+", a="+components[3]);
+ }
+
+}
--- a/javauis/m3g_qt/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/m3g_qt/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -27,15 +27,6 @@
<!-- Needed by the utilities.xml. See the description form the utilities.xml
file -->
-
- <target name="compile">
- <omj.javac classpath="${impl.cldc.jar}" excludes="**/CDCCompatibilityDelegate.java"/>
- </target>
-
-
- <!-- Needed by the utilities.xml. See the description form the utilities.xml
- file -->
-
<property name="javah.classnames"
value="javax.microedition.m3g.AnimationController,
javax.microedition.m3g.AnimationTrack,
--- a/javauis/m3g_qt/src/jni/interface.inl Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/m3g_qt/src/jni/interface.inl Fri Jul 09 16:35:45 2010 +0300
@@ -39,6 +39,14 @@
*/
JNIEXPORT jint JNICALL Java_javax_microedition_m3g_Interface__1ctor(JNIEnv* aEnv, jclass)
{
+ EGLDisplay oldDisplay = eglGetCurrentDisplay();
+ EGLSurface oldDrawSurface = eglGetCurrentSurface(EGL_DRAW);
+ EGLSurface oldReadSurface = eglGetCurrentSurface(EGL_READ);
+ EGLContext oldContext = eglGetCurrentContext();
+ EGLenum oldAPI = eglQueryAPI();
+ eglMakeCurrent( EGL_DEFAULT_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
+ eglBindAPI( EGL_OPENGL_ES_API );
+
M3Gparams cs;
memset(&cs, 0, sizeof(cs));
cs.mallocFunc = malloc;
@@ -51,6 +59,10 @@
//jint handle = eventSource->Execute(&createInterface, &cs);
jint handle = (unsigned)m3gCreateInterface(&cs);
M3G_DO_UNLOCK(aEnv);
+
+ eglMakeCurrent( EGL_DEFAULT_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
+ eglBindAPI( oldAPI );
+ eglMakeCurrent( oldDisplay, oldDrawSurface, oldReadSurface, oldContext );
return handle;
}
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayer.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/audiostreaming/src.mmf/cmmaaudiostreamplayer.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -21,10 +21,10 @@
#include <audiopreference.h>
#include <logger.h>
-#include "CMMAAudioStreamPlayer.h"
-#include "CMMADataSourceStream.h"
-#include "MMAFunctionServer.h"
-#include "CMMAStreamHandler.h"
+#include "cmmaaudiostreamplayer.h"
+#include "cmmadatasourcestream.h"
+#include "mmafunctionserver.h"
+#include "cmmastreamhandler.h"
const TInt KPlayerPriority = KAudioPriorityRecording;
_LIT(KMMAStreamErrorMessage, "Internal error: %d");
--- a/javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamhandler.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/audiostreaming/src.mmf/cmmastreamhandler.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -21,9 +21,9 @@
#include <audiopreference.h>
#include <logger.h>
-#include "CMMAStreamHandler.h"
-#include "CMMADataSourceStream.h"
-#include "MMAFunctionServer.h"
+#include "cmmastreamhandler.h"
+#include "cmmadatasourcestream.h"
+#include "mmafunctionserver.h"
CMMAStreamHandler* CMMAStreamHandler::NewL(
MMMAStreamHandlerListener& aListener,
--- a/javauis/mmapi_qt/baseline/inc/cmmadisplay.h Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/inc/cmmadisplay.h Fri Jul 09 16:35:45 2010 +0300
@@ -50,7 +50,7 @@
// Default constructor, protected to allow derivation
CMMADisplay();
- void Construct(MMAFunctionServer* eventSource ,jobject javadisplayref);
+ void Construct(MMAFunctionServer* eventSource ,JNIEnv* aJni, jobject javadisplayref);
public: // Methods derived from MMMADisplay
void DrawFrameL(const CFbsBitmap* aBitmap);
@@ -66,7 +66,8 @@
void SetUIPlayer(MMMAGuiPlayer* player);
TSize SourceSize();
virtual void SourceSizeChanged(TInt aJavaControlWidth, TInt aJavaControlHeight,TInt x,TInt y, TRect aBoundsRect) = 0;
-
+ TBool iseSWT();
+ void SetFullscreenSize(TSize& aSize);
/**
* Gets notification that there is container to draw assigned
*
@@ -267,9 +268,19 @@
MMAFunctionServer* iEventSource;
JNIEnv* iJni;
jobject iJavaDisplayObject;
- jclass iJavaDisplayClass;
- TSize iFullScreenSize;
- MMMAGuiPlayer* iUiPlayer;
+ jclass iJavaDisplayClass;
+ TSize iFullScreenSize;
+ MMMAGuiPlayer* iUiPlayer;
+ TBool iIseSWT;
+ jmethodID setRectID;
+ jfieldID iRectDimensionField;
+ jfieldID iDisplayboundarrField;
+ jmethodID setContentBoundID;
+ jmethodID removeContentBoundID;
+ jmethodID redrawControlID;
+ jmethodID getCallBackMethodID;
+ jobject iJavadisplayref;
+ jmethodID getBoundRectID;
};
#endif // CMMADISPLAY_H
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayer.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/AnimationPlayer.java Fri Jul 09 16:35:45 2010 +0300
@@ -16,19 +16,14 @@
*/
package com.nokia.microedition.media.animation;
-import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
import java.util.Enumeration;
import java.util.Hashtable;
-import java.util.Timer;
-import java.util.TimerTask;
import javax.microedition.media.Control;
import javax.microedition.media.MediaException;
-import javax.microedition.media.Player;
import javax.microedition.media.PlayerListener;
import javax.microedition.media.protocol.DataSource;
@@ -48,8 +43,6 @@
import com.nokia.microedition.media.InputStreamSourceStream;
import com.nokia.microedition.media.PlayerBase;
import com.nokia.microedition.media.PlayerListenerImpl;
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-import com.nokia.mj.impl.utils.Logger;
public class AnimationPlayer extends PlayerBase implements ESWTinitializeListener
{
@@ -98,7 +91,7 @@
// of VideoControl should return the actual width and height of the image
private Point iSourceDimension;
// Current dimension of the image, MIDlet developer may change the size of VideoControl
-// private Point iCurrentVideoDimension;
+ private Point iCurrentVideoDimension;
// Total time taken so far to player the animation, it keeps updating as player moves
private long iMediaTime;
// Time at which, player should be stopped
@@ -145,6 +138,7 @@
e.printStackTrace();
}
iSourceDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
+ iCurrentVideoDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
iBackgroundPixel= imageLoader.backgroundPixel;
}
populateControl();
@@ -163,6 +157,7 @@
// Following line may throw SWTException
iImageData=imageLoader.load(locator);
iSourceDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
+ iCurrentVideoDimension= new Point(imageLoader.logicalScreenWidth, imageLoader.logicalScreenHeight);
iBackgroundPixel= imageLoader.backgroundPixel;
populateControl();
}
@@ -206,7 +201,8 @@
{
// since after stopping the player the player state will move to pre-fetched state
changePlayerState(PREFETCHED);
- iPlayerListenerImpl.postEvent(PlayerListener.STOPPED, new Long(iMediaTime * 10000));
+ //iPlayerListenerImpl.postEvent(PlayerListener.STOPPED, new Long(iMediaTime * 10000));
+ iPlayerListenerImpl.postEvent(PlayerListener.STOPPED, new Long(iMediaTime));
}
/**
@@ -251,8 +247,7 @@
public long getMediaTime()
{
closeCheck();
- // Since we have to return it in microsecond multiply it with 10000;
- return iMediaTime*10000;
+ return iMediaTime;
}
public int getState()
@@ -272,12 +267,11 @@
/**
*
*/
-
+ GC gc = null;
public void start() throws MediaException
{
final String DEBUG_STR = "AnimationPlayer::start()";
- final long inTime = System.currentTimeMillis();
-
+// final long inTime = System.currentTimeMillis();
prefetch();
// Only prefetched player may be started. If player is already started
// this method returns silently.
@@ -288,21 +282,21 @@
Thread thread = new Thread("Animation")
{
int loopCount = iCurrentLoopCount;
- GC gc = null;
public void run()
{
//changePlayerState(STARTED);
final int noOfFrames = iImageData.length;
while (iState == STARTED)
{
- final int delayTimeForNextFrame = iImageData[iFrameIndex].delayTime;
+ final int delayTimeForNextFrame = iImageData[iFrameIndex].delayTime*10000 ;
// Since we are going to display first frame, notify all
// PlayerListener that Player has started
if (iFrameIndex == 0)
{
+ iMediaTime=0;
iPlayerListenerImpl.postEvent(
- PlayerListener.STARTED, new Long(
- iMediaTime * 10000));
+ PlayerListener.STARTED, new Long(0));
+
}
if (iDisplay != null)
{
@@ -310,9 +304,15 @@
{
public void run()
{
- if (gc == null)
- gc = new GC(iImage);
- Image tempImage = new Image(iDisplay,iImageData[iFrameIndex]);
+ // For out of memory issue in case of full screen, we are scaling the image
+ // while displaying it.
+ ImageData tempImageData =iImageData[iFrameIndex] ;
+ if (iSourceDimension.x!=iCurrentVideoDimension.x || iSourceDimension.x!=iCurrentVideoDimension.x)
+ {
+ tempImageData = iImageData[iFrameIndex].scaledTo(iCurrentVideoDimension.x , iCurrentVideoDimension.y);
+ }
+ Image tempImage = new Image(iDisplay,tempImageData);
+ //Image tempImage = new Image(iDisplay,iImageData[iFrameIndex]);
gc.drawImage(tempImage, 0, 0);
tempImage.dispose();
iFrameIndex = (iFrameIndex + 1) % noOfFrames;
@@ -324,18 +324,17 @@
}
});
}
- else// if the initDisplayMode is not called yer
+ else// if the initDisplayMode is not called yet
{
iFrameIndex = (iFrameIndex + 1) % noOfFrames;
iMediaTime += delayTimeForNextFrame;
}
try
{
- Thread.sleep(delayTimeForNextFrame * 10);
+ Thread.sleep(delayTimeForNextFrame / 1000);
}
catch (InterruptedException e)
{
- // TODO Auto-generated catch block
e.printStackTrace();
}
// post EOM event
@@ -352,22 +351,18 @@
// listener
iPlayerListenerImpl.postEvent(
PlayerListener.END_OF_MEDIA,
- new Long(iMediaTime * 10000));
- iMediaTime = 0;
+ new Long(iMediaTime));
}
if (iAnimationObserver!=null)
{
- iAnimationObserver.animationAdvanced(iMediaTime*10000);
+ iAnimationObserver.animationAdvanced(iMediaTime);
}
}// end of while loop
iCurrentLoopCount = loopCount;
- // Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo, DEBUG_STR
-
}
};
thread.start();
}
- // Logger.LOG(Logger.EJavaMMAPI, Logger.EInfo,DEBUG_STR + "-");
}
/**
@@ -573,7 +568,15 @@
public void notifyDisplayAvailable(Display aDisplay)
{
iDisplay= aDisplay;
- iImage=new Image(iDisplay, iImageData[0]);
+ //iImage=new Image(iDisplay, iImageData[0]);
+ iImage=new Image(iDisplay, iImageData[iFrameIndex]);
+ iDisplay.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ gc = new GC(iImage);
+ }
+ });
}
/**
* Notified when the control is available
@@ -593,14 +596,17 @@
* @param width : to be set of the video(Animated GIF)
* @param height : height to be set of video(Animated GIF)
*/
- void updateImageData(int width, int height)
+ void updateImageData(int aWidth, int aHeight)
{
- int noOfFrames= iImageData.length;
- for (int i=0; i<noOfFrames; i++)
- {
- iImageData[i]=iImageData[i].scaledTo(width, height);
- }
- iImage=new Image(iDisplay, iImageData[iFrameIndex]);
+// int noOfFrames= iImageData.length;
+// for (int i=0; i<noOfFrames; i++)
+// {
+// iImageData[i]=iImageData[i].scaledTo(aWidth, aHeight);
+// }
+// iImage=new Image(iDisplay, iImageData[iFrameIndex]);
+ iCurrentVideoDimension.x=aWidth;
+ iCurrentVideoDimension.y= aHeight;
+ iImage=new Image(iDisplay, iImageData[iFrameIndex].scaledTo(aWidth, aHeight));
}
/**
@@ -641,10 +647,10 @@
* Called from VideoControl to get the image width and height,
* so that Item will be created exactly of same dimension
*/
- Point getImageDimension()
+ Point getCurrentVideoDimension()
{
-// return iCurrentVideoDimension;
- return new org.eclipse.swt.graphics.Point(iImageData[0].width, iImageData[0].height);
+ return iCurrentVideoDimension;
+ // return new org.eclipse.swt.graphics.Point(iImageData[0].width, iImageData[0].height);
}
@@ -661,7 +667,6 @@
iDisplayLocation.x=aX;
iDisplayLocation.y=aY;
}
-
/**
* @return the position of the image to be displayed
*/
@@ -749,7 +754,7 @@
this.iIsControlVisible = iIsControlVisible;
}
/**
- * Called from
+ * Called from StopTimeControl.animationAdvanced(long), once the stopped time is greater than or equal media time.
*/
void postEvent(long aMediaTime)
{
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoControl.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/animation/VideoControl.java Fri Jul 09 16:35:45 2010 +0300
@@ -17,38 +17,20 @@
package com.nokia.microedition.media.animation;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.Item;
import javax.microedition.media.MediaException;
import javax.microedition.media.Player;
import javax.microedition.media.PlayerListener;
-import org.eclipse.ercp.swt.mobile.MobileShell;
-import org.eclipse.swt.events.PaintEvent;
-import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ProxyControl;
-import org.eclipse.swt.widgets.Shell;
-//import com.nokia.microedition.media.control.ApplicationUtils;
import com.nokia.microedition.media.control.ControlImpl;
-import com.nokia.microedition.media.control.MMAGUIFactory;
+import com.nokia.mj.impl.nokialcdui.ItemControlStateChangeListener;
import com.nokia.mj.impl.rt.support.Finalizer;
-import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.nokialcdui.ItemControlStateChangeListener;
-import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
-
-//import com.nokia.mj.impl.media.PlayerPermission;
-import com.nokia.mj.impl.rt.support.ApplicationUtils;
import com.nokia.mj.impl.utils.Logger;
@@ -74,29 +56,46 @@
private static String ESWT_CONTROL = ".control";
private static final int NOT_INITIALIZED = -1;
- protected int iStatus = NOT_INITIALIZED;
+ private int iStatus = NOT_INITIALIZED;
private static final int UNDEFINED_RETURN_VALUE=0;
// For integrating with eSWT API
private Display iDisplay;
// This is reference of eSWT Control, don't get confused with the Player Control
private Control iControl;
+
+ /**
+ * This variable stores the information whether the VideoControl is in full screen mode or not.
+ * by default it's value is false
+ */
+ private boolean iFullScreenMode;
/**
* When video display is set to full screen mode, old
- * video position & size is stored to this member. When
+ * video size is stored to this member. When
* full screen mode is turned off, this member is used to
* find out if display size has been changed during full
* screen mode. This is needed to generate a SIZE_CHANGED
* event.
*/
- private Point iOldDisplaySize;
+ private Point iOldDisplaySize= new Point(0,0);
+ /**
+ * When video display is set to full screen mode, old
+ * video location is stored to this member. When
+ * full screen mode is turned off, this member is used to
+ * find out if display location has been changed during full
+ * screen mode.
+ */
+ private Point iOldDisplayLocation= new Point(0,0);
/**
* A CustomItem which needs to be returned in case USE_GUI_PRIMITIVE and null to MIDlet
* from initDisplayMode function.
*/
// Global??? yes because we need to remove it from player listener, while finalizer will be called
private VideoItem iVideoItem;
-
- ESWTinitializeListener iESWTinitializeListener;
+ /**
+ * An interface, which listen for eSWT Display and Control, here it is AnimationPlayer
+ * and is getting notified, as soon as the either of these is ready to use
+ */
+ private ESWTinitializeListener iESWTinitializeListener;
/**
* Constructor of VideoControl
@@ -156,7 +155,7 @@
"VideoControl.initDisplayMode() not called yet");
}
// Following function will always return Player's current height
- return ((AnimationPlayer) iPlayer).getImageDimension().x;
+ return ((AnimationPlayer) iPlayer).getCurrentVideoDimension().y;
}
/**
@@ -172,7 +171,7 @@
throw new IllegalStateException(
"VideoControl.initDisplayMode() not called yet");
}
- return ((AnimationPlayer) iPlayer).getImageDimension().x;
+ return ((AnimationPlayer) iPlayer).getCurrentVideoDimension().x;
}
/**
@@ -385,7 +384,7 @@
*/
private Object initLCDUI()
{
- iVideoItem = new VideoItem(((AnimationPlayer)iPlayer).getImageDimension());
+ iVideoItem = new VideoItem(((AnimationPlayer)iPlayer).getCurrentVideoDimension());
iPlayer.addPlayerListener(iVideoItem);
iStatus = USE_GUI_PRIMITIVE;
return iVideoItem;
@@ -480,7 +479,7 @@
{
public void run()
{
- control=new ProxyControl(((AnimationPlayer)iPlayer).getImageDimension());
+ control=new ProxyControl(((AnimationPlayer)iPlayer).getCurrentVideoDimension());
}
});
}
@@ -539,8 +538,12 @@
// Before going to full screen mode, we need to store the current display size;
// so that when user will exit from the full screen,
// it will return to it's previous size
- iOldDisplaySize = ((AnimationPlayer)iPlayer).getImageDimension();
- Rectangle displayDimension=calculateFullScreenDimension();
+
+ iOldDisplaySize.x = ((AnimationPlayer)iPlayer).getCurrentVideoDimension().x;
+ iOldDisplaySize.y = ((AnimationPlayer)iPlayer).getCurrentVideoDimension().y;
+ iOldDisplayLocation.x= ((AnimationPlayer)iPlayer).getiDisplayLocation().x;
+ iOldDisplayLocation.y= ((AnimationPlayer)iPlayer).getiDisplayLocation().y;
+ Rectangle displayDimension = calculateFullScreenDimension();
((AnimationPlayer)iPlayer).updateImageData(displayDimension.width, displayDimension.height);
setDisplayLocation(displayDimension.x, displayDimension.y);
((AnimationPlayer)iPlayer).getiPlayerListenerImpl().postEvent(PlayerListener.SIZE_CHANGED, this);
@@ -552,12 +555,14 @@
if (iOldDisplaySize!=null)
{
((AnimationPlayer)iPlayer).updateImageData(iOldDisplaySize);
+ ((AnimationPlayer)iPlayer).setDisplayLocation(iOldDisplayLocation.x, iOldDisplayLocation.y);
// Do we need to make it null?
iOldDisplaySize=null;
// post event to player Listener
((AnimationPlayer)iPlayer).getiPlayerListenerImpl().postEvent(PlayerListener.SIZE_CHANGED, this);
}
}
+ iFullScreenMode = aFullScreenMode;
}
/* (non-Javadoc)
@@ -582,6 +587,16 @@
// notifyControlAvailable function is not get called)
if (iControl==null)// || (iControl instanceof org.eclipse.swt.internal.extension.CanvasExtension))
return ;
+ //if video control is in full screen mode
+ // this function should not take effect
+ // following block will store the location to be set
+ // so that when player will exit from full screen mode, this size will be effective
+ if (iFullScreenMode)
+ {
+ iOldDisplayLocation.x = aX;
+ iOldDisplayLocation.y = aY;
+ return;
+ }
((AnimationPlayer)iPlayer).setDisplayLocation(aX, aY);
}
@@ -605,6 +620,16 @@
throw new IllegalArgumentException(
"Width and height must be positive");
}
+ //this function should not take effect, when the
+ if (iFullScreenMode)
+ {
+ // if video is playing in full screen mode, just store the size
+ // to changed in this variable, so that when full screen mode of videocontrol will exit
+ // we need to display the image size in this dimension
+ iOldDisplaySize.x = aWidth;
+ iOldDisplaySize.y = aHeight;
+ return;
+ }
// resize the all frames
((AnimationPlayer) iPlayer).updateImageData(aWidth, aHeight);
// Since the DisplaySize is being changed, we need to change the
@@ -650,23 +675,6 @@
}
/*******************************FOLLOWING FUNCTIONS ARE USED FOR INTERNAL PURPOSE***********************/
/**
- *
- * @return Display object retrieved from ESWT
- // */
-// Display getiDisplay()
-// {
-// return iDisplay;
-// }
-
- /**
- *
- * @return
- */
-// Control getControl()
-// {
-// return iControl;
-// }
- /**
* Function of ItemStateChangeListener
* Notified by LCDUI implementation
* @param ctrl
@@ -704,7 +712,7 @@
private Rectangle deviceDimension;
private Rectangle calculateFullScreenDimension()
{
- Point actualImageSize = ((AnimationPlayer)iPlayer).getImageDimension();
+ Point actualImageSize = ((AnimationPlayer)iPlayer).getSourceDimension();
// initialize the deviceDimension, in local variable
iDisplay.syncExec(new Runnable()
{
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/BaseDisplay.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/BaseDisplay.java Fri Jul 09 16:35:45 2010 +0300
@@ -28,9 +28,11 @@
{
// represents native side of display and initialized by derived class
protected int nativeDisplayHandle;
- protected org.eclipse.swt.widgets.Control eswtCanvasControl;
+ protected org.eclipse.swt.widgets.Control iControl;
private Rectangle rect;
private int[] rectDimension = new int[ 4 ];
+ protected boolean iseSWT;
+
public BaseDisplay()
{
rect = new Rectangle(0,0,0,0);
@@ -42,12 +44,20 @@
*/
public void GetCallbackInUiThread(int aPlaceHolder)
{
- Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"_+inside BaseDisplay : GetCallbackInUiThread");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"_+inside BaseDisplay : GetCallbackInUiThread ++");
final int val = aPlaceHolder;
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"_+inside BaseDisplay : GetCallbackInUiThread - aPlaceHolder = "+aPlaceHolder+"nativeDisplayHandle = "+nativeDisplayHandle);
try
{
- final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ org.eclipse.swt.widgets.Display disp = null;
+ if (iseSWT)
+ {
+ disp = org.eclipse.swt.widgets.Display.getDefault();
+ }
+ else
+ {
+ disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ }
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"_+inside BaseDisplay : GetCallbackInUiThread - got eswtdisplay");
disp.syncExec(new Runnable()
{
@@ -62,82 +72,112 @@
{
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : GetCallbackInUiThread....exception is " + e.toString());
}
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"_+inside BaseDisplay : GetCallbackInUiThread --");
}
public void setContentBound()
{
- System.out.println("inside BaseDisplay : setContentBound +");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : setContentBound +");
try
{
- final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ org.eclipse.swt.widgets.Display disp = null;
+ if (iseSWT)
+ {
+ disp = org.eclipse.swt.widgets.Display.getDefault();
+ }
+ else
+ {
+ disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ }
disp.syncExec(new Runnable()
{
public void run()
{
- eswtCanvasControl.setBounds(rect);
+ Rectangle arect = iControl.getBounds();
+ rect.x = rect.x + arect.x;
+ rect.y = rect.y + arect.y;
+ iControl.setBounds(rect);
}
});
}
catch (Exception e)
{
- System.out.println("inside BaseDisplay : setContentBound....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : setContentBound....exception is " + e.toString());
}
- System.out.println("inside BaseDisplay : setContentBound -");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : setContentBound -");
}
public void removeContentBound()
{
- System.out.println("inside BaseDisplay : removeContentBound +");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : removeContentBound +");
try
{
- final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ org.eclipse.swt.widgets.Display disp = null;
+ if (iseSWT)
+ {
+ disp = org.eclipse.swt.widgets.Display.getDefault();
+ }
+ else
+ {
+ disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ }
disp.syncExec(new Runnable()
{
public void run()
{
Rectangle emptyRect = new Rectangle(0,0,0,0);
- eswtCanvasControl.setBounds(emptyRect);
+ iControl.setBounds(emptyRect);
}
});
}
catch (Exception e)
{
- System.out.println("inside BaseDisplay : removeContentBound....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : removeContentBound....exception is " + e.toString());
}
- System.out.println("inside BaseDisplay : removeContentBound -");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : removeContentBound -");
}
public void redrawControl()
{
- System.out.println("inside BaseDisplay : redrawControl +");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : redrawControl +");
try
{
- final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ org.eclipse.swt.widgets.Display disp = null;
+ if (iseSWT)
+ {
+ disp = org.eclipse.swt.widgets.Display.getDefault();
+ }
+ else
+ {
+ disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ }
disp.syncExec(new Runnable()
{
public void run()
{
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : redrawControl before redraw");
// redraw entire bounds of receiver
- eswtCanvasControl.redraw();
+ iControl.redraw();
}
});
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : redrawControl after redraw");
}
catch (Exception e)
{
- System.out.println("inside BaseDisplay : redrawControl....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : redrawControl....exception is " + e.toString());
}
- System.out.println("inside BaseDisplay : redrawControl -");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : redrawControl -");
}
/* called from native to reset the java side rect
- Before the call of this function array is updated from native side
- which can be used to refresh the UI screen rect and/or
- set/remove bound rect
- */
+ Before the call of this function array is updated from native side
+ which can be used to refresh the UI screen rect and/or
+ set/remove bound rect
+ */
public void setRect()
{
@@ -146,10 +186,39 @@
rect.width = rectDimension[2];
rect.height = rectDimension[3];
- System.out.println("BaseDisplay : setRect rect is reset with values: x =" + rect.x +"y ="+ rect.y +"width ="+rect.width+"height = "+ rect.height);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"BaseDisplay : setRect rect is reset with values: x =" + rect.x +"y ="+ rect.y +"width ="+rect.width+"height = "+ rect.height);
}
+ public Rectangle getBounds()
+ {
+ try
+ {
+
+ org.eclipse.swt.widgets.Display disp = null;
+ if (iseSWT)
+ {
+ disp = org.eclipse.swt.widgets.Display.getDefault();
+ }
+ else
+ {
+ disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
+ }
+ disp.syncExec(new Runnable()
+ {
+ public void run()
+ {
+
+ rect = iControl.getBounds();
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo," " + e.toString());
+ }
+ return rect;
+ }
// abstract functions implemented by concrete class
protected abstract void setDisplaySize(int aWidth, int aHeight);
protected abstract void setDisplayFullScreen(final boolean aFullScreenMode);
@@ -162,7 +231,7 @@
protected abstract int getSourceWidth();
protected abstract int getSourceHeight();
protected abstract void getBoundRect();
- protected abstract void setWindowResources(VideoItem aVideoItem);
+ public abstract void setWindowResources(VideoItem aVideoItem);
protected abstract void setNativeHandle(int handle);
public abstract void setContainerVisibilityToNative(final boolean active);
// Native methods
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/ItemDisplay.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/ItemDisplay.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -36,12 +36,13 @@
{
private int iEventSourceHandle;
- private org.eclipse.swt.widgets.Control iEswtItemControl;
+
private MMAPIeSWTObserver iEswtObserver;
private int x;
private int y;
private int qwidgetHandle;
Rectangle iFormRect;
+ private boolean iQWidgetHandleSet = false;
// index 0 : x-coordinate of topleft corner of display
// index 1 : y-coordinate of topleft corner of display
@@ -65,7 +66,7 @@
iEswtObserver = new MMAPIeSWTObserver();
- //iEswtItemControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtControl(item);
+ //iControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtControl(item);
com.nokia.mj.impl.nokialcdui.LCDUIInvoker.setItemControlStateChangeListener((ItemControlStateChangeListener)this,(javax.microedition.lcdui.Item) aVideoItem);
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java - ");
@@ -74,9 +75,9 @@
private void addListeners()
{
- iEswtObserver.addControlListenerToControl(iEswtItemControl);
- iEswtObserver.addShellListenerToControl(iEswtItemControl);
- iEswtObserver.addDisposeListenerToControl(iEswtItemControl);
+ iEswtObserver.addControlListenerToControl(iControl);
+ iEswtObserver.addShellListenerToControl(iControl);
+ iEswtObserver.addDisposeListenerToControl(iControl);
}
public void setNativeHandle(int handle)
@@ -107,13 +108,13 @@
public void run()
{
org.eclipse.swt.graphics.Point size = new org.eclipse.swt.graphics.Point(width,height);
- iEswtItemControl.setSize(size);
+ iControl.setSize(size);
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setDisplaySize - ");
@@ -130,7 +131,7 @@
{
public void run()
{
- iEswtItemControl.setBounds(disp.getClientArea());
+ iControl.setBounds(disp.getClientArea());
new MobileShell(disp).setFullScreenMode(aFullScreenMode);
// instruct native to switch to full screen mode
_setFullScreenMode(nativeDisplayHandle,aFullScreenMode);
@@ -160,13 +161,13 @@
{
public void run()
{
- iEswtItemControl.setLocation(x , y);
+ iControl.setLocation(x , y);
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setDisplayLocation - ");
@@ -177,6 +178,9 @@
public void setVisible(boolean aVisible)
{
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setVisible + ");
+ // call native side to set the visibiity
+ _setVisible(nativeDisplayHandle,aVisible);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setVisible after _setVisible ");
try
{
final boolean visible = aVisible;
@@ -185,15 +189,16 @@
{
public void run()
{
- // iEswtItemControl.setVisible(visible);
- // call native side to set the visibiity
- _setVisible(nativeDisplayHandle,visible);
+
+
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"before calling iControl.setVisible");
+ iControl.setVisible(visible);
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setVisible - ");
@@ -211,13 +216,13 @@
public void run()
{
- y = iEswtItemControl.getSize().y;
+ y = iControl.getSize().y;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: getDisplayHeight - ");
@@ -235,14 +240,14 @@
{
public void run()
{
- x = iEswtItemControl.getSize().x;
+ x = iControl.getSize().x;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: getDisplayWidth - ");
@@ -259,14 +264,14 @@
{
public void run()
{
- x = iEswtItemControl.getLocation().x;
+ x = iControl.getLocation().x;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: getDisplayX - ");
@@ -286,14 +291,14 @@
{
public void run()
{
- y = iEswtItemControl.getLocation().y;
+ y = iControl.getLocation().y;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: getDisplayY - ");
@@ -326,13 +331,13 @@
{
public void run()
{
- Rectangle boundrect = iEswtItemControl.getBounds();
+ Rectangle boundrect = iControl.getBounds();
displayboundarr[0] = boundrect.x ;
displayboundarr[1] = boundrect.y ;
displayboundarr[2] = boundrect.width ;
displayboundarr[3] = boundrect.height ;
- Shell shell = iEswtItemControl.getShell();
+ Shell shell = iControl.getShell();
iFormRect = shell.getBounds();
@@ -348,7 +353,7 @@
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java :getBoundRect() x =" + displayboundarr[0] + "y ="+ displayboundarr[1] +"width ="+ displayboundarr[2] +"height =" + displayboundarr[3]);
@@ -373,6 +378,8 @@
public void setWindowResources(VideoItem aVideoItem)
{
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setWindowResources windowHandle ");
+
+ iQWidgetHandleSet = true;
if (aVideoItem == null)
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setWindowResources aVideoItem is null");
// set the item size to be that of the video size if the video size is known.
@@ -382,9 +389,9 @@
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: after setting the size of item to source size ");
- if (iEswtItemControl == null)
+ if (iControl == null)
{
- Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"+ItemDisplay() - iEswtItemControl is null");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"+ItemDisplay() - iControl is null");
}
try
{
@@ -394,10 +401,10 @@
{
public void run()
{
- Shell shell = iEswtItemControl.getShell();
+ Shell shell = iControl.getShell();
qwidgetHandle = Internal_PackageSupport.topHandle(shell);
- x = iEswtItemControl.getSize().x;
- y = iEswtItemControl.getSize().y;
+ x = iControl.getSize().x;
+ y = iControl.getSize().y;
_setWindowToNative(nativeDisplayHandle,qwidgetHandle);
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setWindowResources qwidgetHandle is " + qwidgetHandle);
}
@@ -405,7 +412,7 @@
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
e.printStackTrace();
}
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java: setWindowResources qwidgetHandle(x,y) " +x+"," +y);
@@ -440,12 +447,15 @@
public void notifyControlAvailable(org.eclipse.swt.widgets.Control ctrl,Item item)
{
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java : notifyControlAvailable + ");
- iEswtItemControl = ctrl;
+ iControl = ctrl;
/* now use the control and addobserver to the control
and setwindowresources
*/
- NativeResources nativeres = new NativeResources(this,iVideoItem);
- nativeres.start();
+ if (iQWidgetHandleSet == false)
+ {
+ NativeResources nativeres = new NativeResources(this,iVideoItem);
+ nativeres.start();
+ }
Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ItemDisplay.java : notifyControlAvailable - ");
}
@@ -472,8 +482,8 @@
final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
disp.syncExec(new Runnable() {
public void run() {
- x = iEswtItemControl.getSize().x;
- y = iEswtItemControl.getSize().y;
+ x = iControl.getSize().x;
+ y = iControl.getSize().y;
}
});
--- a/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMACanvasDisplay.java Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMACanvasDisplay.java Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -24,7 +24,7 @@
import org.eclipse.ercp.swt.mobile.MobileShell;
import org.eclipse.swt.graphics.Rectangle;
import com.nokia.microedition.media.control.VideoItem;
-
+import com.nokia.mj.impl.utils.Logger;
public class MMACanvasDisplay extends BaseDisplay
@@ -51,20 +51,20 @@
{
iEventSourceHandle = aEventSourceHandle;
eswtObserver = new MMAPIeSWTObserver();
- eswtCanvasControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtControl(canvas);
+ iControl = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtControl(canvas);
//super.setESWTControl(eswtCanvasControl);
}
private void addListeners()
{
- eswtObserver.addControlListenerToControl(eswtCanvasControl);
- eswtObserver.addShellListenerToControl(eswtCanvasControl);
- eswtObserver.addDisposeListenerToControl(eswtCanvasControl);
+ eswtObserver.addControlListenerToControl(iControl);
+ eswtObserver.addShellListenerToControl(iControl);
+ eswtObserver.addDisposeListenerToControl(iControl);
}
public void setNativeHandle(int handle)
{
- System.out.println("MMACanvasDisplay.java : setNativeHandle :" + handle);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java : setNativeHandle :" + handle);
nativeDisplayHandle = handle;
eswtObserver.setDisplayToObserver(this);
addListeners();
@@ -82,24 +82,24 @@
public void run()
{
org.eclipse.swt.graphics.Point size = new org.eclipse.swt.graphics.Point(width,height);
- eswtCanvasControl.redraw();
+ iControl.redraw();
- System.out.println("inside videoControl's setDisplaySize redraw called");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize redraw called");
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
- System.out.println("inside videoControl's setDisplaySize +");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize +");
_setDisplaySize(nativeDisplayHandle,
iEventSourceHandle,
aWidth,
aHeight);
- System.out.println("inside videoControl's setDisplaySize -");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize -");
}
public void setDisplayFullScreen(final boolean aFullScreenMode)
@@ -112,16 +112,16 @@
{
public void run()
{
- eswtCanvasControl.setBounds(disp.getClientArea());
- new MobileShell(disp).setFullScreenMode(aFullScreenMode);
+ iControl.setBounds(disp.getClientArea());
+ //new MobileShell(disp).setFullScreenMode(aFullScreenMode);
// instruct native to switch to full screen mode
- _setFullScreenMode(nativeDisplayHandle,aFullScreenMode);
+ //_setFullScreenMode(nativeDisplayHandle,aFullScreenMode);
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
}
@@ -139,7 +139,7 @@
{
public void run()
{
- org.eclipse.swt.graphics.Point topleftposition = eswtCanvasControl.getLocation();
+ org.eclipse.swt.graphics.Point topleftposition = iControl.getLocation();
eSWTcontrolLocationX = topleftposition.x;
eSWTcontrolLocationY = topleftposition.y;
@@ -148,17 +148,17 @@
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
// To Avoid UI thread block
- System.out.println("inside videoControl's setDisplaySize before calling _setPosition ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize before calling _setPosition ");
_setPosition(nativeDisplayHandle,
iEventSourceHandle,
eSWTcontrolLocationX,
eSWTcontrolLocationY,
videoControlLocationX,
videoControlLocationY);
- System.out.println("inside videoControl's setDisplaySize after calling _setPosition ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize after calling _setPosition ");
try
{
@@ -167,19 +167,19 @@
{
public void run()
{
- System.out.println("inside videoControl's setDisplaySize before redraw() ");
- eswtCanvasControl.redraw();
- System.out.println("inside videoControl's setDisplaySize after redraw() ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize before redraw() ");
+ iControl.redraw();
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize after redraw() ");
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplayLocation in redraw()....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplayLocation in redraw()....exception is " + e.toString());
}
- System.out.println("inside videoControl's setDisplayLocation coming out of setDisplayLocation()");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplayLocation coming out of setDisplayLocation()");
}
@@ -201,7 +201,7 @@
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
//System.out.println("inside videoControl's setVisible before native call");
// _setVisible(nativeDisplayHandle,aVisible);
@@ -220,13 +220,13 @@
public void run()
{
- y = eswtCanvasControl.getSize().y;
+ y = iControl.getSize().y;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
return y;
@@ -241,14 +241,14 @@
{
public void run()
{
- x = eswtCanvasControl.getSize().x;
+ x = iControl.getSize().x;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
return x;
@@ -263,14 +263,14 @@
{
public void run()
{
- x = eswtCanvasControl.getLocation().x;
+ x = iControl.getLocation().x;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
return x;
@@ -288,14 +288,14 @@
{
public void run()
{
- y = eswtCanvasControl.getLocation().y;
+ y = iControl.getLocation().y;
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
return y;
}
@@ -317,7 +317,7 @@
public void getBoundRect()
{
- System.out.println("MMACanvasDisplay.java :getBoundRect()");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java :getBoundRect()");
try
{
@@ -326,7 +326,7 @@
{
public void run()
{
- Rectangle boundrect = eswtCanvasControl.getBounds();
+ Rectangle boundrect = iControl.getBounds();
displayboundarr[0] = boundrect.x ;
displayboundarr[1] = boundrect.y ;
displayboundarr[2] = boundrect.width ;
@@ -337,9 +337,9 @@
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
- System.out.println("MMACanvasDisplay.java :getBoundRect() x =" + displayboundarr[0] + "y ="+ displayboundarr[1] +"width ="+ displayboundarr[2] +"height =" + displayboundarr[3]);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java :getBoundRect() x =" + displayboundarr[0] + "y ="+ displayboundarr[1] +"width ="+ displayboundarr[2] +"height =" + displayboundarr[3]);
}
@@ -353,22 +353,22 @@
public void setContainerVisibilityToNative(final boolean active)
{
- System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative + ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java : SetContainerVisibilityToNative + ");
new Thread()
{
public void run()
{
- System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative execute the native function in new thread ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java : SetContainerVisibilityToNative execute the native function in new thread ");
_setContainerVisible(iEventSourceHandle,nativeDisplayHandle,active);
}
} .start();
- System.out.println("MMACanvasDisplay.java : SetContainerVisibilityToNative - ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java : SetContainerVisibilityToNative - ");
}
public void setWindowResources(VideoItem aVideoItem)
{
- System.out.println("MMACanvasDisplay.java: setWindowResources windowHandle ");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java: setWindowResources windowHandle ");
try
{
final org.eclipse.swt.widgets.Display disp = com.nokia.mj.impl.nokialcdui.LCDUIInvoker.getEswtDisplay();
@@ -377,18 +377,18 @@
{
public void run()
{
- Shell shell = eswtCanvasControl.getShell();
+ Shell shell = iControl.getShell();
qwidgetHandle = Internal_PackageSupport.topHandle(shell);
- x = eswtCanvasControl.getSize().x;
- y = eswtCanvasControl.getSize().y;
+ x = iControl.getSize().x;
+ y = iControl.getSize().y;
_setWindowToNative(nativeDisplayHandle,qwidgetHandle);
- System.out.println("MMACanvasDisplay.java: setWindowResources qwidgetHandle is " + qwidgetHandle);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java: setWindowResources qwidgetHandle is " + qwidgetHandle);
}
});
}
catch (Exception e)
{
- System.out.println("inside videoControl's setDisplaySize....exception is " + e.toString());
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
}
_setNativeWindowSize(nativeDisplayHandle,iEventSourceHandle,x,y);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_qt/baseline/javasrc/com/nokia/microedition/media/control/MMAeSWTDisplay.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,455 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.microedition.media.control;
+
+import org.eclipse.ercp.swt.mobile.MobileShell;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Internal_PackageSupport;
+import org.eclipse.swt.widgets.Shell;
+import com.nokia.mj.impl.utils.Logger;
+
+public class MMAeSWTDisplay extends BaseDisplay
+{
+ private int iEventSourceHandle;
+ private int qwidgetHandle;
+ private int x;
+ private int y;
+ private int eSWTcontrolLocationX;
+ private int eSWTcontrolLocationY;
+
+ // index 0 : x-coordinate of topleft corner of display
+ // index 1 : y-coordinate of topleft corner of display
+ // index 3 : width of display
+ // index 4 : height of display
+
+ private int[] displayboundarr = new int[ 4 ];
+
+ //private org.eclipse.swt.widgets.Control iControl;
+ private MMAPIeSWTObserver eswtObserver;
+
+ public MMAeSWTDisplay(int aEventServerHandle, org.eclipse.swt.widgets.Control aControl)
+ {
+ iEventSourceHandle = aEventServerHandle;
+ iControl = aControl;
+ eswtObserver = new MMAPIeSWTObserver();
+ iseSWT = true;
+ }
+
+ private void addListeners()
+ {
+ eswtObserver.addControlListenerToControl(iControl);
+ eswtObserver.addShellListenerToControl(iControl);
+ eswtObserver.addDisposeListenerToControl(iControl);
+ }
+
+ /**
+ * Inherited from BaseDisplay.
+ */
+ /*public void GetCallbackInUiThread(int placeholder)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : GetCallbackInUiThread +");
+ final int val = placeholder;
+ try{
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: BaseDisplay.java: GetCallbackInUiThread(): before Display.getDefault()");
+ final org.eclipse.swt.widgets.Display disp = org.eclipse.swt.widgets.Display.getDefault();
+ if(disp == null)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: BaseDisplay.java: GetCallbackInUiThread(): disp is null");
+ }
+ disp.syncExec(new Runnable() {
+ public void run() {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: BaseDisplay.java: GetCallbackInUiThread(): Before native call");
+ _nativeMethodCallInUiThread(nativeDisplayHandle , val);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: BaseDisplay.java: GetCallbackInUiThread(): After native call");
+ }
+ });
+ }
+ catch(Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : GetCallbackInUiThread....exception is " + e.toString());
+ }
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside BaseDisplay : GetCallbackInUiThread -");
+ }*/
+
+ public void setNativeHandle(int handle)
+ {
+ nativeDisplayHandle = handle;
+ //eswtObserver.setDisplayToObserver(this);
+ //addListeners();
+ }
+
+ public void getBoundRect()
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java :getBoundRect()");
+
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ Rectangle boundrect = iControl.getBounds();
+ displayboundarr[0] = boundrect.x ;
+ displayboundarr[1] = boundrect.y ;
+ displayboundarr[2] = boundrect.width ;
+ displayboundarr[3] = boundrect.height ;
+
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside videoControl's setDisplaySize....exception is " + e.toString());
+ }
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMACanvasDisplay.java :getBoundRect() x =" + displayboundarr[0] + "y ="+ displayboundarr[1] +"width ="+ displayboundarr[2] +"height =" + displayboundarr[3]);
+ }
+
+ public int getDisplayHeight()
+ {
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ y = iControl.getSize().y;
+
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: getDisplayHeight() ....exception is "
+ + e.toString());
+ }
+
+ return y;
+ }
+
+ public int getDisplayWidth()
+ {
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+
+ display.syncExec(new Runnable()
+ {
+
+ public void run()
+ {
+ x = iControl.getSize().x;
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: getDisplayWidth() ....exception is "
+ + e.toString());
+ }
+ return x;
+ }
+
+ public int getDisplayX()
+ {
+
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ x = iControl.getLocation().x;
+
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside MMAeSWTDisplay.java's getDisplayX....exception is " + e.toString());
+ }
+ return x;
+ }
+
+ protected int getDisplayY()
+ {
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ y = iControl.getLocation().y;
+
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside MMAeSWTDisplay.java's getDisplayY....exception is " + e.toString());
+ }
+ return y;
+ }
+
+ public int getSourceHeight()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public int getSourceWidth()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public void setDisplayFullScreen(final boolean aFullScreenMode)
+ {
+ try
+ {
+
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+
+ //display.syncExec(new Runnable() {
+ //public void run() {
+ iControl.setBounds(display.getClientArea());
+ System.out.println("enetr in to the full screen mode setDisplayFullScreen %d"+iControl.getBounds());
+// new MobileShell(display).setFullScreenMode(aFullScreenMode);
+ //((MobileShell)iControl.getShell()).setFullScreenMode(aFullScreenMode);
+ // new Shell(display).setFullScreenMode(aFullScreenMode);
+ //((Shell)iControl.getShell()).setFullScreenMode(aFullScreenMode);
+ //TODO
+ // instruct native to switch to full screen mode
+ //_setFullScreenMode(nativeDisplayHandle, aFullScreenMode);
+ //}
+ //});
+ }
+ catch (Exception e)
+ {
+ System.out
+ .println("inside MMAeSWTDisplay.java: setDisplayFullScreen....exception is "
+ + e.toString());
+ e.printStackTrace();
+ }
+
+
+ }
+
+ public void setDisplayLocation(int aX, int aY)
+ {
+
+ //Not required for eSWT since this function does not work for USE_GUI_PRIMITIVE
+
+ //Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setDisplayLocation() +");
+ //final int videoControlLocationX = aX;
+ //final int videoControlLocationY = aY;
+
+ //try {
+ // final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ // display.syncExec(new Runnable() {
+ // public void run() {
+ /// org.eclipse.swt.graphics.Point topleftposition = iControl
+ // .getLocation();
+ // eSWTcontrolLocationX = topleftposition.x;
+ // eSWTcontrolLocationY = topleftposition.y;
+ // Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setDisplayLocation(): eSWTcontrolLocationX="+eSWTcontrolLocationX +
+ // " eSWTcontrolLocationY=" + eSWTcontrolLocationY);
+ // }
+ //});
+ //} catch (Exception e) {
+ // System..println("inside MMAeSWTDisplay's setDisplayLocation....exception is "
+ //+ e.toString());
+ //}
+ // To Avoid UI thread block
+ //System.out
+ // .println("inside MMAeSWTDisplay's setDisplayLocation before calling _setPosition ");
+ //_setPosition(nativeDisplayHandle, iEventSourceHandle,
+ // eSWTcontrolLocationX, eSWTcontrolLocationY,
+ // videoControlLocationX, videoControlLocationY);
+ //System.out
+ //.println("inside MMAeSWTDisplay's setDisplayLocation after calling _setPosition ");
+
+ //try {
+ // final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ // display.syncExec(new Runnable() {
+ // public void run() {
+ // //System.out
+ //.println("inside MMAeSWTDisplay's setDisplayLocation before redraw() ");
+ //iControl.redraw();
+ // System.out
+ //.println("inside MMAeSWTDisplay's setDisplayLocation after redraw() ");
+ // }
+ // });
+ //} catch (Exception e) {
+ //System.out
+ //.println("inside MMAeSWTDisplay's setDisplayLocation in redraw()....exception is "
+ //+ e.toString());
+ // }
+
+ //Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setDisplayLocation() -");
+
+
+
+ }
+
+ public void setDisplaySize(int aWidth, int aHeight)
+ {
+ final int width = aWidth;
+ final int height = aHeight;
+ try
+ {
+ final org.eclipse.swt.widgets.Display disp = org.eclipse.swt.widgets.Display.getDefault();
+
+ //disp.syncExec(new Runnable() {
+ // public void run() {
+ org.eclipse.swt.graphics.Point size = new org.eclipse.swt.graphics.Point(
+ width, height);
+ //eswtCanvasControl.setSize(size);
+ iControl.setSize(size);
+ iControl.redraw();
+
+ System.out
+ .println("inside MMAeSWTDisplay.java's setDisplaySize redraw called");
+ //}
+ //});
+ }
+ catch (Exception e)
+ {
+ System.out
+ .println("inside MMAeSWTDisplay.java's setDisplaySize....exception is "
+ + e.toString());
+ }
+
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside MMAeSWTDisplay.java's setDisplaySize");
+ //_setDisplaySize(nativeDisplayHandle, iEventSourceHandle, aWidth,
+ // aHeight);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside MMAeSWTDisplay.java's setDisplaySize -");
+
+ }
+
+
+
+ public void setVisible(boolean aVisible)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setVisible() + " + aVisible);
+ try
+ {
+ final boolean visible = aVisible;
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ display.asyncExec(new Runnable()
+ {
+ public void run()
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setVisible() inside asyncExec run()");
+ //eswtCanvasControl.setVisible(visible);
+ // call native side to set the visibiity
+ _setVisible(nativeDisplayHandle, visible);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: _setVisible() native call completed");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ System.out
+ .println("MMAPI: MMAeSWTDisplay.java: setVisible() ....exception is "
+ + e.toString());
+ }
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setVisible() -");
+ }
+
+ public void setWindowResources(VideoItem aVideoItem)
+ {
+
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAeSWTDisplay.java: setWindowResources windowHandle + " + Thread.currentThread().getName());
+ try
+ {
+ final org.eclipse.swt.widgets.Display display = org.eclipse.swt.widgets.Display.getDefault();
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAeSWTDisplay.java: setWindowResources() run() runnable = " + this.hashCode());
+ Shell shell = iControl.getShell();
+ qwidgetHandle = Internal_PackageSupport.topHandle(shell);
+ x = iControl.getSize().x;
+ y = iControl.getSize().y;
+ _setWindowToNative(nativeDisplayHandle, qwidgetHandle);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setWindowResources(): calling _setNativeWindowSize() + " + Thread.currentThread().getName());
+ _setNativeWindowSize(nativeDisplayHandle, iEventSourceHandle, x, y);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAeSWTDisplay.java: setWindowResources last statement of syncExec");
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"inside MMAeSWTDisplay.java's setWindowResources() ....exception is "
+ + e.toString());
+ }
+ //Removed from here and added to syncexec above, since setWindowResources is called from new Thread this
+ //function is no longer in UI THREAD.
+
+ //Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setWindowResources(): calling _setNativeWindowSize() + " + Thread.currentThread().getName() );
+ //_setNativeWindowSize(nativeDisplayHandle, iEventSourceHandle, x, y);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: setWindowResources() - ");
+ }
+
+ public void getCallbackSourceSizeChanged(int width, int height)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: getCallbackSourceSizeChanged() +");
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: getCallbackSourceSizeChanged() width = " + width + " height = " + height);
+ iControl.setSize(width, height);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: MMAeSWTDisplay.java: getCallbackSourceSizeChanged() +");
+ }
+
+ public void setContainerVisibilityToNative(boolean active)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ private native void _setVisible(int nativeDisplayHandle, boolean value);
+
+ private native void _setContainerVisible(int nativeDisplayHandle,
+ boolean value);
+
+ private native void _setFullScreenMode(int nativeDisplayHandle,
+ boolean value);
+
+ private native void _setWindowToNative(int nativeDisplayHandle,
+ int qwidgetHandle);
+
+ private native void _setNativeWindowSize(int nativeDisplayHandle,
+ int iEventSourceHandle, int width, int height);
+
+ private native void _setPosition(int nativeDisplayHandle,
+ int iEventSourceHandle, int uiControlLocationX,
+ int uiControlLocationY, int videoControlLocationX,
+ int videoControlLocationY);
+
+ private native void _setDisplaySize(int nativeDisplayHandle,
+ int iEventSourceHandle, int eSWTcontrolLocationX,
+ int eSWTcontrolLocationY);
+
+
+
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_qt/baseline/javasrc/org/eclipse/swt/widgets/ESWTProxyControl.java Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,436 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package org.eclipse.swt.widgets;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.MouseMoveListener;
+import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.Shell;
+import com.nokia.mj.impl.utils.Logger;
+
+import com.nokia.microedition.media.control.BaseDisplay;
+
+
+public class ESWTProxyControl extends Control
+{
+ /**
+ * this will be actual Shell, for which this class is acting like proxy
+ */
+ Control iControl;
+ BaseDisplay mmaDisplay;
+ private int iNativeDisplayHandle;
+
+ public ESWTProxyControl()
+ {
+ //super(Display.getDefault().getActiveShell(), SWT.BORDER);
+ }
+
+ public void setNativeDisplayHandle(int aNativeDisplayHandle)
+ {
+ this.iNativeDisplayHandle = aNativeDisplayHandle;
+ }
+ public void seteSWTDisplay(BaseDisplay aDisplay)
+ {
+ this.mmaDisplay = aDisplay;
+ }
+
+ /**
+ * Actual Control will be created here
+ */
+ public boolean setParent(Composite parent)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: setParent()+");
+ int sourceWidth=0;
+ int sourceHeight=0;
+ //TODO Throw exception if null
+ if (parent == null)
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: setParent(): parent is null");
+ iControl= new Shell((Shell)parent);
+ int sourceSize[] = _getSourceSize(iNativeDisplayHandle);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: setParent(): int[] length: " + sourceSize.length);
+
+ sourceWidth = sourceSize[0];
+ sourceHeight = sourceSize[1];
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: setParent(): sourceWidth= " + sourceWidth + " sourceHeight= " + sourceHeight);
+
+ ((Shell)iControl).open();
+ ((Shell)iControl).setSize(sourceWidth, sourceHeight);
+
+ new Thread(new Runnable()
+ {
+ public void run()
+ {
+ mmaDisplay.setWindowResources(null);
+ }
+ }).start();
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public void addControlListener(ControlListener aListener)
+ {
+ if (iControl!=null)
+ {
+ iControl.addControlListener(aListener);
+ }
+ }
+ /**
+ *
+ */
+ public void addFocusListener(FocusListener listener)
+ {
+ if (iControl!=null)iControl.addFocusListener(listener);
+ }
+ /**
+ *
+ */
+ public void addKeyListener(KeyListener listener)
+ {
+ if (iControl!=null)iControl.addKeyListener(listener);
+ }
+ public void addMouseListener(MouseListener listener)
+ {
+ if (iControl!=null)iControl.addMouseListener(listener);
+ }
+ public void addMouseMoveListener(MouseMoveListener listener)
+ {
+ if (iControl!=null)iControl.addMouseMoveListener(listener);
+ }
+ /**
+ *
+ */
+ public void addPaintListener(PaintListener aListener)
+ {
+ if (iControl!=null)iControl.addPaintListener(aListener);
+
+ }
+
+ public void addTraverseListener(TraverseListener listener)
+ {
+ if (iControl!=null)iControl.addTraverseListener(listener);
+ }
+ public Point computeSize(int wHint,
+ int hHint)
+ {
+ Point point=null;
+ if (iControl!=null)point=iControl.computeSize(wHint, hHint);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ProxyControl::computeSize()"+point);
+ return point;
+ }
+
+ public Point computeSize(int wHint,
+ int hHint,
+ boolean changed)
+ {
+ Point point=null;
+ if (iControl!=null)point=iControl.computeSize(wHint, hHint,changed);
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ProxyControl::computeSize()"+point+"Bolean changed "+changed);
+ return point;
+ }
+
+ public Color getBackground()
+ {
+ Color color=null;
+ if (iControl!=null)color=iControl.getBackground();
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"ProxyControl::getBackground()");
+ return color;
+ }
+ public int getBorderWidth()
+ {
+ if (iControl!=null)return iControl.getBorderWidth();
+ else return 0;
+ }
+ public Rectangle getBounds()
+ {
+ if (iControl!=null) return iControl.getBounds();
+ else return null;
+ }
+ public boolean getEnabled()
+ {
+ if (iControl!=null) return iControl.getEnabled();
+ else return false;
+ }
+ public Font getFont()
+ {
+ if (iControl!=null)return iControl.getFont();
+ else return null;
+ }
+ public Color getForeground()
+ {
+ if (iControl!=null) return iControl.getForeground();
+ else return null;
+ }
+
+ public java.lang.Object getLayoutData()
+ {
+ if (iControl!=null) return iControl.getLayoutData();
+ else return null;
+ }
+
+ public Point getLocation()
+ {
+ if (iControl!=null) return iControl.getLocation();
+ else return null;
+ }
+
+ public Menu getMenu()
+ {
+ if (iControl!=null) return iControl.getMenu();
+ else return null;
+ }
+ public Composite getParent()
+ {
+ if (iControl!=null) return iControl.getParent();
+ else return null;
+ }
+ public Shell getShell()
+ {
+ if (iControl!=null)
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: getShell(): iControl is not null");
+ return (Shell)iControl;//.getShell();
+ }
+ else
+ {
+ Logger.LOG(Logger.EJavaMMAPI,Logger.EInfo,"MMAPI: ESWTProxyControl.java: getShell(): iControl is null");
+ return null;
+ }
+ }
+ public Point getSize()
+ {
+ if (iControl!=null) return iControl.getSize();
+ else return null;
+ }
+
+ public java.lang.String getToolTipText()
+ {
+ if (iControl!=null) return iControl.getToolTipText();
+ else return null;
+ }
+ public boolean getVisible()
+ {
+ if (iControl!=null) return iControl.getVisible();
+ else return false;
+ }
+ public boolean isEnabled()
+ {
+ if (iControl!=null) return iControl.isEnabled();
+ else return false;
+ }
+
+ public boolean isFocusControl()
+ {
+ if (iControl!=null) return iControl.isFocusControl();
+ else return false;
+ }
+ public boolean isReparentable()
+ {
+ if (iControl!=null) return iControl.isReparentable();
+ else return false;
+ }
+
+ public boolean isVisible()
+ {
+ if (iControl!=null)return iControl.isVisible();
+ else return false;
+ }
+ public void moveAbove(Control control)
+ {
+ if (iControl!=null) iControl.moveAbove(control);
+ }
+ public void moveBelow(Control control)
+ {
+ if (iControl!=null) iControl.moveBelow(control);
+ }
+ public void pack()
+ {
+ if (iControl!=null) iControl.pack();
+ }
+ public void pack(boolean changed)
+ {
+ if (iControl!=null) iControl.pack(changed);
+ }
+ public void redraw()
+ {
+ if (iControl!=null) iControl.redraw();
+ }
+ public void redraw(int x,
+ int y,
+ int width,
+ int height,
+ boolean all)
+ {
+ if (iControl!=null) iControl.redraw(x,y,width,height, all);
+ }
+ public void removeControlListener(ControlListener listener)
+ {
+ if (iControl!=null) iControl.removeControlListener(listener);
+ }
+ public void removeFocusListener(FocusListener listener)
+ {
+ if (iControl!=null) iControl.removeFocusListener(listener);
+ }
+ public void removeMouseListener(MouseListener listener)
+ {
+ if (iControl!=null) iControl.removeMouseListener(listener);
+ }
+ public void removeMouseMoveListener(MouseMoveListener listener)
+ {
+ if (iControl!=null) iControl.removeMouseMoveListener(listener);
+ }
+ public void removePaintListener(PaintListener listener)
+ {
+ if (iControl!=null)iControl.removePaintListener(listener);
+ }
+ public void removeTraverseListener(TraverseListener listener)
+ {
+ if (iControl!=null)iControl.removeTraverseListener(listener);
+ }
+ public void setBounds(int x,
+ int y,
+ int width,
+ int height)
+ {
+ if (iControl!=null)iControl.setBounds(x, y, width, height);
+ }
+ public void setBounds(Rectangle rect)
+ {
+ if (iControl!=null)iControl.setBounds(rect);
+ }
+ public void setCapture(boolean capture)
+ {
+ if (iControl!=null)iControl.setCapture(capture);
+ }
+ public void setEnabled(boolean enabled)
+ {
+ if (iControl!=null)iControl.setEnabled(enabled);
+ }
+ public boolean setFocus()
+ {
+ if (iControl!=null) return iControl.setFocus();
+ else return false;
+ }
+ public void setFont(Font font)
+ {
+ if (iControl!=null)iControl.setFont(font);
+ }
+ public void setForeground(Color color)
+ {
+ if (iControl!=null)iControl.setForeground(color);
+ }
+ public void setLayoutData(java.lang.Object layoutData)
+ {
+ if (iControl!=null)iControl.setLayoutData(layoutData);
+ }
+ public void setLocation(int x,
+ int y)
+ {
+ if (iControl!=null)iControl.setLocation(x, y);
+ }
+
+ public void setLocation(Point location)
+ {
+ if (iControl!=null)iControl.setLocation(location);
+ }
+ public void setMenu(Menu menu)
+ {
+ if (iControl!=null)iControl.setMenu(menu);
+ }
+ public void setRedraw(boolean redraw)
+ {
+ if (iControl!=null)iControl.setRedraw(redraw);
+ }
+ public void setSize(int width,
+ int height)
+ {
+ if (iControl!=null) iControl.setSize(width, height);
+ }
+
+ public void setSize(Point size)
+ {
+ if (iControl!=null) iControl.setSize(size);
+ }
+ public void setToolTipText(java.lang.String string)
+ {
+ if (iControl!=null)iControl.setToolTipText(string);
+ }
+ public void setVisible(boolean visible)
+ {
+ if (iControl!=null)iControl.setVisible(visible);
+ }
+ public Point toControl(int x,
+ int y)
+ {
+ if (iControl!=null)return iControl.toControl(x, y);
+ else return null;
+ }
+ public Point toControl(Point point)
+ {
+ if (iControl!=null) return iControl.toControl(point);
+ else return null;
+ }
+ public Point toDisplay(int x,
+ int y)
+ {
+ if (iControl!=null)return iControl.toDisplay(x,y);
+ else return null;
+ }
+ public Point toDisplay(Point point)
+ {
+ if (iControl!=null)return iControl.toDisplay(point);
+ else return null;
+ }
+ public boolean traverse(int traversal)
+ {
+ if (iControl!=null)return iControl.traverse(traversal);
+ else return false;
+ }
+ public void update()
+ {
+ if (iControl!=null)iControl.update();
+ }
+
+ public void checkSubclass()
+ {
+ // do nothing,sub-classing allowed
+ }
+
+ protected void internal_createHandle()
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ private native int[] _getSourceSize(int aNativeDisplayHandle);
+}
--- a/javauis/mmapi_qt/baseline/src/cmmaitemdisplay.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/baseline/src/cmmaitemdisplay.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -29,7 +29,7 @@
{
CMMAItemDisplay* self = new(ELeave) CMMAItemDisplay();
CleanupStack::PushL(self);
- self->Construct(aEventSource, aItemDispObj);
+ self->Construct(aEventSource, NULL, aItemDispObj);
return self;
}
@@ -111,45 +111,7 @@
return TPoint(0, 0);
}
-/*
-void CMMAItemDisplay::SourceSizeChanged(const TSize& aSourceSize)
-{
- LOG1(EJavaMMAPI,EInfo,"MMA::CMMAItemDisplay::SourceSizeChanged %d",
- aSourceSize.iWidth);
- LOG1(EJavaMMAPI,EInfo,"MMA::CMMAItemDisplay::SourceSizeChanged %d",
- aSourceSize.iHeight);
- #ifdef RD_JAVA_NGA_ENABLED
- if ( iWindow )
- {
- iWindow->SetVideoCropRegion( TRect( iUserRect.iTl, aSourceSize ) );
- }
- #endif
-
- iSourceSize = aSourceSize;
-
- if (iWindow)
- {
- TRect clientRect(iUserRect.iTl, aSourceSize);
-
- iWindow->SetDrawRect(clientRect);
- // Setting initial window size if not already set, actual size will
- // be set in MdcItemContentRectChanged()
- if (iWindow->WindowSize() == TSize())
- {
- iWindow->SetWindowRect(clientRect, MMMADisplay::EMmaThread);
- }
- }
-
- SetClippingRegion();
-
- if (iUserRect.IsEmpty())
- {
- // Java side hasn't set size.
- iUserRect.SetSize(iSourceSize);
- }
-}
-*/
void CMMAItemDisplay:: SourceSizeChanged(TInt aJavaControlWidth, TInt aJavaControlHeight,TInt x, TInt y,TRect aBoundsRect)
@@ -282,6 +244,7 @@
SetClippingRegion();
+ /*
if (iUserRect.IsEmpty())
{
// Java side hasn't set size.
@@ -292,6 +255,13 @@
// Addjusting rect to top left corner.
iUserRect = TRect(iUserRect.Size());
//}
+ }*/
+ if (iUserRect.IsEmpty())
+ {
+ // Java side hasn't set size.
+ LOG1(EJavaMMAPI,EInfo,"CMMAItemDisplay::SourceSizeChanged()iUserRect is set to source size iSourceSize - %d",iSourceSize.iHeight);
+ iUserRect.SetSize(iSourceSize);
+ LOG1(EJavaMMAPI,EInfo,"CMMAItemDisplay::SourceSizeChanged()iUserRect is set to source size iUserRect - %d",iUserRect.Size().iHeight);
}
LOG(EJavaMMAPI,EInfo,"CMMAItemDisplay::SourceSizeChanged(aJavaControlWidth,aJavaControlHeight)-");
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_qt/baseline/src/eswtdisplay.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,147 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include "com_nokia_microedition_media_control_MMAeSWTDisplay.h"
+#include "logger.h"
+#include "qwidget.h"
+#include "cmmadcdisplay.h"
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setVisible
+(JNIEnv *, jobject, jint nativeDisplayHandle, jboolean isVisible)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setVisible +");
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TBool visible = (TBool)isVisible;
+ display ->SetVisible(visible);
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setVisible -");
+}
+
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setContainerVisible
+(JNIEnv *, jobject, jint /*nativeDisplayHandle*/, jboolean /*isActive*/)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setContainerVisible +");
+ /* CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TBool visible = (TBool)isActive;
+ display ->SetContainerVisibility(visible);*/
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setContainerVisible -");
+}
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setFullScreenMode
+(JNIEnv *, jobject, jint nativeDisplayHandle, jboolean isFullScreen)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setFullScreenMode +");
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TBool mode = (TBool)isFullScreen;
+ TRAP_IGNORE(display ->SetFullScreenL(mode));
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setFullScreenMode -");
+}
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setWindowToNative
+(JNIEnv *, jobject,jint nativeDisplayHandle, jint qtWidgetHandle)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setWindowToNative + ");
+ QWidget *widget = reinterpret_cast<QWidget*>(qtWidgetHandle);
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ display->SetWindowResources(widget);
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setWindowToNative - ");
+}
+
+LOCAL_C void LocalSourceSizeChanged(CMMADisplay* display,TInt width,TInt height)
+{
+ TRect temp(0,0,0,0);
+ LOG2(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setWindowToNative + %d %d",width,height);
+ display->SourceSizeChanged(width,height,0,0,temp);
+}
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setNativeWindowSize
+(JNIEnv *, jobject,jint nativeDisplayHandle, jint /*aEventSourceHandle*/, jint eswtControlwidth,jint eswtControlheight)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setNativeWindowSize + ");
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TInt width = eswtControlwidth;
+ TInt height = eswtControlheight;
+ // TSize srcsize = TSize(360,487);
+ // TO-DO remove JavaUnhand in final code
+ //MMAFunctionServer* eventSource = reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
+ // need to call in Function server thread context because CMMADisplay's JNI pointer
+ // is valid in that thread context only.
+ /*TInt error = eventSource->ExecuteTrap(&LocalSourceSizeChanged,
+ display,
+ width,
+ height);*/
+ LocalSourceSizeChanged(display, width, height);
+
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : setNativeWindowSize - ");
+}
+
+/*
+LOCAL_C void LocalSetDisplayPosition(CMMADisplay* display,TInt uiX,TInt uiY,TInt vcX,TInt vcY)
+{
+ display->SetDisplayPosition(uiX,uiY,vcX,vcY);
+}
+*/
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setPosition
+(JNIEnv *, jobject,jint /*nativeDisplayHandle*/,jint /*aEventSourceHandle*/,jint /*uiX*/,jint /*uiY*/,jint /*vcX*/,jint /*vcY*/)
+{
+ /* LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setPosition + ");
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TInt uiControlLocationX = uiX;
+ TInt uiControlLocationY = uiY;
+ TInt videoControlLocationX = vcX;
+ TInt videoControlLocationY = vcY;
+ MMAFunctionServer* eventSource = reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
+ // need to call in Function server thread context because CMMADisplay's JNI pointer
+ // is valid in that thread context only.
+ TInt error = eventSource->ExecuteTrap(&LocalSetDisplayPosition,
+ display,
+ uiControlLocationX,
+ uiControlLocationY,
+ videoControlLocationX,
+ videoControlLocationY);
+
+ LOG(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : _setPosition - ");*/
+}
+
+
+
+
+LOCAL_C void LocalSetDisplaySize(CMMADisplay* display,TInt vcX,TInt vcY)
+{
+ LOG2(EJavaMMAPI,EInfo,"JNI_canvasdisplay.cpp : LocalSetDisplaySize vcX = %d,vcY=%d ",vcX,vcY);
+ TSize size(vcX,vcY);
+ TRAP_IGNORE(display->SetDisplaySizeL(size));
+}
+
+JNIEXPORT void JNICALL Java_com_nokia_microedition_media_control_MMAeSWTDisplay__1setDisplaySize
+(JNIEnv *, jobject,jint nativeDisplayHandle,jint /*aEventSourceHandle*/,jint width,jint height)
+{
+ LOG2(EJavaMMAPI,EInfo,"JNI_eswtDisplay.cpp : _setDisplaySize + width = %d,height = %d",width,height);
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TInt vc_width = width;
+ TInt vc_height = height;
+ //MMAFunctionServer* eventSource = reinterpret_cast<MMAFunctionServer *>(aEventSourceHandle);
+ // need to call in Function server thread context because CMMADisplay's JNI pointer
+ // is valid in that thread context only.
+ LOG2(EJavaMMAPI,EInfo,"JNI_eswtdisplay.cpp : _setDisplaySize + vc_width = %d,vc_height = %d",vc_width,vc_height);
+ /*TInt error = eventSource->ExecuteTrap(&LocalSetDisplaySize,
+ display,
+ vc_width,
+ vc_height);
+ */
+ LocalSetDisplaySize(display, vc_width, vc_height);
+ LOG(EJavaMMAPI,EInfo,"JNI_ESWTDisplay.cpp : _setDisplaySize - ");
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/mmapi_qt/baseline/src/eswtproxycontrol.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: JNI in UI thread context
+*
+*/
+
+#include "org_eclipse_swt_widgets_ESWTProxyControl.h"
+#include "logger.h"
+//#include "cmmadcdisplay.h"
+#include "cmmadisplay.h"
+
+JNIEXPORT jintArray JNICALL Java_org_eclipse_swt_widgets_ESWTProxyControl__1getSourceSize
+(JNIEnv *aJni, jobject, jint nativeDisplayHandle)
+{
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtproxycontrol.cpp : getSourceSize +");
+ LOG1(EJavaMMAPI,EInfo,"JNI_eswtproxycontrol.cpp : getSourceSize nativeDisplayHandle = %d", nativeDisplayHandle);
+ CMMADisplay* display = reinterpret_cast<CMMADisplay*>(nativeDisplayHandle);
+ TSize sourceRect = display->SourceSize();
+ jint sourceWidth = sourceRect.iWidth;
+ jint sourceHeight = sourceRect.iHeight;
+
+ jintArray sourceSize = aJni->NewIntArray(2);
+ aJni->SetIntArrayRegion(sourceSize,0,1,&sourceWidth);
+ aJni->SetIntArrayRegion(sourceSize,1,1,&sourceHeight);
+ LOG(EJavaMMAPI,EInfo,"JNI_eswtproxycontrol.cpp : getSourceSize -");
+ return sourceSize;
+}
--- a/javauis/mmapi_qt/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -21,13 +21,6 @@
<import file="../../../build/utilities.xml"/>
- <!-- Needed by the utilities.xml. See the description form the utilities.xml
- file -->
-
- <target name="compile">
- <omj.javac classpath="${classpath}:${compile.result.root}/eswtqt/classes/first:${compile.result.root}/openlcdui/classes/first:${compile.result.root}/javautils/classes/first"/>
- </target>
-
<!-- conditional compilation variation depending upon the platform
-->
<target name="init.component.properties">
@@ -65,6 +58,8 @@
com.nokia.microedition.media.control.MMACanvasDisplay,
com.nokia.microedition.media.control.ItemDisplay,
com.nokia.microedition.media.control.BaseDisplay,
+ com.nokia.microedition.media.control.MMAeSWTDisplay,
+ org.eclipse.swt.widgets.ESWTProxyControl,
com.nokia.microedition.media.control.MMAGUIFactory,
com.nokia.microedition.media.control.PitchControl,
com.nokia.microedition.media.control.RateControl,
@@ -197,10 +192,21 @@
</properties>
</target>
+
+ <target name="create.public.api.jar">
+ <omj.public.apis includes="javax/microedition/media/**/*.class"/>
+ </target>
<target name="create.internal.api.jar">
<omj.internal.apis includes="com/nokia/microedition/media/control/ControlImpl.class,
- com/nokia/microedition/media/control/MMAGUIFactory.class"/>
+ com/nokia/microedition/media/control/MMAGUIFactory.class,
+ com/nokia/microedition/media/NativeError.class,
+ com/nokia/microedition/media/InternalPlayer.class,
+ com/nokia/microedition/media/PlayerImpl.class,
+ com/nokia/microedition/media/PlugIn.class,
+ com/nokia/microedition/media/MMAInvokeListener.class,
+ com/nokia/microedition/media/PlayerBase.class,
+ com/nokia/microedition/media/ManagerImpl.class"/>
</target>
</project>
--- a/javauis/mmapi_qt/build/bwins/javamobilemediau.def Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/build/bwins/javamobilemediau.def Fri Jul 09 16:35:45 2010 +0300
@@ -1,5 +1,5 @@
EXPORTS
- ?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
+ ?jni_lookup@@YAP6AXXZPBD@Z @ 1 NONAME ; void (*)(void) jni_lookup(char const *)
?SetLoopCount@CMMAPlayer@@UAEXH@Z @ 2 NONAME ; void CMMAPlayer::SetLoopCount(int)
?PostObjectEvent@CMMAPlayer@@QAEXW4TEventType@CMMAPlayerEvent@@PAV_jobject@@@Z @ 3 NONAME ; void CMMAPlayer::PostObjectEvent(enum CMMAPlayerEvent::TEventType, class _jobject *)
?PrefetchFileL@CMMAEMCAudioPlayer@@MAEXXZ @ 4 NONAME ; void CMMAEMCAudioPlayer::PrefetchFileL(void)
@@ -8,72 +8,69 @@
?PostStringEvent@CMMAPlayer@@QAEXW4TEventType@CMMAPlayerEvent@@ABVTDesC16@@@Z @ 7 NONAME ; void CMMAPlayer::PostStringEvent(enum CMMAPlayerEvent::TEventType, class TDesC16 const &)
?SnapshotEncoded@CMMAVideoPlayer@@UAEPAVHBufC8@@XZ @ 8 NONAME ; class HBufC8 * CMMAVideoPlayer::SnapshotEncoded(void)
?DoOpen@CMMAMMFPlayerBase@@MAEHVTUid@@ABVTDesC8@@01VTMMFPrioritySettings@@@Z @ 9 NONAME ; int CMMAMMFPlayerBase::DoOpen(class TUid, class TDesC8 const &, class TUid, class TDesC8 const &, class TMMFPrioritySettings)
- ?StaticControl@CMMAPlayer@@SAPAVCMMAControl@@PAV1@H@Z @ 10 NONAME ; class CMMAControl * CMMAPlayer::StaticControl(class CMMAPlayer *, int)
- ?Type@CMMAVideoPlayer@@MAEABVTDesC16@@XZ @ 11 NONAME ; class TDesC16 const & CMMAVideoPlayer::Type(void)
- ??0CMMAEMCAudioVolumeControl@@IAE@AAVCMMAEMCAudioPlayer@@@Z @ 12 NONAME ; CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(class CMMAEMCAudioPlayer &)
- ?PublicClassName@CMMAControl@@UBEABVTDesC16@@XZ @ 13 NONAME ; class TDesC16 const & CMMAControl::PublicClassName(void) const
- ?PostActionCompletedStart@CMMAPlayer@@QAEXXZ @ 14 NONAME ; void CMMAPlayer::PostActionCompletedStart(void)
- ?Controller@CMMAMMFPlayerBase@@QAEAAVRMMFController@@XZ @ 15 NONAME ; class RMMFController & CMMAMMFPlayerBase::Controller(void)
- ?PrefetchDataL@CMMAAudioPlayer@@MAEXABVTDesC8@@@Z @ 16 NONAME ; void CMMAAudioPlayer::PrefetchDataL(class TDesC8 const &)
- ??0CMMAVideoUrlPlayer@@IAE@PAVCMMAMMFResolver@@@Z @ 17 NONAME ; CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(class CMMAMMFResolver *)
- ?CloseL@CMMAVideoUrlPlayer@@UAEXXZ @ 18 NONAME ; void CMMAVideoUrlPlayer::CloseL(void)
- ?SnapshotBitmap@CMMAVideoPlayer@@UAEPAVCFbsBitmap@@XZ @ 19 NONAME ; class CFbsBitmap * CMMAVideoPlayer::SnapshotBitmap(void)
- ?NewL@CTimeOutTimer@@SAPAV1@HAAVMTimeOutNotify@@@Z @ 20 NONAME ; class CTimeOutTimer * CTimeOutTimer::NewL(int, class MTimeOutNotify &)
- ?StartL@CMMAVideoUrlPlayer@@UAEXXZ @ 21 NONAME ; void CMMAVideoUrlPlayer::StartL(void)
- ?ReadCompletedL@CMMAEMCAudioPlayer@@UAEXHABVTDesC8@@@Z @ 22 NONAME ; void CMMAEMCAudioPlayer::ReadCompletedL(int, class TDesC8 const &)
- ?NewL@CMMAEMCAudioVolumeControl@@SAPAV1@AAVCMMAEMCAudioPlayer@@@Z @ 23 NONAME ; class CMMAEMCAudioVolumeControl * CMMAEMCAudioVolumeControl::NewL(class CMMAEMCAudioPlayer &)
- ?HandleEvent@CMMAVideoUrlPlayer@@MAEXABVTMMFEvent@@@Z @ 24 NONAME ; void CMMAVideoUrlPlayer::HandleEvent(class TMMFEvent const &)
- ?ConstructL@CMMAVideoUrlPlayer@@IAEXABVTDesC16@@@Z @ 25 NONAME ; void CMMAVideoUrlPlayer::ConstructL(class TDesC16 const &)
- ?SetDisplayL@CMMAVideoPlayer@@UAEXPAVMMMADisplay@@@Z @ 26 NONAME ; void CMMAVideoPlayer::SetDisplayL(class MMMADisplay *)
- ?TakeSnapshotL@CMMAVideoPlayer@@UAE?AW4TEncoding@MMMASnapshot@@PAVTRequestStatus@@ABVTSize@@ABVCMMAImageSettings@@@Z @ 27 NONAME ; enum MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(class TRequestStatus *, class TSize const &, class CMMAImageSettings const &)
- ?StaticAddObjectFromHandleL@MMAFunctionServer@@SAXPAV1@H@Z @ 28 NONAME ; void MMAFunctionServer::StaticAddObjectFromHandleL(class MMAFunctionServer *, int)
- ?SnapshotReady@CMMAVideoControl@@UAEXXZ @ 29 NONAME ; void CMMAVideoControl::SnapshotReady(void)
- ?CreatePlayerL@CMMAMMFPlayerFactory@@MAEPAVCMMAPlayer@@PAVCMMFFormatSelectionParameters@@PBVTDesC16@@@Z @ 30 NONAME ; class CMMAPlayer * CMMAMMFPlayerFactory::CreatePlayerL(class CMMFFormatSelectionParameters *, class TDesC16 const *)
- ?PlayCompleteL@CMMAEMCAudioPlayer@@MAEXH@Z @ 31 NONAME ; void CMMAEMCAudioPlayer::PlayCompleteL(int)
- ?NewL@CMMAAudioVolumeControl@@SAPAV1@PAVCMMAAudioPlayer@@@Z @ 32 NONAME ; class CMMAAudioVolumeControl * CMMAAudioVolumeControl::NewL(class CMMAAudioPlayer *)
- ?PrefetchDataL@CMMAEMCAudioPlayer@@MAEXABVTDesC8@@@Z @ 33 NONAME ; void CMMAEMCAudioPlayer::PrefetchDataL(class TDesC8 const &)
- ?HandlePlaybackCompleteL@CMMAAudioPlayer@@UAEXXZ @ 34 NONAME ; void CMMAAudioPlayer::HandlePlaybackCompleteL(void)
- ?RemoveStateListener@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 35 NONAME ; void CMMAPlayer::RemoveStateListener(class MMMAPlayerStateListener *)
- ??0CMMAEMCAudioPlayer@@IAE@PAVCMMAEMCResolver@@@Z @ 36 NONAME ; CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(class CMMAEMCResolver *)
- ?MidiClient@CMMAMIDIPlayer@@QBEPAVCMidiClientUtility@@XZ @ 37 NONAME ; class CMidiClientUtility * CMMAMIDIPlayer::MidiClient(void) const
- ??1CMMAVideoUrlPlayer@@UAE@XZ @ 38 NONAME ; CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer(void)
- ?ErrorPlaybackComplete@CMMAAudioPlayer@@UAEXH@Z @ 39 NONAME ; void CMMAAudioPlayer::ErrorPlaybackComplete(int)
- ??1CMMAEMCAudioPlayer@@UAE@XZ @ 40 NONAME ; CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer(void)
- ?MMFactory@CMMAEMCPlayerBase@@QAEPAVCMultimediaFactory@multimedia@@XZ @ 41 NONAME ; class multimedia::CMultimediaFactory * CMMAEMCPlayerBase::MMFactory(void)
- ?Players@MMAFunctionServer@@QAEAAV?$RPointerArray@VCMMAPlayer@@@@XZ @ 42 NONAME ; class RPointerArray<class CMMAPlayer> & MMAFunctionServer::Players(void)
- ?PreparePluginSelectionParametersL@CMMAMMFPlayerFactory@@MAEXPAVCMMAMMFResolver@@PAVCMMFFormatSelectionParameters@@@Z @ 43 NONAME ; void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(class CMMAMMFResolver *, class CMMFFormatSelectionParameters *)
- ?PostActionCompleted@CMMAPlayer@@QAEXH@Z @ 44 NONAME ; void CMMAPlayer::PostActionCompleted(int)
- ?RealizeL@CMMAVideoUrlPlayer@@UAEXXZ @ 45 NONAME ; void CMMAVideoUrlPlayer::RealizeL(void)
- ?SetPlayerInstanceObserver@MMAFunctionServer@@QAEXPAVMMMAPlayerInstanceObserver@@@Z @ 46 NONAME ; void MMAFunctionServer::SetPlayerInstanceObserver(class MMMAPlayerInstanceObserver *)
- ?SetPlayerListenerObjectL@CMMAVideoPlayer@@UAEXPAV_jobject@@PAUJNIEnv_@@PAVMMMAEventPoster@@@Z @ 47 NONAME ; void CMMAVideoPlayer::SetPlayerListenerObjectL(class _jobject *, struct JNIEnv_ *, class MMMAEventPoster *)
- ?RealizeL@CMMAEMCAudioPlayer@@UAEXXZ @ 48 NONAME ; void CMMAEMCAudioPlayer::RealizeL(void)
- ?ControlCount@CMMAPlayer@@QAEHXZ @ 49 NONAME ; int CMMAPlayer::ControlCount(void)
- ?DoSetLevelL@CMMAEMCAudioVolumeControl@@UAEXH@Z @ 50 NONAME ; void CMMAEMCAudioVolumeControl::DoSetLevelL(int)
- ?PlayCompleteL@CMMAAudioPlayer@@MAEXH@Z @ 51 NONAME ; void CMMAAudioPlayer::PlayCompleteL(int)
- ?SourceSize@CMMAVideoPlayer@@UAE?AVTSize@@XZ @ 52 NONAME ; class TSize CMMAVideoPlayer::SourceSize(void)
- ?SnapshoterL@CMMAVideoPlayer@@UAEPAVMMMASnapshot@@XZ @ 53 NONAME ; class MMMASnapshot * CMMAVideoPlayer::SnapshoterL(void)
- ?GetDuration@CMMAMMFPlayerBase@@UAEXPA_J@Z @ 54 NONAME ; void CMMAMMFPlayerBase::GetDuration(long long *)
- ?AddPlayerFactoryL@CMMAManager@@QAEXPAVMMMAPlayerFactory@@@Z @ 55 NONAME ; void CMMAManager::AddPlayerFactoryL(class MMMAPlayerFactory *)
- ??0CMMAVideoControl@@QAE@PAVMMMAGuiPlayer@@@Z @ 56 NONAME ; CMMAVideoControl::CMMAVideoControl(class MMMAGuiPlayer *)
- ?ClassName@CMMAVideoControl@@UBEABVTDesC16@@XZ @ 57 NONAME ; class TDesC16 const & CMMAVideoControl::ClassName(void) const
- ??1CMMAMMFPlayerFactory@@UAE@XZ @ 58 NONAME ; CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory(void)
- ?SetVolumeLevelL@CMMAVolumeControl@@QAEXHH@Z @ 59 NONAME ; void CMMAVolumeControl::SetVolumeLevelL(int, int)
- ?PostActionCompletedFile@CMMAPlayer@@QAEXXZ @ 60 NONAME ; void CMMAPlayer::PostActionCompletedFile(void)
- ?DoGetLevelL@CMMAEMCAudioVolumeControl@@UAEHXZ @ 61 NONAME ; int CMMAEMCAudioVolumeControl::DoGetLevelL(void)
- ?ReadCompletedL@CMMAVideoPlayer@@MAEXHABVTDesC8@@@Z @ 62 NONAME ; void CMMAVideoPlayer::ReadCompletedL(int, class TDesC8 const &)
- ?Type@CMMAEMCAudioPlayer@@UAEABVTDesC16@@XZ @ 63 NONAME ; class TDesC16 const & CMMAEMCAudioPlayer::Type(void)
- ?GetMediaTime@CMMAVideoUrlPlayer@@UAEXPA_J@Z @ 64 NONAME ; void CMMAVideoUrlPlayer::GetMediaTime(long long *)
- ?DeallocateL@CMMAVideoUrlPlayer@@UAEXXZ @ 65 NONAME ; void CMMAVideoUrlPlayer::DeallocateL(void)
- ??0CMMAMMFPlayerFactory@@QAE@XZ @ 66 NONAME ; CMMAMMFPlayerFactory::CMMAMMFPlayerFactory(void)
- ?AddStateListenerL@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 67 NONAME ; void CMMAPlayer::AddStateListenerL(class MMMAPlayerStateListener *)
- ?StreamControl@CMMAEMCPlayerBase@@QAEPAVMStreamControl@multimedia@@XZ @ 68 NONAME ; class multimedia::MStreamControl * CMMAEMCPlayerBase::StreamControl(void)
- ?PrefetchFileL@CMMAAudioPlayer@@MAEXXZ @ 69 NONAME ; void CMMAAudioPlayer::PrefetchFileL(void)
- ?PrefetchL@CMMAVideoUrlPlayer@@UAEXXZ @ 70 NONAME ; void CMMAVideoUrlPlayer::PrefetchL(void)
- ?AddLevelL@CMMAVolumeControl@@QAEHXZ @ 71 NONAME ; int CMMAVolumeControl::AddLevelL(void)
- ?ConstructL@CMMAEMCAudioPlayer@@IAEXXZ @ 72 NONAME ; void CMMAEMCAudioPlayer::ConstructL(void)
- ?Control@CMMAPlayer@@QAEPAVCMMAControl@@H@Z @ 73 NONAME ; class CMMAControl * CMMAPlayer::Control(int)
- ?PrefetchL@CMMAEMCAudioPlayer@@UAEXXZ @ 74 NONAME ; void CMMAEMCAudioPlayer::PrefetchL(void)
- ?StopL@CMMAVideoUrlPlayer@@UAEXH@Z @ 75 NONAME ; void CMMAVideoUrlPlayer::StopL(int)
- ??1CMMAVideoControl@@UAE@XZ @ 76 NONAME ; CMMAVideoControl::~CMMAVideoControl(void)
- ?AddSourceStreamL@CMMAPlayer@@MAEPAVCMMASourceStream@@PAUJNIEnv_@@PAVMMAFunctionServer@@PAV_jobject@@@Z @ 77 NONAME ; class CMMASourceStream * CMMAPlayer::AddSourceStreamL(struct JNIEnv_ *, class MMAFunctionServer *, class _jobject *)
+ ?Type@CMMAVideoPlayer@@MAEABVTDesC16@@XZ @ 10 NONAME ; class TDesC16 const & CMMAVideoPlayer::Type(void)
+ ??0CMMAEMCAudioVolumeControl@@IAE@AAVCMMAEMCAudioPlayer@@@Z @ 11 NONAME ; CMMAEMCAudioVolumeControl::CMMAEMCAudioVolumeControl(class CMMAEMCAudioPlayer &)
+ ?PublicClassName@CMMAControl@@UBEABVTDesC16@@XZ @ 12 NONAME ; class TDesC16 const & CMMAControl::PublicClassName(void) const
+ ?Controller@CMMAMMFPlayerBase@@QAEAAVRMMFController@@XZ @ 13 NONAME ; class RMMFController & CMMAMMFPlayerBase::Controller(void)
+ ?PrefetchDataL@CMMAAudioPlayer@@MAEXABVTDesC8@@@Z @ 14 NONAME ; void CMMAAudioPlayer::PrefetchDataL(class TDesC8 const &)
+ ??0CMMAVideoUrlPlayer@@IAE@PAVCMMAMMFResolver@@@Z @ 15 NONAME ; CMMAVideoUrlPlayer::CMMAVideoUrlPlayer(class CMMAMMFResolver *)
+ ?CloseL@CMMAVideoUrlPlayer@@UAEXXZ @ 16 NONAME ; void CMMAVideoUrlPlayer::CloseL(void)
+ ?SnapshotBitmap@CMMAVideoPlayer@@UAEPAVCFbsBitmap@@XZ @ 17 NONAME ; class CFbsBitmap * CMMAVideoPlayer::SnapshotBitmap(void)
+ ?NewL@CTimeOutTimer@@SAPAV1@HAAVMTimeOutNotify@@@Z @ 18 NONAME ; class CTimeOutTimer * CTimeOutTimer::NewL(int, class MTimeOutNotify &)
+ ?StartL@CMMAVideoUrlPlayer@@UAEXXZ @ 19 NONAME ; void CMMAVideoUrlPlayer::StartL(void)
+ ?ReadCompletedL@CMMAEMCAudioPlayer@@UAEXHABVTDesC8@@@Z @ 20 NONAME ; void CMMAEMCAudioPlayer::ReadCompletedL(int, class TDesC8 const &)
+ ?NewL@CMMAEMCAudioVolumeControl@@SAPAV1@AAVCMMAEMCAudioPlayer@@@Z @ 21 NONAME ; class CMMAEMCAudioVolumeControl * CMMAEMCAudioVolumeControl::NewL(class CMMAEMCAudioPlayer &)
+ ?HandleEvent@CMMAVideoUrlPlayer@@MAEXABVTMMFEvent@@@Z @ 22 NONAME ; void CMMAVideoUrlPlayer::HandleEvent(class TMMFEvent const &)
+ ?ConstructL@CMMAVideoUrlPlayer@@IAEXABVTDesC16@@@Z @ 23 NONAME ; void CMMAVideoUrlPlayer::ConstructL(class TDesC16 const &)
+ ?SetDisplayL@CMMAVideoPlayer@@UAEXPAVMMMADisplay@@@Z @ 24 NONAME ; void CMMAVideoPlayer::SetDisplayL(class MMMADisplay *)
+ ?TakeSnapshotL@CMMAVideoPlayer@@UAE?AW4TEncoding@MMMASnapshot@@PAVTRequestStatus@@ABVTSize@@ABVCMMAImageSettings@@@Z @ 25 NONAME ; enum MMMASnapshot::TEncoding CMMAVideoPlayer::TakeSnapshotL(class TRequestStatus *, class TSize const &, class CMMAImageSettings const &)
+ ?StaticAddObjectFromHandleL@MMAFunctionServer@@SAXPAV1@H@Z @ 26 NONAME ; void MMAFunctionServer::StaticAddObjectFromHandleL(class MMAFunctionServer *, int)
+ ?SnapshotReady@CMMAVideoControl@@UAEXXZ @ 27 NONAME ; void CMMAVideoControl::SnapshotReady(void)
+ ?CreatePlayerL@CMMAMMFPlayerFactory@@MAEPAVCMMAPlayer@@PAVCMMFFormatSelectionParameters@@PBVTDesC16@@@Z @ 28 NONAME ; class CMMAPlayer * CMMAMMFPlayerFactory::CreatePlayerL(class CMMFFormatSelectionParameters *, class TDesC16 const *)
+ ?PlayCompleteL@CMMAEMCAudioPlayer@@MAEXH@Z @ 29 NONAME ; void CMMAEMCAudioPlayer::PlayCompleteL(int)
+ ?NewL@CMMAAudioVolumeControl@@SAPAV1@PAVCMMAAudioPlayer@@@Z @ 30 NONAME ; class CMMAAudioVolumeControl * CMMAAudioVolumeControl::NewL(class CMMAAudioPlayer *)
+ ?PrefetchDataL@CMMAEMCAudioPlayer@@MAEXABVTDesC8@@@Z @ 31 NONAME ; void CMMAEMCAudioPlayer::PrefetchDataL(class TDesC8 const &)
+ ?HandlePlaybackCompleteL@CMMAAudioPlayer@@UAEXXZ @ 32 NONAME ; void CMMAAudioPlayer::HandlePlaybackCompleteL(void)
+ ?RemoveStateListener@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 33 NONAME ; void CMMAPlayer::RemoveStateListener(class MMMAPlayerStateListener *)
+ ??0CMMAEMCAudioPlayer@@IAE@PAVCMMAEMCResolver@@@Z @ 34 NONAME ; CMMAEMCAudioPlayer::CMMAEMCAudioPlayer(class CMMAEMCResolver *)
+ ?MidiClient@CMMAMIDIPlayer@@QBEPAVCMidiClientUtility@@XZ @ 35 NONAME ; class CMidiClientUtility * CMMAMIDIPlayer::MidiClient(void) const
+ ??1CMMAVideoUrlPlayer@@UAE@XZ @ 36 NONAME ; CMMAVideoUrlPlayer::~CMMAVideoUrlPlayer(void)
+ ?ErrorPlaybackComplete@CMMAAudioPlayer@@UAEXH@Z @ 37 NONAME ; void CMMAAudioPlayer::ErrorPlaybackComplete(int)
+ ??1CMMAEMCAudioPlayer@@UAE@XZ @ 38 NONAME ; CMMAEMCAudioPlayer::~CMMAEMCAudioPlayer(void)
+ ?MMFactory@CMMAEMCPlayerBase@@QAEPAVCMultimediaFactory@multimedia@@XZ @ 39 NONAME ; class multimedia::CMultimediaFactory * CMMAEMCPlayerBase::MMFactory(void)
+ ?Players@MMAFunctionServer@@QAEAAV?$RPointerArray@VCMMAPlayer@@@@XZ @ 40 NONAME ; class RPointerArray<class CMMAPlayer> & MMAFunctionServer::Players(void)
+ ?PreparePluginSelectionParametersL@CMMAMMFPlayerFactory@@MAEXPAVCMMAMMFResolver@@PAVCMMFFormatSelectionParameters@@@Z @ 41 NONAME ; void CMMAMMFPlayerFactory::PreparePluginSelectionParametersL(class CMMAMMFResolver *, class CMMFFormatSelectionParameters *)
+ ?PostActionCompleted@CMMAPlayer@@QAEXH@Z @ 42 NONAME ; void CMMAPlayer::PostActionCompleted(int)
+ ?RealizeL@CMMAVideoUrlPlayer@@UAEXXZ @ 43 NONAME ; void CMMAVideoUrlPlayer::RealizeL(void)
+ ?SetPlayerInstanceObserver@MMAFunctionServer@@QAEXPAVMMMAPlayerInstanceObserver@@@Z @ 44 NONAME ; void MMAFunctionServer::SetPlayerInstanceObserver(class MMMAPlayerInstanceObserver *)
+ ?SetPlayerListenerObjectL@CMMAVideoPlayer@@UAEXPAV_jobject@@PAUJNIEnv_@@PAVMMMAEventPoster@@@Z @ 45 NONAME ; void CMMAVideoPlayer::SetPlayerListenerObjectL(class _jobject *, struct JNIEnv_ *, class MMMAEventPoster *)
+ ?RealizeL@CMMAEMCAudioPlayer@@UAEXXZ @ 46 NONAME ; void CMMAEMCAudioPlayer::RealizeL(void)
+ ?ControlCount@CMMAPlayer@@QAEHXZ @ 47 NONAME ; int CMMAPlayer::ControlCount(void)
+ ?DoSetLevelL@CMMAEMCAudioVolumeControl@@UAEXH@Z @ 48 NONAME ; void CMMAEMCAudioVolumeControl::DoSetLevelL(int)
+ ?PlayCompleteL@CMMAAudioPlayer@@MAEXH@Z @ 49 NONAME ; void CMMAAudioPlayer::PlayCompleteL(int)
+ ?SourceSize@CMMAVideoPlayer@@UAE?AVTSize@@XZ @ 50 NONAME ; class TSize CMMAVideoPlayer::SourceSize(void)
+ ?SnapshoterL@CMMAVideoPlayer@@UAEPAVMMMASnapshot@@XZ @ 51 NONAME ; class MMMASnapshot * CMMAVideoPlayer::SnapshoterL(void)
+ ?GetDuration@CMMAMMFPlayerBase@@UAEXPA_J@Z @ 52 NONAME ; void CMMAMMFPlayerBase::GetDuration(long long *)
+ ?AddPlayerFactoryL@CMMAManager@@QAEXPAVMMMAPlayerFactory@@@Z @ 53 NONAME ; void CMMAManager::AddPlayerFactoryL(class MMMAPlayerFactory *)
+ ??0CMMAVideoControl@@QAE@PAVMMMAGuiPlayer@@@Z @ 54 NONAME ; CMMAVideoControl::CMMAVideoControl(class MMMAGuiPlayer *)
+ ?ClassName@CMMAVideoControl@@UBEABVTDesC16@@XZ @ 55 NONAME ; class TDesC16 const & CMMAVideoControl::ClassName(void) const
+ ??1CMMAMMFPlayerFactory@@UAE@XZ @ 56 NONAME ; CMMAMMFPlayerFactory::~CMMAMMFPlayerFactory(void)
+ ?SetVolumeLevelL@CMMAVolumeControl@@QAEXHH@Z @ 57 NONAME ; void CMMAVolumeControl::SetVolumeLevelL(int, int)
+ ?DoGetLevelL@CMMAEMCAudioVolumeControl@@UAEHXZ @ 58 NONAME ; int CMMAEMCAudioVolumeControl::DoGetLevelL(void)
+ ?ReadCompletedL@CMMAVideoPlayer@@MAEXHABVTDesC8@@@Z @ 59 NONAME ; void CMMAVideoPlayer::ReadCompletedL(int, class TDesC8 const &)
+ ?Type@CMMAEMCAudioPlayer@@UAEABVTDesC16@@XZ @ 60 NONAME ; class TDesC16 const & CMMAEMCAudioPlayer::Type(void)
+ ?GetMediaTime@CMMAVideoUrlPlayer@@UAEXPA_J@Z @ 61 NONAME ; void CMMAVideoUrlPlayer::GetMediaTime(long long *)
+ ?DeallocateL@CMMAVideoUrlPlayer@@UAEXXZ @ 62 NONAME ; void CMMAVideoUrlPlayer::DeallocateL(void)
+ ??0CMMAMMFPlayerFactory@@QAE@XZ @ 63 NONAME ; CMMAMMFPlayerFactory::CMMAMMFPlayerFactory(void)
+ ?AddStateListenerL@CMMAPlayer@@QAEXPAVMMMAPlayerStateListener@@@Z @ 64 NONAME ; void CMMAPlayer::AddStateListenerL(class MMMAPlayerStateListener *)
+ ?StreamControl@CMMAEMCPlayerBase@@QAEPAVMStreamControl@multimedia@@XZ @ 65 NONAME ; class multimedia::MStreamControl * CMMAEMCPlayerBase::StreamControl(void)
+ ?PrefetchFileL@CMMAAudioPlayer@@MAEXXZ @ 66 NONAME ; void CMMAAudioPlayer::PrefetchFileL(void)
+ ?PrefetchL@CMMAVideoUrlPlayer@@UAEXXZ @ 67 NONAME ; void CMMAVideoUrlPlayer::PrefetchL(void)
+ ?AddLevelL@CMMAVolumeControl@@QAEHXZ @ 68 NONAME ; int CMMAVolumeControl::AddLevelL(void)
+ ?ConstructL@CMMAEMCAudioPlayer@@IAEXXZ @ 69 NONAME ; void CMMAEMCAudioPlayer::ConstructL(void)
+ ?Control@CMMAPlayer@@QAEPAVCMMAControl@@H@Z @ 70 NONAME ; class CMMAControl * CMMAPlayer::Control(int)
+ ?PrefetchL@CMMAEMCAudioPlayer@@UAEXXZ @ 71 NONAME ; void CMMAEMCAudioPlayer::PrefetchL(void)
+ ?StopL@CMMAVideoUrlPlayer@@UAEXH@Z @ 72 NONAME ; void CMMAVideoUrlPlayer::StopL(int)
+ ??1CMMAVideoControl@@UAE@XZ @ 73 NONAME ; CMMAVideoControl::~CMMAVideoControl(void)
+ ?AddSourceStreamL@CMMAPlayer@@MAEPAVCMMASourceStream@@PAUJNIEnv_@@PAVMMAFunctionServer@@PAV_jobject@@@Z @ 74 NONAME ; class CMMASourceStream * CMMAPlayer::AddSourceStreamL(struct JNIEnv_ *, class MMAFunctionServer *, class _jobject *)
--- a/javauis/mmapi_qt/build/eabi/javamobilemediau.def Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/build/eabi/javamobilemediau.def Fri Jul 09 16:35:45 2010 +0300
@@ -7,142 +7,143 @@
_ZN10CMMAPlayer15PostStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 6 NONAME
_ZN10CMMAPlayer16AddSourceStreamLEP7JNIEnv_P17MMAFunctionServerP8_jobject @ 7 NONAME
_ZN10CMMAPlayer17AddStateListenerLEP23MMMAPlayerStateListener @ 8 NONAME
- _ZN10CMMAPlayer19RemoveStateListenerEP23MMMAPlayerStateListener @ 9 NONAME
- _ZN10CMMAPlayer7ControlEi @ 10 NONAME
- _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 11 NONAME
- _ZN13CTimeOutTimer4NewLEiR14MTimeOutNotify @ 12 NONAME
- _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 13 NONAME
- _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 14 NONAME
- _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 15 NONAME
- _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 16 NONAME
- _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 17 NONAME
- _ZN15CMMAVideoPlayer10SourceSizeEv @ 18 NONAME
- _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 19 NONAME
- _ZN15CMMAVideoPlayer11SnapshoterLEv @ 20 NONAME
- _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 21 NONAME
- _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 22 NONAME
- _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 23 NONAME
- _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 24 NONAME
- _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 25 NONAME
- _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 26 NONAME
- _ZN15CMMAVideoPlayer4TypeEv @ 27 NONAME
- _ZN16CMMAVideoControl13SnapshotReadyEv @ 28 NONAME
- _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 29 NONAME
- _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 30 NONAME
- _ZN16CMMAVideoControlD0Ev @ 31 NONAME
- _ZN16CMMAVideoControlD1Ev @ 32 NONAME
- _ZN16CMMAVideoControlD2Ev @ 33 NONAME
- _ZN17CMMAEMCPlayerBase13StreamControlEv @ 34 NONAME
- _ZN17CMMAEMCPlayerBase9MMFactoryEv @ 35 NONAME
- _ZN17CMMAMMFPlayerBase10ControllerEv @ 36 NONAME
- _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 37 NONAME
- _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 38 NONAME
- _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 39 NONAME
- _ZN17CMMAVolumeControl9AddLevelLEv @ 40 NONAME
- _ZN17MMAFunctionServer25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 41 NONAME
- _ZN17MMAFunctionServer26StaticAddObjectFromHandleLEPS_i @ 42 NONAME
- _ZN17MMAFunctionServer7PlayersEv @ 43 NONAME
- _ZN18CMMAEMCAudioPlayer10ConstructLEv @ 44 NONAME
- _ZN18CMMAEMCAudioPlayer13PlayCompleteLEi @ 45 NONAME
- _ZN18CMMAEMCAudioPlayer13PrefetchDataLERK6TDesC8 @ 46 NONAME
- _ZN18CMMAEMCAudioPlayer13PrefetchFileLEv @ 47 NONAME
- _ZN18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 48 NONAME
- _ZN18CMMAEMCAudioPlayer4TypeEv @ 49 NONAME
- _ZN18CMMAEMCAudioPlayer8RealizeLEv @ 50 NONAME
- _ZN18CMMAEMCAudioPlayer9PrefetchLEv @ 51 NONAME
- _ZN18CMMAEMCAudioPlayerC1EP15CMMAEMCResolver @ 52 NONAME
- _ZN18CMMAEMCAudioPlayerC2EP15CMMAEMCResolver @ 53 NONAME
- _ZN18CMMAEMCAudioPlayerD0Ev @ 54 NONAME
- _ZN18CMMAEMCAudioPlayerD1Ev @ 55 NONAME
- _ZN18CMMAEMCAudioPlayerD2Ev @ 56 NONAME
- _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 57 NONAME
- _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 58 NONAME
- _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 59 NONAME
- _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 60 NONAME
- _ZN18CMMAVideoUrlPlayer5StopLEi @ 61 NONAME
- _ZN18CMMAVideoUrlPlayer6CloseLEv @ 62 NONAME
- _ZN18CMMAVideoUrlPlayer6StartLEv @ 63 NONAME
- _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 64 NONAME
- _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 65 NONAME
- _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 66 NONAME
- _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 67 NONAME
- _ZN18CMMAVideoUrlPlayerD0Ev @ 68 NONAME
- _ZN18CMMAVideoUrlPlayerD1Ev @ 69 NONAME
- _ZN18CMMAVideoUrlPlayerD2Ev @ 70 NONAME
- _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 71 NONAME
- _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 72 NONAME
- _ZN20CMMAMMFPlayerFactoryC2Ev @ 73 NONAME
- _ZN20CMMAMMFPlayerFactoryD0Ev @ 74 NONAME
- _ZN20CMMAMMFPlayerFactoryD1Ev @ 75 NONAME
- _ZN20CMMAMMFPlayerFactoryD2Ev @ 76 NONAME
- _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 77 NONAME
- _ZN25CMMAEMCAudioVolumeControl11DoGetLevelLEv @ 78 NONAME
- _ZN25CMMAEMCAudioVolumeControl11DoSetLevelLEi @ 79 NONAME
- _ZN25CMMAEMCAudioVolumeControl4NewLER18CMMAEMCAudioPlayer @ 80 NONAME
- _ZN25CMMAEMCAudioVolumeControlC1ER18CMMAEMCAudioPlayer @ 81 NONAME
- _ZN25CMMAEMCAudioVolumeControlC2ER18CMMAEMCAudioPlayer @ 82 NONAME
- _ZNK11CMMAControl15PublicClassNameEv @ 83 NONAME
- _ZNK14CMMAMIDIPlayer10MidiClientEv @ 84 NONAME
- _ZNK16CMMAVideoControl9ClassNameEv @ 85 NONAME
- _ZTI10CMMAPlayer @ 86 NONAME
- _ZTI11CMMAControl @ 87 NONAME
- _ZTI13CTimeOutTimer @ 88 NONAME
- _ZTI14CMMAMIDIPlayer @ 89 NONAME
- _ZTI16CMMAVideoControl @ 90 NONAME
- _ZTI17CMMAMMFPlayerBase @ 91 NONAME
- _ZTI17CMMAStreamRequest @ 92 NONAME
- _ZTI17CMMAVolumeControl @ 93 NONAME
- _ZTI17MMAFunctionServer @ 94 NONAME
- _ZTI18CHXMetaDataUtility @ 95 NONAME
- _ZTI18CMMAVideoUrlPlayer @ 96 NONAME
- _ZTI20CMMAMMFPlayerFactory @ 97 NONAME
- _ZTI26CPlaybackCompletedCallback @ 98 NONAME
- _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 99 NONAME
- _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 100 NONAME
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 101 NONAME
- _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 102 NONAME
- _ZTIN19CMMAStopTimeControl10CStopTimerE @ 103 NONAME
- _ZTV10CMMAPlayer @ 104 NONAME
- _ZTV11CMMAControl @ 105 NONAME
- _ZTV13CTimeOutTimer @ 106 NONAME
- _ZTV14CMMAMIDIPlayer @ 107 NONAME
- _ZTV16CMMAVideoControl @ 108 NONAME
- _ZTV17CMMAMMFPlayerBase @ 109 NONAME
- _ZTV17CMMAStreamRequest @ 110 NONAME
- _ZTV17CMMAVolumeControl @ 111 NONAME
- _ZTV17MMAFunctionServer @ 112 NONAME
- _ZTV18CHXMetaDataUtility @ 113 NONAME
- _ZTV18CMMAVideoUrlPlayer @ 114 NONAME
- _ZTV20CMMAMMFPlayerFactory @ 115 NONAME
- _ZTV26CPlaybackCompletedCallback @ 116 NONAME
- _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 117 NONAME
- _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 118 NONAME
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 119 NONAME
- _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 120 NONAME
- _ZTVN19CMMAStopTimeControl10CStopTimerE @ 121 NONAME
- _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 122 NONAME
- _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 123 NONAME
- _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 124 NONAME
- _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 125 NONAME
- _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 126 NONAME
- _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 127 NONAME
- _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 128 NONAME
- _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 129 NONAME
- _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 130 NONAME
- _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 131 NONAME
- _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 132 NONAME
- _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 133 NONAME
- _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 134 NONAME
- _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 135 NONAME
- _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 136 NONAME
- _ZThn4_N18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 137 NONAME
- _ZThn4_N18CMMAEMCAudioPlayerD0Ev @ 138 NONAME
- _ZThn4_N18CMMAEMCAudioPlayerD1Ev @ 139 NONAME
- _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 140 NONAME
- _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 141 NONAME
- _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 142 NONAME
- _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 143 NONAME
- _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 144 NONAME
- _ZThn8_N16CMMAVideoControlD0Ev @ 145 NONAME
- _ZThn8_N16CMMAVideoControlD1Ev @ 146 NONAME
+ _ZN10CMMAPlayer19PostActionCompletedEi @ 9 NONAME
+ _ZN10CMMAPlayer19RemoveStateListenerEP23MMMAPlayerStateListener @ 10 NONAME
+ _ZN10CMMAPlayer7ControlEi @ 11 NONAME
+ _ZN11CMMAManager17AddPlayerFactoryLEP17MMMAPlayerFactory @ 12 NONAME
+ _ZN13CTimeOutTimer4NewLEiR14MTimeOutNotify @ 13 NONAME
+ _ZN15CMMAAudioPlayer13PlayCompleteLEi @ 14 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchDataLERK6TDesC8 @ 15 NONAME
+ _ZN15CMMAAudioPlayer13PrefetchFileLEv @ 16 NONAME
+ _ZN15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 17 NONAME
+ _ZN15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 18 NONAME
+ _ZN15CMMAVideoPlayer10SourceSizeEv @ 19 NONAME
+ _ZN15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 20 NONAME
+ _ZN15CMMAVideoPlayer11SnapshoterLEv @ 21 NONAME
+ _ZN15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 22 NONAME
+ _ZN15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 23 NONAME
+ _ZN15CMMAVideoPlayer14SnapshotBitmapEv @ 24 NONAME
+ _ZN15CMMAVideoPlayer15SnapshotEncodedEv @ 25 NONAME
+ _ZN15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 26 NONAME
+ _ZN15CMMAVideoPlayer24SetPlayerListenerObjectLEP8_jobjectP7JNIEnv_P15MMMAEventPoster @ 27 NONAME
+ _ZN15CMMAVideoPlayer4TypeEv @ 28 NONAME
+ _ZN16CMMAVideoControl13SnapshotReadyEv @ 29 NONAME
+ _ZN16CMMAVideoControlC1EP13MMMAGuiPlayer @ 30 NONAME
+ _ZN16CMMAVideoControlC2EP13MMMAGuiPlayer @ 31 NONAME
+ _ZN16CMMAVideoControlD0Ev @ 32 NONAME
+ _ZN16CMMAVideoControlD1Ev @ 33 NONAME
+ _ZN16CMMAVideoControlD2Ev @ 34 NONAME
+ _ZN17CMMAEMCPlayerBase13StreamControlEv @ 35 NONAME
+ _ZN17CMMAEMCPlayerBase9MMFactoryEv @ 36 NONAME
+ _ZN17CMMAMMFPlayerBase10ControllerEv @ 37 NONAME
+ _ZN17CMMAMMFPlayerBase11GetDurationEPx @ 38 NONAME
+ _ZN17CMMAMMFPlayerBase6DoOpenE4TUidRK6TDesC8S0_S3_20TMMFPrioritySettings @ 39 NONAME
+ _ZN17CMMAVolumeControl15SetVolumeLevelLEii @ 40 NONAME
+ _ZN17CMMAVolumeControl9AddLevelLEv @ 41 NONAME
+ _ZN17MMAFunctionServer25SetPlayerInstanceObserverEP26MMMAPlayerInstanceObserver @ 42 NONAME
+ _ZN17MMAFunctionServer26StaticAddObjectFromHandleLEPS_i @ 43 NONAME
+ _ZN17MMAFunctionServer7PlayersEv @ 44 NONAME
+ _ZN18CMMAEMCAudioPlayer10ConstructLEv @ 45 NONAME
+ _ZN18CMMAEMCAudioPlayer13PlayCompleteLEi @ 46 NONAME
+ _ZN18CMMAEMCAudioPlayer13PrefetchDataLERK6TDesC8 @ 47 NONAME
+ _ZN18CMMAEMCAudioPlayer13PrefetchFileLEv @ 48 NONAME
+ _ZN18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 49 NONAME
+ _ZN18CMMAEMCAudioPlayer4TypeEv @ 50 NONAME
+ _ZN18CMMAEMCAudioPlayer8RealizeLEv @ 51 NONAME
+ _ZN18CMMAEMCAudioPlayer9PrefetchLEv @ 52 NONAME
+ _ZN18CMMAEMCAudioPlayerC1EP15CMMAEMCResolver @ 53 NONAME
+ _ZN18CMMAEMCAudioPlayerC2EP15CMMAEMCResolver @ 54 NONAME
+ _ZN18CMMAEMCAudioPlayerD0Ev @ 55 NONAME
+ _ZN18CMMAEMCAudioPlayerD1Ev @ 56 NONAME
+ _ZN18CMMAEMCAudioPlayerD2Ev @ 57 NONAME
+ _ZN18CMMAVideoUrlPlayer10ConstructLERK7TDesC16 @ 58 NONAME
+ _ZN18CMMAVideoUrlPlayer11DeallocateLEv @ 59 NONAME
+ _ZN18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 60 NONAME
+ _ZN18CMMAVideoUrlPlayer12GetMediaTimeEPx @ 61 NONAME
+ _ZN18CMMAVideoUrlPlayer5StopLEi @ 62 NONAME
+ _ZN18CMMAVideoUrlPlayer6CloseLEv @ 63 NONAME
+ _ZN18CMMAVideoUrlPlayer6StartLEv @ 64 NONAME
+ _ZN18CMMAVideoUrlPlayer8RealizeLEv @ 65 NONAME
+ _ZN18CMMAVideoUrlPlayer9PrefetchLEv @ 66 NONAME
+ _ZN18CMMAVideoUrlPlayerC1EP15CMMAMMFResolver @ 67 NONAME
+ _ZN18CMMAVideoUrlPlayerC2EP15CMMAMMFResolver @ 68 NONAME
+ _ZN18CMMAVideoUrlPlayerD0Ev @ 69 NONAME
+ _ZN18CMMAVideoUrlPlayerD1Ev @ 70 NONAME
+ _ZN18CMMAVideoUrlPlayerD2Ev @ 71 NONAME
+ _ZN20CMMAMMFPlayerFactory13CreatePlayerLEP29CMMFFormatSelectionParametersPK7TDesC16 @ 72 NONAME
+ _ZN20CMMAMMFPlayerFactory33PreparePluginSelectionParametersLEP15CMMAMMFResolverP29CMMFFormatSelectionParameters @ 73 NONAME
+ _ZN20CMMAMMFPlayerFactoryC2Ev @ 74 NONAME
+ _ZN20CMMAMMFPlayerFactoryD0Ev @ 75 NONAME
+ _ZN20CMMAMMFPlayerFactoryD1Ev @ 76 NONAME
+ _ZN20CMMAMMFPlayerFactoryD2Ev @ 77 NONAME
+ _ZN22CMMAAudioVolumeControl4NewLEP15CMMAAudioPlayer @ 78 NONAME
+ _ZN25CMMAEMCAudioVolumeControl11DoGetLevelLEv @ 79 NONAME
+ _ZN25CMMAEMCAudioVolumeControl11DoSetLevelLEi @ 80 NONAME
+ _ZN25CMMAEMCAudioVolumeControl4NewLER18CMMAEMCAudioPlayer @ 81 NONAME
+ _ZN25CMMAEMCAudioVolumeControlC1ER18CMMAEMCAudioPlayer @ 82 NONAME
+ _ZN25CMMAEMCAudioVolumeControlC2ER18CMMAEMCAudioPlayer @ 83 NONAME
+ _ZNK11CMMAControl15PublicClassNameEv @ 84 NONAME
+ _ZNK14CMMAMIDIPlayer10MidiClientEv @ 85 NONAME
+ _ZNK16CMMAVideoControl9ClassNameEv @ 86 NONAME
+ _ZTI10CMMAPlayer @ 87 NONAME
+ _ZTI11CMMAControl @ 88 NONAME
+ _ZTI13CTimeOutTimer @ 89 NONAME
+ _ZTI14CMMAMIDIPlayer @ 90 NONAME
+ _ZTI16CMMAVideoControl @ 91 NONAME
+ _ZTI17CMMAMMFPlayerBase @ 92 NONAME
+ _ZTI17CMMAStreamRequest @ 93 NONAME
+ _ZTI17CMMAVolumeControl @ 94 NONAME
+ _ZTI17MMAFunctionServer @ 95 NONAME
+ _ZTI18CHXMetaDataUtility @ 96 NONAME
+ _ZTI18CMMAVideoUrlPlayer @ 97 NONAME
+ _ZTI20CMMAMMFPlayerFactory @ 98 NONAME
+ _ZTI26CPlaybackCompletedCallback @ 99 NONAME
+ _ZTIN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 100 NONAME
+ _ZTIN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 101 NONAME
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 102 NONAME
+ _ZTIN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 103 NONAME
+ _ZTIN19CMMAStopTimeControl10CStopTimerE @ 104 NONAME
+ _ZTV10CMMAPlayer @ 105 NONAME
+ _ZTV11CMMAControl @ 106 NONAME
+ _ZTV13CTimeOutTimer @ 107 NONAME
+ _ZTV14CMMAMIDIPlayer @ 108 NONAME
+ _ZTV16CMMAVideoControl @ 109 NONAME
+ _ZTV17CMMAMMFPlayerBase @ 110 NONAME
+ _ZTV17CMMAStreamRequest @ 111 NONAME
+ _ZTV17CMMAVolumeControl @ 112 NONAME
+ _ZTV17MMAFunctionServer @ 113 NONAME
+ _ZTV18CHXMetaDataUtility @ 114 NONAME
+ _ZTV18CMMAVideoUrlPlayer @ 115 NONAME
+ _ZTV20CMMAMMFPlayerFactory @ 116 NONAME
+ _ZTV26CPlaybackCompletedCallback @ 117 NONAME
+ _ZTVN15CMMAMIDIControl23CChannelVolumeEventWaitE @ 118 NONAME
+ _ZTVN18CMMAVideoUrlPlayer26CMMAVideoUrlPlayerDelegateE @ 119 NONAME
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerClipStreamDelegateE @ 120 NONAME
+ _ZTVN18CMMAVideoUrlPlayer36CMMAVideoUrlPlayerLiveStreamDelegateE @ 121 NONAME
+ _ZTVN19CMMAStopTimeControl10CStopTimerE @ 122 NONAME
+ _ZThn160_N18CMMAVideoUrlPlayer11HandleEventERK9TMMFEvent @ 123 NONAME
+ _ZThn288_N15CMMAAudioPlayer21ErrorPlaybackCompleteEi @ 124 NONAME
+ _ZThn288_N15CMMAAudioPlayer23HandlePlaybackCompleteLEv @ 125 NONAME
+ _ZThn296_N15CMMAVideoPlayer10SourceSizeEv @ 126 NONAME
+ _ZThn296_N15CMMAVideoPlayer11SetDisplayLEP11MMMADisplay @ 127 NONAME
+ _ZThn296_N15CMMAVideoPlayer11SnapshoterLEv @ 128 NONAME
+ _ZThn296_N15CMMAVideoPlayer21NotifyWithStringEventEN15CMMAPlayerEvent10TEventTypeERK7TDesC16 @ 129 NONAME
+ _ZThn296_N18CMMAVideoUrlPlayerD0Ev @ 130 NONAME
+ _ZThn296_N18CMMAVideoUrlPlayerD1Ev @ 131 NONAME
+ _ZThn300_N15CMMAVideoPlayer13TakeSnapshotLEP14TRequestStatusRK5TSizeRK17CMMAImageSettings @ 132 NONAME
+ _ZThn300_N15CMMAVideoPlayer14SnapshotBitmapEv @ 133 NONAME
+ _ZThn300_N15CMMAVideoPlayer15SnapshotEncodedEv @ 134 NONAME
+ _ZThn300_N18CMMAVideoUrlPlayerD0Ev @ 135 NONAME
+ _ZThn300_N18CMMAVideoUrlPlayerD1Ev @ 136 NONAME
+ _ZThn4_N15CMMAVideoPlayer14ReadCompletedLEiRK6TDesC8 @ 137 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayer14ReadCompletedLEiRK6TDesC8 @ 138 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayerD0Ev @ 139 NONAME
+ _ZThn4_N18CMMAEMCAudioPlayerD1Ev @ 140 NONAME
+ _ZThn4_N18CMMAVideoUrlPlayerD0Ev @ 141 NONAME
+ _ZThn4_N18CMMAVideoUrlPlayerD1Ev @ 142 NONAME
+ _ZThn4_N20CMMAMMFPlayerFactoryD0Ev @ 143 NONAME
+ _ZThn4_N20CMMAMMFPlayerFactoryD1Ev @ 144 NONAME
+ _ZThn8_N16CMMAVideoControl13SnapshotReadyEv @ 145 NONAME
+ _ZThn8_N16CMMAVideoControlD0Ev @ 146 NONAME
+ _ZThn8_N16CMMAVideoControlD1Ev @ 147 NONAME
--- a/javauis/mmapi_qt/volumekeys/src/cmmaforeground.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/mmapi_qt/volumekeys/src/cmmaforeground.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -63,7 +63,7 @@
eikEnv->RemoveForegroundObserver(*this);
LOG( EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() : eikEnv RemoveForegroundObserver -");
}
- */
+
if (iEventPoster && iDeleteRefEvent)
{
iEventPoster->PostEvent(iDeleteRefEvent);
@@ -71,7 +71,8 @@
else
{
delete iDeleteRefEvent;
- }
+ }*/
+ //TODO MemoryLeak need to delete the above object.
delete iForegroundEvent;
delete iActiveScheduler;
LOG(EJavaMMAPI, EInfo, "CMMAForeground::~CMMAForeground() - ");
--- a/javauis/nokiasound/src/cmidsound.cpp Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/nokiasound/src/cmidsound.cpp Fri Jul 09 16:35:45 2010 +0300
@@ -201,8 +201,8 @@
TInt CMIDSound::Play(TInt aLoop)
{
JELOG2(EJavaUI);
- TInt err;
- CallMethodL(err, this, &CMIDSound::DoPlay, aLoop, this);
+ TInt err = 0;
+ CallMethod(err, this, &CMIDSound::DoPlay, aLoop, this);
return err;
}
@@ -256,8 +256,8 @@
TInt CMIDSound::SoundVolume()
{
JELOG2(EJavaUI);
- TInt result;
- CallMethodL(result, this, &CMIDSound::Volume, this);
+ TInt result = 0;
+ CallMethod(result, this, &CMIDSound::Volume, this);
return result;
}
@@ -289,8 +289,8 @@
TInt CMIDSound::PlayerState()
{
JELOG2(EJavaUI);
- TInt result;
- CallMethodL(result, this, &CMIDSound::State, this);
+ TInt result = 0;
+ CallMethod(result, this, &CMIDSound::State, this);
return result;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/nokiauiapi_qt/.classpath Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**/.svn/" kind="src" path="src"/>
+ <classpathentry kind="src" path="src_j2me"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="CLDC_JAR"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/nokiauiapi_qt/.project Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>nokiauiapi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
--- a/javauis/nokiauiapi_qt/build/build.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/javauis/nokiauiapi_qt/build/build.xml Fri Jul 09 16:35:45 2010 +0300
@@ -29,9 +29,7 @@
<property name="java.src.paths" value="../src:../src_j2me"/>
- <target name="compile">
- <omj.javac classpath="${impl.cldc.jar}"/>
- </target>
+
<property name="javah.classnames" value="com.nokia.mid.ui.internal.OS"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/nokiauiapi_qt/build/javanokiaui.pro Fri Jul 09 16:35:45 2010 +0300
@@ -0,0 +1,44 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE=lib
+TARGET=javanokiaui
+CONFIG += omj java
+
+
+QT += core
+
+
+symbian {
+
+
+ include(../library/nokiauiapi.pri)
+
+ LIBS += -lcone
+ LIBS += -ltouchfeedback
+
+
+}
+
+include(../../../build/omj.pri)
+
+
+
+
+
+
+
+
--- a/javauis/nokiauiapi_qt/build/nokiauiapiqt.pro Tue Jul 06 20:36:19 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-#
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-TEMPLATE=lib
-TARGET=javanokiaui
-CONFIG += omj java
-
-
-QT += core
-
-
-symbian {
-
-
- include(../library/nokiauiapi.pri)
-
- LIBS += -lcone
- LIBS += -ltouchfeedback
-
-
-}
-
-include(../../../build/omj.pri)
-
-
-
-
-
-
-
-
--- a/layers.sysdef.xml Tue Jul 06 20:36:19 2010 +0300
+++ b/layers.sysdef.xml Fri Jul 09 16:35:45 2010 +0300
@@ -12,26 +12,12 @@
qmakeArgs="-r"
filter="!sf_build" />
</module>
-
-<!-- When releasing to SF, change the sf_build to this.
<module name="jrt_sf">
<unit name="jrt_sf" unitID="jrt.jrt_sf" mrp=""
bldFile="&layer_real_source_path;" proFile="jrt.pro"
qmakeArgs="-r RD_JAVA_SF_BUILD=1"
filter="sf_build" />
</module>
--->
- <module name="jrt">
- <unit name="jrt_jrt_plat" unitID="jrt.jrt.jrt_plat" mrp=""
- bldFile="&layer_real_source_path;/jrt_plat/group"
- filter="sf_build" />
- </module>
- <module name="jrt">
- <unit name="jrt_jrt_stubs" unitID="jrt.jrt.java_stubs" mrp=""
- bldFile="&layer_real_source_path;/java_stubs/group"
- filter="sf_build" />
- </module>
-
</layer>
</systemModel>
</SystemDefinition>
--- a/rom/java_2_2.iby Tue Jul 06 20:36:19 2010 +0300
+++ b/rom/java_2_2.iby Fri Jul 09 16:35:45 2010 +0300
@@ -180,6 +180,7 @@
file=ABI_DIR\BUILD_DIR\javaruntimeui.dll SHARED_LIB_DIR\javaruntimeui.dll
data=JAVA_VM_RES_BLD\javaruntimeui.odc JAVA_VM_RES_IMG\javaruntimeui.odc
file=ABI_DIR\BUILD_DIR\javaruntimestarterutils.dll SHARED_LIB_DIR\javaruntimestarterutils.dll
+file=ABI_DIR\BUILD_DIR\javastarter.dll SHARED_LIB_DIR\javastarter.dll
// MIDP runtime
file=ABI_DIR\BUILD_DIR\javamidp.exe PROGRAMS_DIR\javamidp.exe
@@ -364,4 +365,8 @@
// Utility for Services team
file=ABI_DIR\BUILD_DIR\javaupgradeapp.exe PROGRAMS_DIR\javaupgradeapp.exe
+// Java icon size notifier ecom plugin
+ECOM_PLUGIN(javaiconsizenotifplugin.dll, javaiconsizenotifplugin.rsc)
+data=ZRESOURCE\plugins\javaiconsizenotifplugin.rsc ECOM_RESOURCE_DIR\javaiconsizenotifplugin.rsc
+
#endif
--- a/rom/java_3_1.iby Tue Jul 06 20:36:19 2010 +0300
+++ b/rom/java_3_1.iby Fri Jul 09 16:35:45 2010 +0300
@@ -85,6 +85,7 @@
// Usif installer plugin
ECOM_PLUGIN(javasifplugin.dll,javasifplugin.rsc)
data=ZRESOURCE\plugins\javasifplugin.rsc ECOM_RESOURCE_DIR\javasifplugin.rsc
+file=ABI_DIR\BUILD_DIR\javainstallcopier.exe PROGRAMS_DIR\javainstallcopier.exe
#endif
// Recognizers
@@ -165,6 +166,7 @@
file=ABI_DIR\BUILD_DIR\javaruntimeui.dll SHARED_LIB_DIR\javaruntimeui.dll
data=JAVA_VM_RES_BLD\javaruntimeui.odc JAVA_VM_RES_IMG\javaruntimeui.odc
file=ABI_DIR\BUILD_DIR\javaruntimestarterutils.dll SHARED_LIB_DIR\javaruntimestarterutils.dll
+file=ABI_DIR\BUILD_DIR\javastarter.dll SHARED_LIB_DIR\javastarter.dll
// MIDP runtime
file=ABI_DIR\BUILD_DIR\javamidp.exe PROGRAMS_DIR\javamidp.exe