# HG changeset patch # User hgs # Date 1278682545 -10800 # Node ID 023eef975703de5e1893c183c4028ee50a6f5d89 # Parent 35baca0e7a2e686c7e8d00b1f4671f3042146b6f v2.2.4_1 diff -r 35baca0e7a2e -r 023eef975703 build/Makefile.comp --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/Makefile.defs --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/Makefile.nonqt --- 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: diff -r 35baca0e7a2e -r 023eef975703 build/bld.inf --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/codescanner_high.xml --- /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 @@ + + + + + + + .*\.au + .*\.avi + .*\.bmp + .*\.dll + .*\.doc + .*\.exe + .*\.gif + .*\.jpg + .*\.mbm + .*\.mp3 + .*\.mpg + .*\.png + .*\.raw + .*\.rtf + .*\.tif + .*\.wav + .*\.wbmp + .*\.wmf + .*\.xls + + .*\\ts_.* + .*\\tsrc\\.* + .*\\tsrc.s60\\.* + .*\\test\\.* + .*\\internal\\.* + .*\\Internal\\.* + .*\\.svn\\.* + \\tools\\.* + + + + + + + + + + diff -r 35baca0e7a2e -r 023eef975703 build/exports.inf --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/loc/resources.jar Binary file build/loc/resources.jar has changed diff -r 35baca0e7a2e -r 023eef975703 build/makefile --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/makefile.javaversion --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/nativejava.flm --- 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))) + + diff -r 35baca0e7a2e -r 023eef975703 build/properties.xml --- 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"/> --> - - - - - - + + + + + + + + + + + + + + @@ -60,13 +71,6 @@ - - - - - diff -r 35baca0e7a2e -r 023eef975703 build/sis/incompatible_openc.txt --- /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 diff -r 35baca0e7a2e -r 023eef975703 build/sis/incompatible_platform.txt --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/sis/java_2_0.pkg --- 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 diff -r 35baca0e7a2e -r 023eef975703 build/sis/java_3_1.pkg --- 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" diff -r 35baca0e7a2e -r 023eef975703 build/templates/10.1.layers.sysdef.xml --- 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" /> - - - - - - - - - diff -r 35baca0e7a2e -r 023eef975703 build/templates/9.2.layers.sysdef.xml --- 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 @@ - - - - - - - - - diff -r 35baca0e7a2e -r 023eef975703 inc/build_defines.hrh --- 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 diff -r 35baca0e7a2e -r 023eef975703 inc/build_defines.pri --- 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 diff -r 35baca0e7a2e -r 023eef975703 inc/java.txt --- 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 diff -r 35baca0e7a2e -r 023eef975703 inc/project_defines.hrh --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/comms/build/comms.pro --- 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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/comms/build/javacomms.pro --- /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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/comms/comms.pro --- 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" diff -r 35baca0e7a2e -r 023eef975703 javacommons/comms/src/commsendpoint.cpp --- 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; } } diff -r 35baca0e7a2e -r 023eef975703 javacommons/connectionmanager/inc.s60/connectionmanager.h --- 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); diff -r 35baca0e7a2e -r 023eef975703 javacommons/connectionmanager/src.s60/connectionmanager.cpp --- 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; + + } // --------------------------------------------------------------------------- diff -r 35baca0e7a2e -r 023eef975703 javacommons/fileutils/build/fileutils.pro --- 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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/fileutils/build/javafileutils.pro --- /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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/fileutils/javasrc/com/nokia/mj/impl/fileutils/FileURL.java --- 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://"; diff -r 35baca0e7a2e -r 023eef975703 javacommons/fileutils/tsrc/data/HelloWorld2.jar Binary file javacommons/fileutils/tsrc/data/HelloWorld2.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfbase/javasrc/com/nokia/mj/impl/gcf/PushRegistryPermissionImpl.java --- 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"; } /** diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/file/tsrc/mt/filetestinit/build/javafiletestinit.pro --- 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 } diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/http/build/javahttp.pro --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/gcf/protocol/http/HttpPermissionImpl.java --- 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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/http/src.s60/javauseragent.cpp --- 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 -#include "javaenvinfo.h" #else #include #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; diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/http/src.s60/nativehttptraansaction.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javacommons/gcfprotocols/https/javasrc.s60/com/nokia/mj/impl/gcf/protocol/https/HttpsPermissionImpl.java --- 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) diff -r 35baca0e7a2e -r 023eef975703 javacommons/javacommons.pro --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/javastorage/tsrc/storageclient/build/alltests.mmp --- 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 -SYSTEMINCLUDE /epoc32/include +APP_LAYER_SYSTEMINCLUDE USERINCLUDE ../../../inc USERINCLUDE ../../../../../tools/cpputest/include/cpputest diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/build/build.xml --- 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. --> - + - 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 @@ -32,7 +32,6 @@ - @@ -48,7 +47,7 @@ - + @@ -62,20 +61,10 @@ - - - - - - - - - - diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/att_manufacturer.txt --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/att_operator.txt --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/att_trustedthirdparty.txt --- 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"; -} diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/msa_trustedthirdparty.txt --- 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"; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/msa_untrusted.txt --- 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"; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/s60_operator.txt --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/data/s60_trustedthirdparty.txt --- 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"; } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc.cdc/com/nokia/mj/impl/security/midp/authorization/SecurityPolicy.java --- 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 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( diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/NetworkRestrictionsAttribute.java --- 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; diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc/com/nokia/mj/impl/security/midp/common/PermissionMappingTable.java --- 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( diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc/com/nokia/mj/impl/security/midp/storage/SecurityStorage.java --- 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; + } } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityDetailedErrorMessage.java --- 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 ----------------------------- */ diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javasrc/com/nokia/mj/impl/security/utils/SecurityErrorMessage.java --- 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 ----------------------------- */ diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javaunicertstoreplugin/src.s60/200213A3.rss --- 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 +#include #include // Some defines of useful values for attributes to simplify diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/javaunicertstoreplugin/src.s60/javacertstoreimpl.cpp --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.cpp --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/BlanketPermissionPolicy.h --- 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 ; diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/SimpleMapping.cpp --- 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]); } } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/midp2securitypolicyv2/plugins/securitypolicyV2/src/XPFParser.cpp --- 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"); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/midp2userpreferences/src/MIDP2UserPreferences.cpp --- 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 -#include +#include "MUserSecurityPreferencesTable.h" +#include "j2me/midp2/security/MSecurityPolicyV2.h" #include "SecurityPreferences.h" #include "javauid.h" diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/tsrc/build/securitylegacysupportunittests.mmp --- 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 -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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/legacysupport/tsrc/src/testsecuritypolicy.cpp --- 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 +#include "j2me/midp2/security/msecuritypolicyv2.h" using namespace MIDP; diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/javasrc/invalidjars/ImplementProtectedInterface/myClass.java --- 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; diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/policies/test_trustedthirdparty.txt --- 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"; +} diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/assigned_settings_only.txt --- /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; +} diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/assigned_settings_orphaned.txt --- /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; +} diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/assigned_and_user_settings.txt --- /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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/assigned_settings_only.txt --- /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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/assigned_settings_orphaned.txt --- /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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/domain_without_end_separator.txt --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/ignore_interaction_modes_for_allowed_group.txt --- 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://* diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/manufacturer_like_policy.txt --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/data/validpolicies/validators/permission_without_end_terminator.txt --- 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 diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/OMJSecurityTests.java --- 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==")); diff -r 35baca0e7a2e -r 023eef975703 javacommons/security/tsrc/javasrc/com/nokia/mj/impl/security/midp/authentication/AuthenticationModuleTests.java --- 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")); diff -r 35baca0e7a2e -r 023eef975703 javacommons/utils/inc/logger.h --- 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 }; diff -r 35baca0e7a2e -r 023eef975703 javacommons/utils/javasrc/com/nokia/mj/impl/utils/ErrorMessageBase.java --- 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 ----------------------------- */ diff -r 35baca0e7a2e -r 023eef975703 javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerDetailedErrorMessage.java --- 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_"); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/utils/javasrc/com/nokia/mj/impl/utils/InstallerErrorMessage.java --- 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_"); } diff -r 35baca0e7a2e -r 023eef975703 javacommons/utils/javasrc/com/nokia/mj/impl/utils/Logger.java --- 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 }; diff -r 35baca0e7a2e -r 023eef975703 javaextensions/comm/javasrc/com/nokia/mj/impl/gcf/protocol/comm/CommPermissionImpl.java --- 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) diff -r 35baca0e7a2e -r 023eef975703 javaextensions/javaextensions.pro --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaextensions/location/landmarks/src/landmark.cpp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaextensions/midprms_db/javasrc/com/nokia/mj/impl/rms/RmsFileInfo.java --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javaextensions/mobinfo/build/javamobinfo.pro --- /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) diff -r 35baca0e7a2e -r 023eef975703 javaextensions/mobinfo/build/mobinfo.pro --- 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) diff -r 35baca0e7a2e -r 023eef975703 javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoPermission.java --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javaextensions/mobinfo/javasrc.s60/com/nokia/mj/impl/properties/mobinfo/MobileInfoProperties.java --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaextensions/mobinfo/src.s60/javamobinfo.cpp --- 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 #include #include +#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; } diff -r 35baca0e7a2e -r 023eef975703 javaextensions/satsa/build/javasatsa.pro --- 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 \ + } diff -r 35baca0e7a2e -r 023eef975703 javaextensions/satsa/pki/src.s60/cstscredentialmanager.cpp --- 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 - // 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(); } diff -r 35baca0e7a2e -r 023eef975703 javaextensions/satsa/pki/src.s60/cstscredentialmanager.h --- 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; diff -r 35baca0e7a2e -r 023eef975703 javaextensions/satsa/pki/src.s60/cstssignatureservice.cpp --- 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 #include #include -#include + #include "cstsseprompt.h" #include @@ -42,7 +40,10 @@ #include "logger.h" #include "jstringutils.h" -// CONSTANTS +#include +#include + + 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(aShowData); const TDesC* sec = static_cast(&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(&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"); + } // ----------------------------------------------------------------------------- diff -r 35baca0e7a2e -r 023eef975703 javaextensions/satsa/pki/src.s60/cstssignatureservice.h --- 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 + #include #include #include #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; diff -r 35baca0e7a2e -r 023eef975703 javaextensions/sensor/src.s60/csensorbase.cpp --- 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) diff -r 35baca0e7a2e -r 023eef975703 javaextensions/wma/sms_cbs/pushplugin/cbs/src.s60/cbsserverconnection.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javaextensions/wma/sms_cbs/pushplugin/sms/src.s60/smsserverconnection.cpp --- 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: { diff -r 35baca0e7a2e -r 023eef975703 javamanager/javabackup/javabackupcore/build/javabackup.mmp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javabackup/javabackupcore/src.s60/jsbcdataowner.h --- 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 +#include namespace java { diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/javacertstore/src.s60/smartcardcryptotokenreader.h --- 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(); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/build/testsmartcardtokenplugin.mmp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/javacertstore/tsrc.s60/src/101F5B72.rss --- 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 +#include #include // True diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstarter.h --- 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; diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/preinstallerstarter/src.s60/preinstallerstarter.cpp --- 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 +#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK #include // for RApaLsSession +#endif #include #include #include @@ -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() { diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/build/exports.inf --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/build/javacaptain_ext_settingslistener.pro --- 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) diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/inc/settingschangeeventsprovidermessages.h --- 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; } } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerextension.h --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/inc/settingslistenerinterface.h --- 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; }; diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.cpp --- 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 +#include + #include "coreinterface.h" #include "eventconsumerinterface.h" @@ -22,160 +25,91 @@ #include "cenreplistener.h" #include "settingschangeeventsprovidermessages.h" -#include -#include - 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/src.s60/cenreplistener.h --- 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 +#include #include "javaosheaders.h" #include "settingschangeeventsprovidermessages.h" - -#include -#include +#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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.cpp --- 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 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& 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.h --- 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 #include #include +#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& 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 crListeners_t; diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/extensionplugins/settingslistener/src/settingslistenerextension.cpp --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/inc.s60/tickerprovider.h --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/inc/settingschangeeventsprovidermessages.h --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/src.s60/tickerprovider.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/src/tickerproviderinterface.h --- 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) + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javacaptain/systemams/src/certificatesmanager.cpp --- 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 applications; - applications.Append(KMidletInstallApplicabilityUid); + applications.AppendL(KMidletInstallApplicabilityUid); iCertStore->SetApplicability(*iCurrentCertInfo, applications, iStatus); User::WaitForRequest(iStatus); if (iStatus.Int() == KErrNone) diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/appinstuiplugin/src/javainstalllauncher.cpp --- 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() diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/build/bld.inf --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/build/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 + + +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 + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/data/javaiconsizenotifplugin.rss --- /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 +#include + +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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/inc/iconsizenotifier.h --- /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 // 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/inc/iconsizeutils.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 +#include + +/** + * 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/iconsizenotifplugin/src/iconsizenotifier.cpp --- /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 +#include +#include +#include + +#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 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& aNotifiers) +{ + CIconSizeNotifier* notifier1 = CIconSizeNotifier::NewLC(); + aNotifiers.AppendL(notifier1); + CleanupStack::Pop(notifier1); +} + +CArrayPtr* NotifierArray() +{ + CArrayPtrFlat* notifiers = new CArrayPtrFlat(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; +} + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installcopier/build/javainstallcopier.pro --- /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) diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installcopier/src/javainstallcopier.cpp --- /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 +#include +#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; +} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/build/javainstaller.pro --- 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 += \ diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/utils/SysUtil.java --- 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; } /** diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/CheckJarPackages.java --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/ConvertIcons.java --- 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- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareInstallation.java --- 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; + } } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/PrepareSplashScreen.java --- 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) { diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/ConfirmUninstallation.java --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/GetFromStorage.java --- 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()); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/storagehandler/SuiteInfo.java --- 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"); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/AutoStartPermission.java --- 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"; } /** diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/src.s60/applicationregistrator/applicationregistrator.cpp --- 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(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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.cpp --- 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 #include +#include #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 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/src.s60/iconconverter/iconconverter.h --- 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 +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; }; diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/src.s60/jadjarmatcher/jadjarmatcherscanfrominbox.cpp --- 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); } } } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/GetComponentInfoTest.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/InstallerEngineTest.java --- 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=
: 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. diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/customisationproperties/CustomisationPropertiesTest.java --- 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() diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/utils/SysUtilTest.java --- 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); + } } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000019.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000019.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000046.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000046.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000058.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000058.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000070.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000070.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000090.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000090.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000150.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000150.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000172.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000172.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000175.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000175.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000182.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000182.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000189.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000189.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000250.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000250.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000305.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000305.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000390.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000390.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000500.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000500.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000582.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000582.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000618.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000618.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/00000703.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/00000703.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/3DSpaceShooter.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/800_x_N97_64GB_fr_speed_v5_32_01.jad --- /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+htVI1BBzO8cFC3kf4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OrBPrC3ZxZEwyHAgyqEJDn2Z8KXTMUr41jge3KyhxRehflRcYhdXzwmE+8LOHaN7xLEZauOuafyBEVpjVN5UaaOm/v8mTn0TymV2j9R7D8Nycbz1gVeMrOhNW2GODxjvu5IoEHQh/myul28EecKGx05Xprcodr0a8Q6LKJg+ihJMxMrS3YEylp diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.zip Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/BCExchanger.zip has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/DevCertTestMIDlet.jad --- /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/wQEAwIHgDAXBgNVHSUEEDAOBgwrBgEEAV4BMQECAgMwgmpqBgwrBgEEAV4BMQECAgc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3NzMMDzIyMTYzNDczNDg2MTA4NgwPNjE4NjU3NDcxNzUyMTE0DA8zMjg1MjU1MTIzMTgwNzAMDzQ2MTAzMTQ0NDAzMDMyNAwPNTc2ODU4NDI3MjE0MTg2DA82NjU0MDAwNjgwMjgxMzEMDzMwNTcyMzIxODQ0MTgxMwwPNTQ1MTg0NDYwMDg4NTQ2DA82ODExMDczNDM4Njg3MzgwDQYJKoZIhvcNAQEFBQADgYEAQq6zHN8SP8w71Yyq+cwwNQ2VZ4UMPRw/9JkW8ZUJWC4gae2lOfeyyjtN3akXaT+p+vETtfoPuCpPjvzPYoN1RZieyJnpSVzUrNw/lM6kSP5DjGg5K/WKWYad0VkQg56Kynp2YVX4yKUhBydd7iBeSGP900LAHRWCR++xq+r98mI= +MIDlet-Jar-RSA-SHA1: PRpjLFh81oAjHdPSZ/9lTe64ICSSHOk/MQMdRSqwsoGMSPID91mBRFEYOIQ/5nocEscacSi81o089Y0gMpEIP8V/EWBD7WDP6xqjC0gSyac+QjZm1Bu7Pzav+JC5J3KEkKOGy4wgQKJx02bArR/P9LhYAe7T6LVVFbfFyw2lhJA= diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/Empty.jad diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/EmptyLines.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/FL_Rocks.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/NDRM.jad --- /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 + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/PlatformReqHTTP.jad --- /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= diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/SimpleRMS8.jad --- /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 + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/SimpleRMS8.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/SimpleRMS8.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.zip Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/SunShines3D_DEMO_nokia_N900_EN_IGP_ATandT_901.zip has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet.jad --- /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: diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet2.jad --- /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: diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/TestMidlet3.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.zip Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/calc2_en_de_es_ES_fr_it_tr_TR_nl_NL_pt_PT.zip has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceac00.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/cecn02.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/cecn06.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceis00.jad --- /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 + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceis09.jad --- /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 + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceis14.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/cejp04.jad --- /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 + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceko01.jad --- /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 + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/cems01.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/cems11.jad --- /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 + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceut03.jad Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut03.jad has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceut04.jad Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut04.jad has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceut08.jad Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut08.jad has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/ceut09.jad Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/ceut09.jad has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/einstein_EN_FR_IT_DE_ES_N97_v2942.jar Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/einstein_EN_FR_IT_DE_ES_N97_v2942.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/javahelper.mif Binary file javamanager/javainstaller/installer/tsrc/testdata/utils/javahelper.mif has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/mine_en_fr_de_it_es_ES_pt_PT.jad --- /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 + GA1UEAxMYTm9raWEgQ29udGVudCBTaWduaW5nIENBMB4XDTA1MDIyMTE0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MIDlet-Jar-RSA-SHA1: ncuy0soEPUB4OPGHNyLn1ldXU2FvKvs0bUKGn/aPQefKI15aOlrczlapIWreUukE3ArQImU/xwxWh0 + Q8LROEULJKXRIYyoGCCblM6o6EPYn+YT+CDd/HV8JlHS6OO+sAV//9vWuo9orIwSwdKN8wGl0g1JmPl8LF8V5/MjSmyh8= \ No newline at end of file diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testdata/utils/utf8bom.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/build/build.xml --- /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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/build/readme.txt --- /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: + + + +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. diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld.jar Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_8mb.jad --- /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:///notify?tID=900_success +MIDlet-Delete-Notify: http:///notify?tID=912_deletion diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_8mb.jar Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_8mb.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_ota.jad --- /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:///notify?tID=900_success +MIDlet-Delete-Notify: http:///notify?tID=912_deletion diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_redirect.jad --- /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:///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:///notify?tID=900_success diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_redirect.jar Binary file javamanager/javainstaller/installer/tsrc/testserver/content/HelloWorld_redirect.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/META-INF/MANIFEST.MF --- /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: + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/META-INF/context.xml --- /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 @@ + + + + \ No newline at end of file diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/WEB-INF/web.xml --- /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 @@ + + + + installertest + + + + redirect + redirect + com.nokia.mj.impl.installer.testserver.RedirectServlet + + + redirect + /redirect + + + + + jad + jad + com.nokia.mj.impl.installer.testserver.JadServlet + + + jad + *.jad + + + + + notify + notify + com.nokia.mj.impl.installer.testserver.NotifyServlet + + + notify + /notify + + + + + + /httpauth/* + + + guest + + + + BASIC + httpauth + + + + guest + + + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/httpauth/HelloWorld_http_auth.jad --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/content/httpauth/HelloWorld_http_auth.jar Binary file javamanager/javainstaller/installer/tsrc/testserver/content/httpauth/HelloWorld_http_auth.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/JadServlet.java --- /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("", request.getServerName() + + ":" + request.getServerPort()); + line = line.replaceAll("", + 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); + } + +} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/NotifyServlet.java --- /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); + } + +} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installer/tsrc/testserver/javasrc/com/nokia/mj/impl/installer/testserver/RedirectServlet.java --- /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); + } + +} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUi.java --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/InstallerUiFactory.java --- 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; } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javainstaller.pro --- 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" diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/build/javasifplugin.mmp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/inc/asyncwaitcallback.h --- /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 + +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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/inc/javasifplugin.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 +#include #include +#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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/src/asyncwaitcallback.cpp --- /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(); +} + diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/src/javasifplugin.cpp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/javasifplugin/tsrc/src.s60/main.cpp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javainstaller/subsystem.mk --- 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 = diff -r 35baca0e7a2e -r 023eef975703 javamanager/javamanager.pro --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javarecognizer/build/recjar.mmp --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javaregistry/build/eabi/javaregistryclientu.def --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javaregistry/client/src/writeablejavaregistry.cpp --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/javaregistry/client/src/writeablejavaregistryentry.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javaregistry/legacy/server/src/javaregstore.cpp --- 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 { diff -r 35baca0e7a2e -r 023eef975703 javamanager/javaregistry/tsrc/data/HelloWorld2.jar Binary file javamanager/javaregistry/tsrc/data/HelloWorld2.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/build/javaapplicationsettingsview.pro --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/inc/applicationsettingsview.h --- 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 -#include - -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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.cpp --- 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& 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& 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::getHighRiskList() const -{ - return iHighRiskList; -} - -void JavaApplicationSettings::setHighRiskList(const QList& aHighRiskList) -{ - iHighRiskList = aHighRiskList; -} - -const QList& JavaApplicationSettings::getMutuallyExclusiveList() const -{ - return iMutuallyExclusiveList; -} - -void JavaApplicationSettings::setMutuallyExclusiveList(const QList& 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& 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; -} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettings.h --- 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 -#include -#include -#include -#include -#include - -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&); - JavaApplicationSettings(const QString&, - const QStringList&, - const std::wstring&, - const std::string&, - const std::vector&, - 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& getHighRiskList() const; - void setHighRiskList(const QList&); - const QList& getMutuallyExclusiveList() const; - void setMutuallyExclusiveList(const QList&); - const std::wstring& getColumnName(); - const std::string& getTableName(); - const std::wstring& getValuesColumnName(); - const std::wstring& getFilterColumnName(); - const std::wstring& getFilterColumnValue(); - const std::vector& getStorageValues(); - void setStorageValuesFilter(const std::wstring&); - const std::wstring& getStorageValuesFilter(); - void connectToUi(); - void disconnectFromUi(); - bool isConnectedToUi(); - -private: - QString iName; - QStringList iValues; - HbDataFormModelItem * iId; - QList iHighRiskList; - QList iMutuallyExclusiveList; - int iCurrentValue; - std::wstring iColumnName; - std::string iTableName; - std::vector iStorageValues; - std::wstring iStorageValuesFilter; - std::wstring iValuesColumnName; - std::wstring iFilterColumnName; - std::wstring iFilterColumnValue; - bool connectedToUi; -}; - -#endif // JAVAAPPLICATIONSETTINGS_H diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview.h --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.cpp --- 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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#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 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< 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 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 settingsIndexes; - for(int i=0; i highRiskList; - QStringList highRiskSettingsNames; - highRiskSettingsNames - < mutuallyExclusiveList; - QStringList mutuallyExclusiveSettingsNames; - mutuallyExclusiveSettingsNames - <& settings, HbDataFormModelItem * parent) -{ - for (int i=0; iappendDataFormItem( - 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(itemToWidget(settings.getId())); - settingsCombo->setCurrentIndex(currentValue); - return; - } - } - settings.setCurrentValue(newValue); - writeToStorage(settings); - } -} - -bool JavaApplicationSettingsViewPrivate::blanketAllowed(const JavaApplicationSettings &settings) -{ - // handle the high risk items - QList 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; igetValue(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 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; igetValue( - 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; jsetCurrentValue(selectedValue); - HbComboBox * settingsCombo = static_cast(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(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(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= 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(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 listItems; - listItems |= CmApplSettingsUi::ShowDestinations; - listItems |= CmApplSettingsUi::ShowConnectionMethods; - - // empty filter -> all bearer types included - QSet 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( - mainForm->model())->itemFromIndex(dataItemIndex); - int itemType = item->data(HbDataFormModelItem::ItemTypeRole).toInt(); - HbComboBox * comboBox = NULL; - HbPushButton * pushButton = NULL; - HbWidget * widget = (qobject_cast - (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(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(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& allSettings) -{ - for (int i=0; i (mainForm->itemByIndex( - model->indexFromItem(item))); - if (viewItem) - { - return static_cast(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& list, const QStringList& settingsNames, const QHash& settingsIndexes) -{ - for(int i=0; i& list, const QHash& 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 storageValues = settings.getStorageValues(); - for (int i=0; i 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 JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::string& aPrimaryTableName, const std::string& aSecondaryTableName) -{ - vector values; - - // hash for associating settings names with display indexes: - // a settings with lower index is shown before a settings - // with a higher index - QHash 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/appsettingsview_qt/src/javaapplicationsettingsview_p.h --- 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 -#include -#include -#include -#include -#include -#include -#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& 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& 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 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&, const QStringList&, const QHash&); - void attachList(const QString& settingsName, const QList&, const QHash&, bool isHighRiskList = true); - void installTranslator(const QString& translationFileName); - -private: - HbDataForm * mainForm; - HbDataFormModel *model; - HbDataFormModelItem * generalSettingsGroup; - HbDataFormModelItem * securitySettingsGroup; - QVector generalSettings; - QVector securitySettings; - QVector extraSettings; - JavaApplicationSettingsView* iPublicView; - std::auto_ptr 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 translators; -}; - - -#endif // JAVAAPPLICATIONSETTINGSVIEW_P_H diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/javasettings.pro --- 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" diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings/subsystem.mk --- 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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/build/javaapplicationsettingsview.pro --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/applicationsettingsview.h --- /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 +#include + +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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettings.cpp --- /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& 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& 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::getHighRiskList() const +{ + return mHighRiskList; +} + +void JavaApplicationSettings::setHighRiskList(const QList& aHighRiskList) +{ + mHighRiskList = aHighRiskList; +} + +const QList& JavaApplicationSettings::getMutuallyExclusiveList() const +{ + return mMutuallyExclusiveList; +} + +void JavaApplicationSettings::setMutuallyExclusiveList(const QList& 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& 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; +} diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettings.h --- /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 +#include +#include +#include +#include +#include + +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& aStorageValues); + JavaApplicationSettings(const QString& aName, + const QStringList& aValues, + const std::wstring& aColumnName, + const std::string& aTableName, + const std::vector& 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& getHighRiskList() const; + void setHighRiskList(const QList& aHighRiskList); + const QList& getMutuallyExclusiveList() const; + void setMutuallyExclusiveList(const QList& aMutuallyExclusiveList); + const std::wstring& getColumnName(); + const std::string& getTableName(); + const std::wstring& getValuesColumnName(); + const std::wstring& getFilterColumnName(); + const std::wstring& getFilterColumnValue(); + const std::vector& 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 mHighRiskList; + QList mMutuallyExclusiveList; + int mCurrentValue; + std::wstring mColumnName; + std::string mTableName; + std::vector mStorageValues; + std::wstring mStorageValuesFilter; + std::wstring mValuesColumnName; + std::wstring mFilterColumnName; + std::wstring mFilterColumnValue; + bool mConnectedToUi; +}; + +} // namespace settings +} // namespace java + +#endif // JAVAAPPLICATIONSETTINGS_H diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettingsview.cpp --- /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); diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettingsview.h --- /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 diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettingsview_p.cpp --- /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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#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 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< storageValues; + settingsValues = QStringList(); + storageValues.clear(); + settingsValues< 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 highRiskList; + QStringList highRiskSettingsNames; + highRiskSettingsNames + < mutuallyExclusiveList; + QStringList mutuallyExclusiveSettingsNames; + mutuallyExclusiveSettingsNames + <& aSettings, HbDataFormModelItem * aParent) +{ + for (int i=0; iappendDataFormItem( + 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(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 highRiskList = aSettings.getHighRiskList(); + // go through the list and see if any of the setings are in blanket + for (int i=0; igetValue(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 mutuallyExclusiveList = aSettings + .getMutuallyExclusiveList(); + // go through the list and see if any of the setings are in blanket + for (int i=0; igetValue( + 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; jsetCurrentValue(selectedValue); + HbComboBox * settingsCombo = static_cast(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(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(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= 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(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 listItems; + listItems |= CmApplSettingsUi::ShowDestinations; + listItems |= CmApplSettingsUi::ShowConnectionMethods; + + // empty filter -> all bearer types included + QSet 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( + 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 + (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(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(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& aAllSettings) +{ + for (int i=0; i (mMainForm->itemByIndex( + mModel->indexFromItem(aItem))); + if (viewItem) + { + return static_cast(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& aList, const QStringList& aSettingsNames, const QHash& aSettingsIndexes) +{ + for(int i=0; i& aList, const QHash& 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 storageValues = aSettings.getStorageValues(); + for (int i=0; i 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 JavaApplicationSettingsViewPrivate::readFromStorage(const std::wstring& aColumnName, const std::string& aPrimaryTableName, const std::string& aSecondaryTableName) +{ + vector 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" diff -r 35baca0e7a2e -r 023eef975703 javamanager/javasettings_qt/src/javaapplicationsettingsview_p.h --- /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 +#include +#include +#include +#include +#include +#include +#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& 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& 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 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& aList, const QStringList& aSettingsNames, const QHash& aSettingsIndexes); + void attachList(const QString& aSettingsName, const QList& aList, const QHash& aSettingsIndexes, bool isHighRiskList = true); + void configureLists(); + void installTranslator(const QString& aTranslationFileName); + +private: + HbDataForm * mMainForm; + HbDataFormModel *mModel; + HbDataFormModelItem * mGeneralSettingsGroup; + HbDataFormModelItem * mSecuritySettingsGroup; + QVector mGeneralSettings; + QVector mSecuritySettings; + QVector mExtraSettings; + JavaApplicationSettingsView* mPublicView; + std::auto_ptr 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 mTranslators; + QHash mLocalizedSettingsNames; + // hash for associating settings names with indexes within + // vectors (mGeneralSettings, mSecuritySettings) + QHash mSettingsIndexes; + // hash for associating settings names with display indexes: + // a settings with lower index is shown before a settings + // with a higher index + QHash mSettingsNamesIndexes; +}; + +} // namespace settings +} // namespace java + + +#endif // JAVAAPPLICATIONSETTINGSVIEW_P_H diff -r 35baca0e7a2e -r 023eef975703 javamanager/preinstaller/src.s60/silentmidletinstall.cpp --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javamanager/subsystem.mk --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/installer/starterdll/src/main.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/javaruntimes.pro --- 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" diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/Main.java --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java --- 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); } diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/StorageAccessor.java --- 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); } } } diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/midp/runtimestarter/src/midpruntimestarter.cpp --- 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 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); } diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/starter/build/javamidp.pro --- /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) diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/starterutils/build/exports.inf --- 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 diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/starterutils/inc/jvmstarter.h --- 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. diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/starterutils/src.s60/j9starters60.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/starterutils/src.s60/j9starters60.h --- 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 /** diff -r 35baca0e7a2e -r 023eef975703 javaruntimes/subsystem.mk --- 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 diff -r 35baca0e7a2e -r 023eef975703 javatools/javasecuritycustomization/policyeditor/bin/securitypolicyeditor.jar Binary file javatools/javasecuritycustomization/policyeditor/bin/securitypolicyeditor.jar has changed diff -r 35baca0e7a2e -r 023eef975703 javatools/javasecuritycustomization/policyeditor/javasrc/com/nokia/mj/tools/security/midp/PolicyEditor.java --- 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 + // if found then use those settings, otherwise use the unconfirmed settings + for(int i=0; iGetArrayLength(aArgs); char** installerArgs = new char*[args]; diff -r 35baca0e7a2e -r 023eef975703 javatools/tckrunner/starter/src/main.cpp --- 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); diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/build/build.xml --- 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 @@ - - - - - - - modulation 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 modulation 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. TunerControl specifies - * predefined constants MODULATION_FM and MODULATION_AM - * but other modulations can be supported as well. Supported modulations can be queried - * by System property tuner.modulations. - * - * @throws IllegalArgumentException if freq is not inside the frequency band supported - * by the device or if the modulation is not supported or the modulation 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; - } - - /** - *

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.

- * - *

After seeking, the frequency of the Player is the one that - * was returned or if nothing was found, the original frequency.

- * - * @param startFreq the frequency in 100 Hertzs wherefrom the scan starts (inclusive) - * - * @param modulation The modulation to be used. TunerControl specifies - * predefined constants MODULATION_FM and MODULATION_AM - * but other modulations can be supported as well. Supported modulations can be queried - * by System property tuner.modulations. - * @param upwards if true, 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 startFreq is not between the supported minimum - * and maximum frequencies or if the modulation 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 true if squelch is on or false 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 true to turn the squelch on or false 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 MONO, - * STEREO or AUTO. - */ - 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 MONO, - * STEREO or AUTO. - * @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 usePreset call do not tune the tuner automatically. - * - * @param preset the preset to be used. - * @throws IllegalArgumentException if preset < 1 or preset > 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 preset < 1 or preset > 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, IllegalArgumentException 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 preset < 1 or preset > number of presets or - * freq or modulation are not available or if the modulation is null or if stereoMode 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 preset < 1 or preset > 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 preset < 1 or preset > 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 - * MONO, STEREO or AUTO. - * @throws IllegalArgumentException if preset < 1 or preset > 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 String containing the preset name. - * @throws IllegalArgumentException if preset < 1 or preset > 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 preset < 1 or preset > number of presets or - * if the name 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); - - -} diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/javasrc/com/nokia/microedition/media/protocol/capture/radio/Protocol.java --- 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); -} diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/external_include/fmradioenginecrkeys.h --- 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 - - diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/external_include/tuner.h --- 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 -#include -#include -#include -#include -#include -#include -#include -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& 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& 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& 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& 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& 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& 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& 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& 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 all 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 - -#endif // TUNER_H - -// End of file - diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/external_include/tuner.inl --- 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 - -#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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/inc/cammstunercontrol.h --- 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 -#include - -#include - - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/inc/cammstunerplayer.h --- 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 -#include "CAMMSTunerControl.h" - -#include -#include - - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/inc/cammstunerpresetshandler.h --- 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 -#include - - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/inc/cammstunervolumecontrol.h --- 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 - -#include - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/inc/tammstunerpreset.h --- 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 - - -// 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 iPresetName; - TInt iPresetFrequency; - TInt iPresetStereoMode; - -}; - -#endif // TAMMSTUNERPRESET_H - -// End of File diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/ammstunerfactory.cpp --- 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 - -#include -#include -#include - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/cammstunercontrol.cpp --- 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 -#include - - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/cammstunerplayer.cpp --- 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 -#include - - -// ============================ 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/cammstunerpresetshandler.cpp --- 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 -#include -#include - - -// 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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/cammstunervolumecontrol.cpp --- 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 - - -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 diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/protocol.cpp --- 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 -#include - -// INTERNAL INCLUDES -#include "com_nokia_microedition_media_protocol_capture_radio_Protocol.h" -#include -#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(tunerPlayer); -} - diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/tammstunerpreset.cpp --- 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 -#include - - -// ============================ 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; - iPresetFrequency = aStream.ReadUint32L(); - iPresetStereoMode = aStream.ReadUint32L(); -} - -// End of File diff -r 35baca0e7a2e -r 023eef975703 javauis/amms_qt/src_tuner/native/src/tunercontrol.cpp --- 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 - -// INTERNAL INCLUDES -#include "com_nokia_amms_control_tuner_TunerControlImpl.h" -#include -#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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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(aEventSourceHandle); - - CAMMSTunerControl* nativeHandle = - reinterpret_cast(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 diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/build/eswtqt/build.xml --- 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 @@ + - + diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/eswtuitestutils/javasrc/com/nokia/mj/impl/uitestutils/S60Utils.java --- 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"); } /** diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch --- /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 @@ + + + + + + + + + + + + + + diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/.cvsignore --- /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* diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/animations.pro --- /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 \ diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/build.xml --- /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 @@ + + + + + + + + + diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/os.cpp --- /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 +#include +#include +#include +#include +#include +#include + +using namespace Java::eSWT; + +#define OS_NATIVE(func) Java_org_eclipse_swt_animation_internal_qt_OS_##func + +#define POINTER_TO_HANDLE(pointer) reinterpret_cast(static_cast(pointer)) +#define HANDLE_TO_POINTER(type, variable, handle) type variable = qobject_cast(static_cast(reinterpret_cast( 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(reinterpret_cast( 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(aX), static_cast(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(aX), static_cast(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(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(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(aType) ); + } + SWT_CATCH + return reinterpret_cast(easing); + + } + +#ifdef __cplusplus +} +#endif + diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Animation/qt/library/swt.h --- /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_ + diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT Browser/qt/org/eclipse/swt/browser/QtWebKit.java --- 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, diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/common/version.txt --- /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 diff -r 35baca0e7a2e -r 023eef975703 javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/MobileDevice.java --- 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 0 && activeScreenId aCount){ - // screen removed - int screenHandle = 0; - for(int j=0; j