--- a/build/Makefile.comp Fri Oct 15 12:29:39 2010 +0300
+++ b/build/Makefile.comp Fri Oct 29 11:49:32 2010 +0300
@@ -21,7 +21,7 @@
include $(JAVA_SRC_ROOT)/build/Makefile.defs
-.PHONY: build_clean_java build_qmake build_clean_native really_clean_native clean_qmake qmakehelp emmareport
+.PHONY: build_clean_java build_qmake build_clean_native really_clean_native clean_qmake qmakehelp emmareport coberturareport
PRO_FILE = $(wildcard *.pro)
@@ -71,7 +71,7 @@
build_java:
$(PHASEINFO)
ifndef SBOX_CPUTRANSPARENCY_LOG
- $(ANT) -Dtarget.platform=$(PLATFORM) -Dtarget.cfg=$(VARIANT) $(ANT_PROJECT_DEFINES) $(ANT_EMMA_DEFINES)
+ $(ANT) -Dtarget.platform=$(PLATFORM) -Dtarget.cfg=$(VARIANT) $(ANT_PROJECT_DEFINES) $(ANT_EMMA_DEFINES) $(ANT_COBERTURA_DEFINES)
endif
build_clean_java:
@@ -91,6 +91,11 @@
$(ANT) -f $(JAVA_SRC_ROOT)/build/emmautilities.xml -Dset.emma.enabled=true emma.report
endif
+coberturareport:
+ifndef SBOX_CPUTRANSPARENCY_LOG
+ $(ANT) -f $(JAVA_SRC_ROOT)/build/coberturautilities.xml -Dset.cobertura.enabled=true cobertura.report
+endif
+
# Add the pro-file to the subdirs of enclosing component. Must define the file
# explicitly when directory (==build) is differntly named from pro-file.
configure_qmake:
--- a/build/Makefile.project Fri Oct 15 12:29:39 2010 +0300
+++ b/build/Makefile.project Fri Oct 29 11:49:32 2010 +0300
@@ -129,6 +129,11 @@
PROJECT_DEFINES += RD_JAVA_S60_RELEASE_5_0_IAD
endif
+ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+ # build ROMized 5.0 release
+ PROJECT_DEFINES += RD_JAVA_S60_RELEASE_5_0_ROM
+endif
+
# Define stdcpp version
ifneq ($(wildcard $(EPOCROOT)epoc32/release/armv5/urel/libstdcppv5.dll),)
RD_JAVA_STDCPPV5 = 1
@@ -228,6 +233,15 @@
ANT_EMMA_DEFINES += -Dset.emma.enabled=true
endif
+# Enables cobertura instrumentation for Java code coverage measurement.
+ifdef COBERTURA
+ ANT_COBERTURA_DEFINES += -Dset.cobertura.enabled=true
+ COBERTURA_HOME=$(JAVA_SRC_ROOT)/../tools/cobertura
+ ifeq ($(wildcard $(COBERTURA_HOME)),)
+ $(error Can not find $(COBERTURA_HOME) directory - cannot instrument with cobertura)
+ endif
+endif
+
#ifdef SHOW_MIDP_EXIT_FAILURE
PROJET_DEFINES += RD_JAVA_EXIT_ERROR_DIALOG
#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/buildutils/armsize.py Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,186 @@
+#!/usr/bin/python
+#
+# 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:
+# This utility is used to find out the size in disk of files
+# written to ROM images (or compiled). Script finds out Symbian
+# build enviornment binary file paths based on iby-file(s) or
+# mmp-files, and prints out file sizes.
+#
+# Run the script with option --help to see the parameters
+
+import os.path, fnmatch, re, subprocess, glob
+from optparse import OptionParser
+from itertools import chain
+
+RE_MMP_TARGET = re.compile(r"\s*TARGET\s+(\S+)", re.IGNORECASE)
+RE_DEFINE = re.compile(r"^define\s*(\S+)\s+(\S+)\s*$", re.IGNORECASE)
+RE_IBYTARGET = re.compile(r"^(?:file|data)=(\S+)\s+\S+\s*$", re.IGNORECASE)
+
+# Base defines used in IBY files
+BASE_DEFINES = [("ABI_DIR", r"\epoc32\release\armv5"),
+ ("BUILD_DIR", r"urel"),
+ ("DATAZ_", r"\epoc32\data\z"),
+ ("RESOURCE_FILES_DIR", r"resource"),
+ ("ZRESOURCE", r"DATAZ_\resource"),
+ ("ZSYSTEM", r"DATAZ_\system"),
+ ("ZPRIVATE", r"DATAZ_\private")]
+
+def flatten(listOfLists):
+ return list(chain(*listOfLists))
+
+def cppFile(source, cppDefines = None, include = None):
+ ''' Preprocess source with epoc32/include, and return preprocessed lines '''
+ includePaths = [r"/epoc32/include"]
+
+ if cppDefines:
+ cppDefines = " ".join(["-D%s" % d for d in cppDefines])
+ else:
+ cppDefines = ""
+ if include:
+ path, filename = os.path.split(include)
+ includePaths.append(path)
+
+ include = "-include " + include
+
+ else:
+ include = ""
+
+ drive, tail = os.path.splitdrive(source)
+ command = r'cpp %s %s %s "%s"' % (" ".join(["-I %s" % i for i in includePaths]),
+ cppDefines, include, source)
+ process = subprocess.Popen(command,
+ shell = True,
+ cwd = "%s\\" % drive,
+ stdout = subprocess.PIPE)
+ for line in process.stdout.readlines():
+ yield line
+
+def replaceDefines(line, defines):
+ ''' Replace the macro definitions recursively '''
+ oldLine = None
+ while oldLine != line:
+ oldLine = line
+ for search, replace in defines:
+ line = line.replace(search, replace)
+ return line
+
+def parseIby(lines):
+ ''' Parse IBY file lines, using defines '''
+ defines = BASE_DEFINES[:]
+ for l in lines:
+ defineMatch = RE_DEFINE.match(l)
+ if defineMatch:
+ search, replace = defineMatch.groups()
+ defines.append((search, replace))
+ else:
+ yield replaceDefines(l, defines)
+
+def getIbySources(ibyfile, cppDefines = None, include = None):
+ ''' Get IBY file source files'''
+ drive, tail = os.path.splitdrive(ibyfile)
+ for l in parseIby(cppFile(ibyfile, cppDefines, include)):
+ match = RE_IBYTARGET.match(l)
+ if match:
+ yield drive + match.group(1)
+
+def findFiles(root, pattern):
+ ''' Find files recursively '''
+ for path, dirs, files in os.walk(root):
+ for f in fnmatch.filter(files, pattern):
+ yield os.path.join(path, f)
+
+def getMmpTarget(mmpfile):
+ ''' Get the target binary name from mmp-file '''
+ for l in open(mmpfile, "r").readlines():
+ match = RE_MMP_TARGET.search(l)
+ if match:
+ return match.group(1)
+ return None
+
+def getMmpTargets(mmpRoot):
+ ''' Get the target binary paths of all mmp-files found under root '''
+ drive, tail = os.path.splitdrive(mmpRoot)
+
+ totalSize = 0
+ for mmp in findFiles(mmpRoot, "*.mmp"):
+ target = getMmpTarget(mmp)
+ if not target:
+ continue
+ binPath = drive + "/epoc32/release/armv5/urel/" + target
+ if os.path.exists(binPath):
+ yield binPath
+
+def getSizes(binaries):
+ ''' Get the sizes of given files, return list of tuples (size|None, file) '''
+ for binPath in binaries:
+ if not os.path.exists(binPath):
+ yield None, binPath
+ else:
+ yield os.path.getsize(binPath), binPath
+
+def printSizes(sizes):
+ ''' Print file sizes and a total '''
+ totalSize = 0
+ for size, binPath in sizes:
+ if size:
+ totalSize = totalSize + size
+
+ print "%s\t%s" % (size, binPath)
+
+ print "%d\tTotal" % totalSize
+
+def main():
+ parser = OptionParser()
+ parser.add_option(
+ "--mmproot", dest = "mmproot",
+ help = "root for searching mmp-files (whose target is used for filenames)")
+ parser.add_option(
+ "--ibyfile", dest = "ibyfile",
+ help = "ibyfile(s) which are processed to find out target file paths")
+ parser.add_option(
+ "--sortname", dest = "sortname", action = "store_true", default = False,
+ help = "sort files by name")
+ parser.add_option(
+ "--sortsize", dest = "sortsize", action = "store_true", default = False,
+ help = "sort files by size")
+ parser.add_option(
+ "--cppdefines", dest = "cppdefines",
+ help = "cpp defines for iby, e.g. --cppdefines __JAVA,__JAVA_MIDP20")
+ parser.add_option(
+ "--include", dest = "include",
+ help = "Include file for iby cpp, e.g. --include /epoc32/include/config/ncp52/bldpublic.hrh")
+ (options, args) = parser.parse_args()
+
+ if options.mmproot:
+ binaries = getMmpTargets(options.mmproot)
+
+ elif options.ibyfile:
+ cppdefines = options.cppdefines and options.cppdefines.split(",")
+
+ ibys = glob.glob(options.ibyfile)
+ binaries = flatten([getIbySources(iby, cppdefines, options.include)
+ for iby in ibys])
+
+ sizes = getSizes(binaries)
+
+ if options.sortsize:
+ sizes = sorted(sizes)
+ if options.sortname:
+ sizes = sorted(sizes, cmp=lambda x,y: cmp(x[1], y[1]))
+
+ printSizes(sizes)
+
+if __name__ == "__main__":
+ main()
--- a/build/buildutils/distribution.policy.s60.configuration.txt Fri Oct 15 12:29:39 2010 +0300
+++ b/build/buildutils/distribution.policy.s60.configuration.txt Fri Oct 29 11:49:32 2010 +0300
@@ -12,22 +12,23 @@
# Always use slash ('/') as a path separator in this file
# and do not end path definitions with a slash.
+DEFAULT_POLICY : 7
+ROOT_POLICY : 7
/.svn : IGNORE
/swt/internal : 7
/swt/animation/internal : 7
/swt/expanded/internal : 7
/swt/mobile/internal : 7
-/nokiauiapi_qt/javasrc/com/nokia/mid/ui/internal : 7
+/nokiauiapi_qt/javasrc/com/nokia/mid/ui/internal : 7
/internal : 1
/releng : 1
ROOT/tools : 1
-ROOT/javacommons/jvms/j9/s60 : 810
+/jrt_plat/java_registry_api/doc : 1
+/CgfxTestRunner : 1
+/nokiatests : 1
+/broadcast_stub/javasrc : 0
+/javaextensions/ccapi : 0
+/javacommons/jvms/j9/s60 : 810
/midprms : 102
/webservices/javasrc : 102
/webservices/tsrc : 102
-/CgfxTestRunner : 1
-/nokiatests : 1
-/broadcast_stub/javasrc : 1
-DEFAULT_POLICY : 7
-ROOT_POLICY : 7
-ROOT/javaextensions/ccapi : 0
--- a/build/buildutils/omake.bat Fri Oct 15 12:29:39 2010 +0300
+++ b/build/buildutils/omake.bat Fri Oct 29 11:49:32 2010 +0300
@@ -19,13 +19,14 @@
rem Determine java root
setlocal
set JAVA_SRC_ROOT=
+set RECURSION=. .. ..\.. ..\..\.. ..\..\..\.. ..\..\..\..\.. ..\..\..\..\..\.. ..\..\..\..\..\..\.. ..\..\..\..\..\..\..\.. ..\..\..\..\..\..\..\..\.. ..\..\..\..\..\..\..\..\..\..
rem See if we are within jrt package (indepent of actual location)
-for %%a in (. .. ..\.. ..\..\.. ..\..\..\.. ..\..\..\..\.. ..\..\..\..\..\.. ..\..\..\..\..\..\..) do if "%JAVA_SRC_ROOT%" == "" if exist %%a\build\Makefile.comp call :setroot %%a
+for %%a in (%RECURSION%) do if "%JAVA_SRC_ROOT%" == "" if exist %%a\build\Makefile.comp call :setroot %%a
if not "%JAVA_SRC_ROOT%" == "" goto resolved
rem See if we are within jrtext package co-located with jrt (indepent of actual location)
-for %%a in (. .. ..\.. ..\..\.. ..\..\..\.. ..\..\..\..\.. ..\..\..\..\..\.. ..\..\..\..\..\..\..) do if "%JAVA_SRC_ROOT%" == "" if "%%~nxa" == "jrtext" if exist %%a\build\omj.pri if exist %%a\..\jrt\build\Makefile.comp call :setroot %%a\..\jrt
+for %%a in (%RECURSION%) do if "%JAVA_SRC_ROOT%" == "" if "%%~nxa" == "jrtext" if exist %%a\build\omj.pri if exist %%a\..\jrt\build\Makefile.comp call :setroot %%a\..\jrt
if not "%JAVA_SRC_ROOT%" == "" goto resolved
rem See if this is subdirectory within \ext\app\jrtext
--- a/build/buildutils/svn2ccm_v3.py Fri Oct 15 12:29:39 2010 +0300
+++ b/build/buildutils/svn2ccm_v3.py Fri Oct 29 11:49:32 2010 +0300
@@ -28,11 +28,10 @@
# 2) Creates S60 distribution policies to <svn_path> directory
# using setpolicyfiles.py script.
# 3) Makes CCM sync and reconf for the CCM project.
-# 4) Creates CCM default task.
-# 5) Synchronizes the <svn_path> and <ccm_path> directories.
-# 6) If there were any changes, reconciles CCM project to database
-# and commits CCM default task. If there were no changes, leaves
-# the CCM default task open.
+# 4) Synchronizes the <svn_path> and <ccm_path> directories.
+# 5) If there were any changes, creates CCM default task,
+# reconciles CCM project to database and commits CCM
+# default task.
#
# The script execution aborts immediately if any error occurs.
# In this case the user must manually delete the ccm task and
@@ -94,8 +93,9 @@
"\.cproject$": "xml",
"\.crml$": "xml",
"\.gcfml$": "xml",
+ "\.der$": "binary",
+ "\.dm$": "binary",
"\.dr$": "binary",
- "\.der$": "binary",
"\.flm$": "makefile",
"\.javaversion$": "ascii",
"\.jupiter$": "xml",
@@ -238,13 +238,6 @@
print "SVN2CCM: Reconfiguring CCM project", datetime.datetime.now()
execute(["ccm", "reconf", "-r", "-p", quote_str(ccm_project_id)])
- # Create CCM task.
- print "SVN2CCM: Creating CCM task", datetime.datetime.now()
- if opts.ccm_description_file:
- execute(["ccm", "task", "-create", "-default", "-release", quote_str(ccm_project_release), "-descriptionfile", quote_str(opts.ccm_description_file), "-synopsis", get_comment_string()])
- else:
- execute(["ccm", "task", "-create", "-default", "-release", quote_str(ccm_project_release), "-description", get_comment_string(), "-synopsis", get_comment_string()])
-
# Synchronize the SVN and CCM directories.
print "SVN2CCM: Synchronizing from %s to %s %s" % \
(svn_path, ccm_path, str(datetime.datetime.now()))
@@ -255,6 +248,12 @@
sync_dirs(svn_path, ccm_path, opts.ignore, opts.ignore_all + [".svn"])
if ccm_counter.changes_made():
+ # Create CCM task.
+ print "SVN2CCM: Creating CCM task", datetime.datetime.now()
+ if opts.ccm_description_file:
+ execute(["ccm", "task", "-create", "-default", "-release", quote_str(ccm_project_release), "-descriptionfile", quote_str(opts.ccm_description_file), "-synopsis", get_comment_string()])
+ else:
+ execute(["ccm", "task", "-create", "-default", "-release", quote_str(ccm_project_release), "-description", get_comment_string(), "-synopsis", get_comment_string()])
# Reconcile CCM project.
print "SVN2CCM: Reconciling CCM project", datetime.datetime.now()
execute(["ccm", "reconcile", "-r", "-cu", "-mwaf", "-update_db", "-p", quote_str(ccm_project_id)])
@@ -266,7 +265,7 @@
execute(["ccm", "task", "-ci", "default"])
else:
# No changes, do not reconcile or commit.
- print "SVN2CCM: WARNING: No changes, leaving CCM task open"
+ print "SVN2CCM: WARNING: No changes found"
# Finished.
ccm_counter.stop_time = datetime.datetime.now()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/coberturautilities.xml Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,151 @@
+<!--
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+-->
+
+<project name="CoberturaUtilities">
+
+ <import file="properties.xml"/>
+
+ <!--
+ Steps to generate Cobertura coverage report in Symbian^x:
+
+ 1) Build component with cobertura instrumentation from component build dir:
+
+ cd component_build_dir
+ make -f $JAVA_SRC_ROOT/build/Makefile.comp clean
+ make -f $JAVA_SRC_ROOT/build/Makefile.comp COBERTURA=1
+
+ Note that you can also instrument the whole build if necessary:
+
+ cd $JAVA_SRC_ROOT
+ make -f subsystem.mk reallyclean
+ make -f subsystem.mk COBERTURA=1
+
+ 2) Run the tests from component test build dir:
+
+ cd component_tsrc_build_dir
+ ant run
+
+ 3) Generate coverage report:
+
+ cd component_build_dir
+ make -f $JAVA_SRC_ROOT/build/Makefile.comp coberturareport
+
+ Reports are generated into /tmp/cobertura/results/index.html.
+ in firefox issue command:
+
+ firefox /tmp/cobertura/results/index.html
+
+ 4) To reset coverage measurement, remove all other files from
+ /tmp/coverage except *_instr.ser
+
+ -->
+
+ <!-- Begin definitions for cobertura. -->
+
+ <!-- Location for cobertura tool. -->
+ <property name="cobertura.dir" value="${java.src.root}/../tools/cobertura"/>
+
+ <!-- Directory for cobertura coverage data. -->
+ <property name="cobertura.coverage.dir" location="/tmp/cobertura"/>
+
+ <!-- Cobertura jar files. -->
+ <property name="cobertura.runtime.jar" value="cobertura4j2me-runtime.jar"/>
+ <property name="cobertura.classpath" location="${cobertura.dir}/${cobertura.runtime.jar}"/>
+ <property name="cobertura.ant.classpath" location="${cobertura.dir}/cobertura4j2me.jar"/>
+
+ <!-- Coverage result data directory. -->
+ <property name="cobertura.emulator.path" location="/epoc32/winscw/c/logs/java"/>
+ <!-- Coverage result data file. -->
+ <property name="cobertura.result.file" value="cobertura.ser"/>
+
+ <!-- Cobertura jars. -->
+ <path id="cobertura.lib">
+ <pathelement location="${cobertura.dir}/${cobertura.runtime.jar}"/>
+ <pathelement location="${cobertura.dir}/cobertura4j2me.jar"/>
+ </path>
+
+ <!-- Cobertura task definitions. -->
+ <taskdef resource="cobertura4j2me-tasks.properties" classpathref="cobertura.lib" />
+
+ <!-- Defines do.cobertura to be true for enabling cobertura tasks. -->
+ <target name="cobertura" depends="init.properties">
+ <property name="do.cobertura" value="true"/>
+ </target>
+
+ <!-- Copy cobertura JAR to correct place. -->
+ <target name="cobertura.deploy">
+ <copy file="${cobertura.dir}/${cobertura.runtime.jar}" todir="${bcp.dest.directory}"/>
+ </target>
+
+ <!-- Make cobertura instrumentation. -->
+ <target name="cobertura.instr" depends="cobertura, cobertura.deploy">
+ <echo message="Cobertura: instrumenting ${ant.project.name}"/>
+ <cobertura4j2me-instrument todir="${dst.dir}" keepdata="true" devicepath="c:/logs/java" datafile="${ant.project.name}_instr.ser">
+ <fileset dir="${dst.dir}" includes="**/*.class" />
+ </cobertura4j2me-instrument>
+ <!-- Move instrumentation file coverage work dir. -->
+ <move file="${ant.project.name}_instr.ser" todir="${cobertura.coverage.dir}" overwrite="false"/>
+ </target>
+
+ <!-- Add System property enabling coverage result writing at shut down -->
+ <target name="cobertura.systemprop">
+ <echo file="${component.root.dir}/properties.txt" append="true">jrt.shutdown.extension=com.nokia.mj.impl.rt.test.CoverageResultInvoker</echo>
+ </target>
+
+ <!-- Generate Cobertura coverage report. -->
+ <target name="cobertura.report">
+ <echo message="Creating coverage report." />
+
+ <!-- Copy coverage data file from the emulator to report directory -->
+ <copy file="${cobertura.emulator.path}/${cobertura.result.file}" todir="${cobertura.coverage.dir}"/>
+
+ <!-- Merge instrumentation and coverage data for reporting. -->
+ <echo message="Merge coverage data." />
+
+ <!-- Copy cobertura to result dir for merging. -->
+ <copy file="${cobertura.ant.classpath}" todir="${cobertura.coverage.dir}"/>
+
+ <!-- Copy cobertura for reporting. -->
+ <copy file="${cobertura.dir}/cobertura4j2me.properties" todir="${cobertura.coverage.dir}"/>
+ <copy file="${cobertura.dir}/res/build_ant.xml" todir="${cobertura.coverage.dir}"/>
+ <copy file="${cobertura.dir}/res/mergeResults.bat" todir="${cobertura.coverage.dir}"/>
+ <copy file="${cobertura.dir}/res/reportResults.bat" todir="${cobertura.coverage.dir}"/>
+ <copy todir="${cobertura.coverage.dir}/lib">
+ <fileset dir="${cobertura.dir}/lib"/>
+ </copy>
+
+ <!-- Must merge using batch file at local filesystem because of cobertura feature. -->
+ <exec executable="${cobertura.coverage.dir}/mergeResults.bat" dir="${cobertura.coverage.dir}" failonerror="true" />
+
+ <!-- Create coverage report. -->
+
+ <!-- Must create report using batch file at local filesystem because of cobertura feature. -->
+ <exec executable="${cobertura.coverage.dir}/reportResults.bat" dir="${cobertura.coverage.dir}" failonerror="true" >
+ <arg value="${java.src.root}" />
+ </exec>
+ </target>
+
+ <!-- Clean cobertura related files. -->
+ <target name="cobertura.clean">
+ <delete file="${bcp.dest.directory}/${cobertura.runtime.jar}"/>
+ <delete dir="${cobertura.coverage.dir}"/>
+ </target>
+
+ <!-- End definitions for cobertura. -->
+
+</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/build/coberturautilities_stub.xml Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,41 @@
+<!--
+#
+# 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: Cobertura stub build file.
+#
+-->
+
+<project name="CoberturaUtilities">
+
+ <property name="cobertura.classpath" value="" />
+ <property name="cobertura.ant.classpath" value="" />
+
+ <!-- Cobertura jars. -->
+ <path id="cobertura.lib" />
+
+ <!-- Make cobertura instrumentation. -->
+ <target name="cobertura.instr" if="not" />
+
+ <!-- Add System property enabling coverage result writing at shut down -->
+ <target name="cobertura.systemprop" if="not" />
+
+ <!-- Generate Cobertura coverage report. -->
+ <target name="cobertura.report" if="not" />
+
+ <!-- Clean cobertura related files. -->
+ <target name="cobertura.clean" if="not" />
+
+ <!-- End definitions for cobertura. -->
+
+</project>
--- a/build/makefile.javaversion Fri Oct 15 12:29:39 2010 +0300
+++ b/build/makefile.javaversion Fri Oct 29 11:49:32 2010 +0300
@@ -1,2 +1,2 @@
# Set Java version (must be dot separated, without spaces)
-JAVA_VERSION = 2.2.19
+JAVA_VERSION = 2.2.21
--- a/build/utilities.s60.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/build/utilities.s60.xml Fri Oct 29 11:49:32 2010 +0300
@@ -76,6 +76,7 @@
<!-- Path for JAPT classpath. Nonexistent files are skipped -->
<path id="japt.classpath">
<fileset file="${bcp}"/>
+ <fileset file="${cobertura.classpath}"/>
<fileset file="${int.bcp}"/>
<fileset file="${impl.cldc.jar}"/>
<fileset file="${impl.cdc.jar.classpath}"/>
--- a/build/utilities.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/build/utilities.xml Fri Oct 29 11:49:32 2010 +0300
@@ -66,13 +66,14 @@
<!-- Importing emma utilities for Java code coverage measurement. -->
<import file="emmautilities.xml"/>
-
-
-
+ <!-- Import cobertura utilities for Java code coverage measurement on Symbian. -->
+ <condition property="cobertura.import"
+ value="coberturautilities.xml"
+ else="coberturautilities_stub.xml">
+ <isset property="set.cobertura.enabled" />
+ </condition>
-
-
-
+ <import file="${cobertura.import}"/>
<!--STARTING POINTS START-->
@@ -229,6 +230,7 @@
</condition>
<ant target="${compile.target}"/>
+ <ant target="cobertura.instr" />
<ant target="finetune.classes"/>
<ant target="emma.instr"/>
<ant target="add.classes.to.collection.jar"/>
@@ -319,7 +321,8 @@
destdir="${dst.dir}"
debug="${javac.debug.on}"
debuglevel="lines,vars,source"
- bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}">
+ includeAntRuntime="false"
+ bootclasspath="${bcp}:${int.bcp}:${platform.api.jar}:${public.api.jar}${eswt.jar}:${cobertura.classpath}">
<!-- Uncomment the following line if you want to see Javac warnings. -->
<!-- <compilerarg value="-Xlint"/> -->
@@ -374,7 +377,7 @@
<!--ODC FILE START-->
<!--Generate the odc files -->
- <target name="generate.odc" depends="system.properties" unless="no.rommizing">
+ <target name="generate.odc" depends="system.properties,cobertura.systemprop" unless="no.rommizing">
<exec executable="python" failonerror="true">
<arg value="${java.src.root}/build/buildutils/generateOdcFile.py"/>
<arg value="${component.root.dir}/${odc.file.name}.odc"/>
@@ -532,7 +535,7 @@
<!--Do the cleaning-->
<target name="clean.impl" depends="init.properties, clean.from.collection.jars,
- emma.clean">
+ emma.clean, cobertura.clean">
<!--
<echo message = "target.platform = ${target.platform}"/>
<echo message = "target.cfg = ${target.cfg}"/>
@@ -624,24 +627,24 @@
<!--GENERATE JAVADOC START-->
<target name="javadoc" description="Create javadoc. Use -javadoc.dir=dir to override location">
<property name="javadoc.dir" value="javadoc" />
- <javadoc destdir="${javadoc.dir}"
- version="true"
- use="true"
+ <javadoc destdir="${javadoc.dir}"
+ version="true"
+ use="true"
defaultexcludes="true"
- windowtitle="Runtime API">
+ windowtitle="Runtime API">
- <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
- <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
- <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
- <include name="utils/javasrc/com/nokia/mj/impl/rt/ui/**/*.java"/>
- <include name="fileutils/javasrc/**/*.java"/>
- <include name="comms/javasrc/**/*.java"/>
- <include name="javastorage/javasrc/**/*.java"/>
- </fileset>
+ <fileset dir="${java.src.root}/javacommons/" defaultexcludes="yes">
+ <include name="utils/javasrc/com/nokia/mj/impl/rt/support/*.java"/>
+ <include name="utils/javasrc/com/nokia/mj/impl/utils/**/*.java"/>
+ <include name="utils/javasrc/com/nokia/mj/impl/rt/ui/**/*.java"/>
+ <include name="fileutils/javasrc/**/*.java"/>
+ <include name="comms/javasrc/**/*.java"/>
+ <include name="javastorage/javasrc/**/*.java"/>
+ </fileset>
- <doctitle><![CDATA[<h1>Runtime API</h1>]]></doctitle>
- <bottom><![CDATA[<i>Copyright © 2008 Nokia. All Rights Reserved.</i>]]></bottom>
- </javadoc>
+ <doctitle><![CDATA[<h1>Runtime API</h1>]]></doctitle>
+ <bottom><![CDATA[<i>Copyright © 2008 Nokia. All Rights Reserved.</i>]]></bottom>
+ </javadoc>
</target>
<!--GENERATE JAVADOC END-->
--- a/inc/build_defines.hrh Fri Oct 15 12:29:39 2010 +0300
+++ b/inc/build_defines.hrh Fri Oct 29 11:49:32 2010 +0300
@@ -15,8 +15,8 @@
*
*/
-#define RD_JAVA_VERSION 2,2,19
-#define RD_JAVA_BIN_VERSION_NONQT 10.531
+#define RD_JAVA_VERSION 2,2,21
+#define RD_JAVA_BIN_VERSION_NONQT 10.533
#define RD_JAVA_SYMBIAN_TARGET
#define RD_JAVA_S60_RELEASE_10_1
#define RD_JAVA_S60_RELEASE_10_1_ONWARDS
--- a/inc/build_defines.pri Fri Oct 15 12:29:39 2010 +0300
+++ b/inc/build_defines.pri Fri Oct 29 11:49:32 2010 +0300
@@ -13,5 +13,5 @@
#
# Description: Generated file - do not edit manually
#
-RD_JAVA_BIN_VERSION = 10.2.19
+RD_JAVA_BIN_VERSION = 10.2.21
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_PKG_SPLIT RD_JAVA_UI_QT RD_JAVA_STDCPPV5 RD_JAVA_EPOCALLOWDLLDATA_FIX RD_JAVA_HTTP_EMC_ENABLED RD_JAVA_NGA_ENABLED SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK RD_JAVA_PROXIMITY_LISTENER_ENABLED RD_JAVA_OPENC_BETA_PATCH OPENLCDUI_ENABLED RD_JAVA_OPENLCDUI_ENABLED RD_JAVA_INSTALLERUI_ENABLED RD_JAVA_PREWARM RD_JAVA_ADVANCED_TACTILE_FEEDBACK RD_JAVA_APPLICATION_SETTINGS_QT RD_JAVA_MIDPRMS_DB
--- a/inc/java.txt Fri Oct 15 12:29:39 2010 +0300
+++ b/inc/java.txt Fri Oct 29 11:49:32 2010 +0300
@@ -1,1 +1,1 @@
-2.2.19
+2.2.21
--- a/javacommons/comms/build/bwins/javacommsu.def Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/build/bwins/javacommsu.def Fri Oct 29 11:49:32 2010 +0300
@@ -28,9 +28,9 @@
?attachToVm@CommsEndpoint@comms@java@@UAEHPAUJNIEnv_@@@Z @ 27 NONAME ; int java::comms::CommsEndpoint::attachToVm(struct JNIEnv_ *)
?begin@CommsMessage@comms@java@@QAEXXZ @ 28 NONAME ; void java::comms::CommsMessage::begin(void)
?connect@CommsClientEndpoint@comms@java@@UAEHH@Z @ 29 NONAME ; int java::comms::CommsClientEndpoint::connect(int)
- ?detachFromVm@CommsClientEndpoint@comms@java@@UAEHXZ @ 30 NONAME ; int java::comms::CommsClientEndpoint::detachFromVm(void)
- ?detachFromVm@CommsEndpoint@comms@java@@UAEHXZ @ 31 NONAME ; int java::comms::CommsEndpoint::detachFromVm(void)
- ?detachFromVm@CommsServerEndpoint@comms@java@@UAEHXZ @ 32 NONAME ; int java::comms::CommsServerEndpoint::detachFromVm(void)
+ ?detachFromVm@CommsClientEndpoint@comms@java@@UAEHPAUJNIEnv_@@@Z @ 30 NONAME ; int java::comms::CommsClientEndpoint::detachFromVm(struct JNIEnv_ *)
+ ?detachFromVm@CommsEndpoint@comms@java@@UAEHPAUJNIEnv_@@@Z @ 31 NONAME ; int java::comms::CommsEndpoint::detachFromVm(struct JNIEnv_ *)
+ ?detachFromVm@CommsServerEndpoint@comms@java@@UAEHPAUJNIEnv_@@@Z @ 32 NONAME ; int java::comms::CommsServerEndpoint::detachFromVm(struct JNIEnv_ *)
?disconnect@CommsClientEndpoint@comms@java@@UAEHXZ @ 33 NONAME ; int java::comms::CommsClientEndpoint::disconnect(void)
?find@CommsClientEndpoint@comms@java@@SAPAV123@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 34 NONAME ; class java::comms::CommsClientEndpoint * java::comms::CommsClientEndpoint::find(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
?find@CommsServerEndpoint@comms@java@@SAPAV123@ABV?$basic_string@_WV?$char_traits@_W@std@@V?$allocator@_W@2@@std@@@Z @ 35 NONAME ; class java::comms::CommsServerEndpoint * java::comms::CommsServerEndpoint::find(class std::basic_string<wchar_t, class std::char_traits<wchar_t>, class std::allocator<wchar_t> > const &)
--- a/javacommons/comms/build/eabi/javacommsu.def Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/build/eabi/javacommsu.def Fri Oct 29 11:49:32 2010 +0300
@@ -31,7 +31,7 @@
_ZN4java5comms12CommsMessagersERx @ 30 NONAME
_ZN4java5comms13CommsEndpoint10attachToVmEP7JNIEnv_ @ 31 NONAME
_ZN4java5comms13CommsEndpoint11sendReceiveERNS0_12CommsMessageES3_i @ 32 NONAME
- _ZN4java5comms13CommsEndpoint12detachFromVmEv @ 33 NONAME
+ _ZN4java5comms13CommsEndpoint12detachFromVmEP7JNIEnv_ @ 33 NONAME
_ZN4java5comms13CommsEndpoint13handleMessageERNS0_12CommsMessageE @ 34 NONAME
_ZN4java5comms13CommsEndpoint14processMessageEPKNS0_12ipcMessage_sE @ 35 NONAME
_ZN4java5comms13CommsEndpoint16handleIpcMessageERNS0_12CommsMessageE @ 36 NONAME
@@ -51,7 +51,7 @@
_ZN4java5comms13CommsEndpointD1Ev @ 50 NONAME
_ZN4java5comms13CommsEndpointD2Ev @ 51 NONAME
_ZN4java5comms19CommsClientEndpoint10disconnectEv @ 52 NONAME
- _ZN4java5comms19CommsClientEndpoint12detachFromVmEv @ 53 NONAME
+ _ZN4java5comms19CommsClientEndpoint12detachFromVmEP7JNIEnv_ @ 53 NONAME
_ZN4java5comms19CommsClientEndpoint4findERKSbIwSt11char_traitsIwESaIwEE @ 54 NONAME
_ZN4java5comms19CommsClientEndpoint4sendERNS0_12CommsMessageE @ 55 NONAME
_ZN4java5comms19CommsClientEndpoint7connectEi @ 56 NONAME
@@ -62,7 +62,7 @@
_ZN4java5comms19CommsClientEndpointD0Ev @ 61 NONAME
_ZN4java5comms19CommsClientEndpointD1Ev @ 62 NONAME
_ZN4java5comms19CommsClientEndpointD2Ev @ 63 NONAME
- _ZN4java5comms19CommsServerEndpoint12detachFromVmEv @ 64 NONAME
+ _ZN4java5comms19CommsServerEndpoint12detachFromVmEP7JNIEnv_ @ 64 NONAME
_ZN4java5comms19CommsServerEndpoint4findERKSbIwSt11char_traitsIwESaIwEE @ 65 NONAME
_ZN4java5comms19CommsServerEndpoint4sendERNS0_12CommsMessageE @ 66 NONAME
_ZN4java5comms19CommsServerEndpoint4stopEv @ 67 NONAME
--- a/javacommons/comms/inc/commsclientendpoint.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/inc/commsclientendpoint.h Fri Oct 29 11:49:32 2010 +0300
@@ -137,7 +137,7 @@
*/
OS_IMPORT virtual int send(CommsMessage& aMessage);
- OS_IMPORT virtual int detachFromVm();
+ OS_IMPORT virtual int detachFromVm(JNIEnv* aEnv);
private:
std::auto_ptr<IpcConnectionInterface> mIpc;
int mAddress;
--- a/javacommons/comms/inc/commsendpoint.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/inc/commsendpoint.h Fri Oct 29 11:49:32 2010 +0300
@@ -327,11 +327,11 @@
/**
* Detach internal message loop thread from JVM.
- * @param -
+ * @param[in] aEnv JNI context
* @see attachToVm
* @return 0 in success, errno in failure
*/
- OS_IMPORT virtual int detachFromVm();
+ OS_IMPORT virtual int detachFromVm(JNIEnv* aEnv);
protected:
JavaVM* mVm;
--- a/javacommons/comms/inc/commsserverendpoint.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/inc/commsserverendpoint.h Fri Oct 29 11:49:32 2010 +0300
@@ -143,7 +143,7 @@
*/
OS_IMPORT virtual int send(CommsMessage& aMessage);
- OS_IMPORT virtual int detachFromVm();
+ OS_IMPORT virtual int detachFromVm(JNIEnv* aEnv);
private:
std::auto_ptr<IpcServerConnectionInterface> mIpc;
int mAddress;
--- a/javacommons/comms/src/commsclientendpoint.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/src/commsclientendpoint.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -87,10 +87,10 @@
}
-OS_EXPORT int CommsClientEndpoint::detachFromVm()
+OS_EXPORT int CommsClientEndpoint::detachFromVm(JNIEnv* aEnv)
{
JELOG2(EJavaComms);
- CommsEndpoint::detachFromVm();
+ CommsEndpoint::detachFromVm(aEnv);
int rc = disconnect();
rc = connect(mAddress);
--- a/javacommons/comms/src/commsendpoint.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/src/commsendpoint.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -442,13 +442,14 @@
return rc;
}
-OS_EXPORT int CommsEndpoint::unregisterDefaultJavaListener(jobject, JNIEnv*)
+OS_EXPORT int CommsEndpoint::unregisterDefaultJavaListener(jobject, JNIEnv* aEnv)
{
ScopedLock lock(mListenersMutex);
int rc = 0;
if (mDefaultListener && mDefaultListener->getListener() == 0)
{
+ mDefaultListener->release(aEnv);
delete mDefaultListener;
mDefaultListener = 0;
LOG(EJavaComms, EInfo, "Unregistered default java listener");
@@ -476,7 +477,7 @@
return rc;
}
-OS_EXPORT int CommsEndpoint::detachFromVm()
+OS_EXPORT int CommsEndpoint::detachFromVm(JNIEnv* aEnv)
{
// JELOG2(EJavaComms);
ScopedLock lock(mListenersMutex);
@@ -484,6 +485,7 @@
// remove java listeners
if (mDefaultListener && mDefaultListener->getListener() == 0)
{
+ mDefaultListener->release(aEnv);
delete mDefaultListener;
mDefaultListener = 0;
LOG(EJavaComms, EInfo, "Removed default java listener (detach)");
@@ -495,7 +497,7 @@
{
LOG1(EJavaComms, EInfo, "Removed java listener for module id %d (detach)", it->first);
- (it->second)->release(mJNIEnv);
+ (it->second)->release(aEnv);
delete it->second;
mListeners.erase(it);
it = mListeners.begin();
--- a/javacommons/comms/src/commsendpointnative.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/src/commsendpointnative.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -162,13 +162,13 @@
}
JNIEXPORT void JNICALL Java_com_nokia_mj_impl_comms_CommsEndpointBase__1detach(
- JNIEnv*,
+ JNIEnv* aEnv,
jobject,
jint aHandle)
{
JELOG2(EJavaComms);
CommsEndpoint* endpoint = reinterpret_cast<CommsEndpoint*>(aHandle);
- endpoint->detachFromVm();
+ endpoint->detachFromVm(aEnv);
}
// CommsEndpoint methods
--- a/javacommons/comms/src/commsserverendpoint.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/src/commsserverendpoint.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -79,10 +79,10 @@
return rc;
}
-OS_EXPORT int CommsServerEndpoint::detachFromVm()
+OS_EXPORT int CommsServerEndpoint::detachFromVm(JNIEnv* aEnv)
{
JELOG2(EJavaComms);
- CommsEndpoint::detachFromVm();
+ CommsEndpoint::detachFromVm(aEnv);
int rc = stop();
rc = start(mAddress);
--- a/javacommons/comms/tsrc/javaapi/javasrc/com/nokia/mj/test/comms/TestCommsEndpoint.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/tsrc/javaapi/javasrc/com/nokia/mj/test/comms/TestCommsEndpoint.java Fri Oct 29 11:49:32 2010 +0300
@@ -39,6 +39,7 @@
private final int MODULE_ID_SLEEP_1S = 1000; // reply msg is delayed by 1s
private final int MODULE_ID_SLEEP_5S = 5000;
private final int MODULE_ID_SLEEP_10S = 10000;
+ private final int MODULE_ID_DELAY_REPLY = 11000;
private final int PLUGIN_ID_JAVACAPTAIN_COMMS_TESTER_C = 101; // see comms.h
@@ -203,6 +204,22 @@
}
}));
+ aSuite.addTest(new TestCommsEndpoint("testDelayedReply", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((TestCommsEndpoint) tc).testDelayedReply();
+ }
+ }));
+
+ aSuite.addTest(new TestCommsEndpoint("testNoUnregisterWhenDetaching", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((TestCommsEndpoint) tc).testNoUnregisterWhenDetaching();
+ }
+ }));
+
return aSuite;
}
@@ -1483,5 +1500,86 @@
}
+ public void testDelayedReply()
+ {
+ System.out.println("TestCommsEndpoint.testDelayedReply()");
+
+ class SendReceiver extends Thread
+ {
+ public void run()
+ {
+ try
+ {
+ CommsEndpoint client = new CommsEndpoint();
+ client.connect(SERVER_ADDRESS);
+ CommsMessage message = new CommsMessage();
+ message.setModuleId(MODULE_ID_DELAY_REPLY);
+
+ CommsMessage reply = client.sendReceive(message, CommsEndpoint.WAIT_FOR_EVER);
+ client.disconnect();
+ client.destroy();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("SendReceiver.run");
+ }
+ }
+ }
+
+ try
+ {
+ // reply to first message is delayed until second message is received
+ // by the server
+ SendReceiver client1 = new SendReceiver();
+ SendReceiver client2 = new SendReceiver();
+
+ client1.start();
+ client2.start();
+ client1.join();
+ client2.join();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("testDelayedReply failed");
+ }
+ }
+
+ public void testNoUnregisterWhenDetaching()
+ {
+ System.out.println("TestCommsEndpoint.testNoUnregisterWhenDetaching()");
+ class TestListener implements CommsListener
+ {
+ public void processMessage(CommsMessage message) {}
+ }
+
+ CommsEndpoint comms = null;
+ try
+ {
+ comms = CommsEndpoint.find(SERVER_NAME);
+ assertNotNull(comms);
+
+ // leave listeners unregistered
+ comms.registerListener(MODULE_ID_A, new TestListener());
+ comms.registerDefaultListener(new TestListener());
+ CommsMessage msg = new CommsMessage();
+ msg.setModuleId(MODULE_ID_A);
+ comms.send(msg);
+ msg.setModuleId(MODULE_ID_B);
+ comms.send(msg);
+ msg = comms.sendReceive(msg, 1);
+ }
+ catch (CommsException e)
+ {
+ e.printStackTrace();
+ fail("ok case");
+ }
+ finally
+ {
+ comms.destroy();
+ comms = null;
+ }
+ }
}
--- a/javacommons/comms/tsrc/javaapi/javasrc/com/nokia/mj/test/comms/TestCommsServerEndpoint.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/tsrc/javaapi/javasrc/com/nokia/mj/test/comms/TestCommsServerEndpoint.java Fri Oct 29 11:49:32 2010 +0300
@@ -119,6 +119,15 @@
}
}));
+ aSuite.addTest(new TestCommsServerEndpoint("testServerAndTwoClients", new TestMethod()
+ {
+ public void run(TestCase tc)
+ {
+ ((TestCommsServerEndpoint) tc).testServerAndTwoClients();
+ }
+ }));
+
+
return aSuite;
}
@@ -724,6 +733,89 @@
}
}
+ public void testServerAndTwoClients()
+ {
+ System.out.println("TestCommsServerEndpoint.testServerAndTwoClients()");
+
+ class RouterListener implements CommsListener
+ {
+ CommsEndpointBase iComms;
+ CommsMessage iFirstMessage;
+
+ public RouterListener(CommsEndpointBase aComms)
+ {
+ iComms = aComms;
+ }
+
+ public void processMessage(CommsMessage aMessage)
+ {
+ if (iFirstMessage == null)
+ {
+ // delay reply until second message is received
+ iFirstMessage = aMessage;
+ }
+ else
+ {
+ // reply to first client
+ CommsMessage reply = new CommsMessage();
+ reply.replyTo(iFirstMessage);
+ iComms.send(reply);
+
+ // reply to second client
+ reply.replyTo(aMessage);
+ iComms.send(reply);
+ }
+ }
+ }
+
+ class SendReceiver extends Thread
+ {
+ public void run()
+ {
+ try
+ {
+ CommsEndpoint client = new CommsEndpoint();
+ client.connect(SERVER_ADDRESS);
+ CommsMessage reply = client.sendReceive(new CommsMessage(), CommsEndpoint.WAIT_FOR_EVER);
+ client.disconnect();
+ client.destroy();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("SendReceiver.run");
+ }
+ }
+ }
+
+ CommsServerEndpoint server = null;
+ try
+ {
+ server = new CommsServerEndpoint();
+ RouterListener listener = new RouterListener(server);
+ server.registerDefaultListener(listener);
+ server.start(SERVER_ADDRESS);
+
+ SendReceiver client1 = new SendReceiver();
+ SendReceiver client2 = new SendReceiver();
+
+ client1.start();
+ client2.start();
+ client1.join();
+ client2.join();
+
+ server.stop();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("testServerAndTwoClients failed");
+ }
+ finally
+ {
+ server.destroy();
+ }
+ }
}
--- a/javacommons/comms/tsrc/javaapi/src/commsextensionplugin.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/tsrc/javaapi/src/commsextensionplugin.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -36,6 +36,7 @@
const int MODULE_ID_SLEEP_1S = 1000;
const int MODULE_ID_SLEEP_5S = 5000;
const int MODULE_ID_SLEEP_10S = 10000;
+const int MODULE_ID_DELAY_REPLY = 11000;
#ifdef __SYMBIAN32__
java::captain::ExtensionPluginInterface* getExtensionPlugin()
@@ -68,7 +69,7 @@
return result;
}
-CommsExtensionPlugin::CommsExtensionPlugin() : mCore(0), mComms(0)
+CommsExtensionPlugin::CommsExtensionPlugin() : mCore(0), mComms(0), mDelayedReplyCount(0)
{
JELOG2(EJavaComms);
}
@@ -93,6 +94,7 @@
mComms->registerListener(MODULE_ID_SLEEP_1S, this);
mComms->registerListener(MODULE_ID_SLEEP_5S, this);
mComms->registerListener(MODULE_ID_SLEEP_10S, this);
+ mComms->registerListener(MODULE_ID_DELAY_REPLY, this);
}
void CommsExtensionPlugin::stopPlugin()
@@ -107,6 +109,7 @@
mComms->unregisterListener(MODULE_ID_SLEEP_1S, this);
mComms->unregisterListener(MODULE_ID_SLEEP_5S, this);
mComms->unregisterListener(MODULE_ID_SLEEP_10S, this);
+ mComms->unregisterListener(MODULE_ID_DELAY_REPLY, this);
mCore = 0;
mComms = 0;
@@ -197,6 +200,28 @@
#ifdef __SYMBIAN32__
break;
#endif
+ case MODULE_ID_DELAY_REPLY:
+ {
+ if (mDelayedReplyCount == 0)
+ {
+ mDelayedReply = aMessage;
+ mDelayedReplyCount++;
+ }
+ else
+ {
+ // reply to first message
+ CommsMessage reply;
+ reply.replyTo(mDelayedReply);
+ mComms->send(reply);
+
+ // reply to message client
+ reply.replyTo(aMessage);
+ mComms->send(reply);
+ mDelayedReplyCount = 0;
+ }
+ }
+ break;
+
default:
mReply = aMessage;
mReply.setReceiver(aMessage.getSender());
--- a/javacommons/comms/tsrc/javaapi/src/commsextensionplugin.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/tsrc/javaapi/src/commsextensionplugin.h Fri Oct 29 11:49:32 2010 +0300
@@ -53,6 +53,8 @@
CoreInterface* mCore;
CommsEndpoint* mComms;
CommsMessage mReply;
+ CommsMessage mDelayedReply;
+ int mDelayedReplyCount;
};
} // namespace comms
--- a/javacommons/comms/tsrc/src/sendreceive.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/comms/tsrc/src/sendreceive.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -410,3 +410,73 @@
monitor->wait();
CHECK(!con.disconnect());
}
+
+
+/**
+ * Test sendReceive with two clients
+ * 1. server replies to first message after second message is received
+ * (and two clients use sendReceive to send single messsage)
+ */
+class RoutingListener : public CommsListener
+{
+public:
+ RoutingListener(CommsEndpoint& aComms) : mComms(aComms), mMsgCount(0) {}
+
+ virtual void processMessage(CommsMessage& aMessage)
+ {
+ if (mMsgCount == 0)
+ {
+ // delay reply until second message is received
+ mFirstMessage = aMessage;
+ }
+ else
+ {
+ // reply to first client
+ CommsMessage reply;
+ reply.replyTo(mFirstMessage);
+ mComms.send(reply);
+
+ // reply to second client
+ reply.replyTo(aMessage);
+ mComms.send(reply);
+ }
+ mMsgCount++;
+ }
+private:
+ CommsMessage mFirstMessage;
+ int mMsgCount;
+ CommsEndpoint& mComms;
+};
+
+void doSendReceive()
+{
+ CommsClientEndpoint con;
+ CHECK(!con.connect(IPC_ADDRESS_COMMS_MODULE_TEST + 1));
+ CommsMessage msg;
+ CommsMessage receivedMsg;
+ CHECK(!con.sendReceive(msg, receivedMsg, WAIT_FOR_EVER));
+ CHECK(!con.disconnect());
+}
+
+void* clientSendReceiveThread(void*)
+{
+ doSendReceive();
+ return 0;
+}
+
+TEST(SendReceive, twoClientsAndServer)
+{
+ CommsServerEndpoint server;
+ RoutingListener listener(server);
+ CHECK(!server.registerDefaultListener(&listener));
+ CHECK(!server.start(IPC_ADDRESS_COMMS_MODULE_TEST + 1));
+
+ pthread_t thread1;
+ pthread_t thread2;
+ pthread_create(&thread1, 0, &clientSendReceiveThread, 0);
+ pthread_create(&thread2, 0, &clientSendReceiveThread, 0);
+ pthread_join(thread1, 0);
+ pthread_join(thread2, 0);
+
+ server.stop();
+}
--- a/javacommons/connectionmanager/src.s60/connectionmanager.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/connectionmanager/src.s60/connectionmanager.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -85,7 +85,7 @@
TCmDefConnType type;
RCmManager * mgr = new(ELeave) RCmManager();
- mgr->OpenL();
+ mgr->OpenLC();
if (aDefault)
{
@@ -93,18 +93,24 @@
mgr->ReadDefConnL(obj);
id = obj.iId;
type = obj.iType;
+
if ((type ==ECmDefConnConnectionMethod) && (id == aMatchIapId))
{
+ CleanupStack::PopAndDestroy(mgr);
return true;
}
else if (type != ECmDefConnDestination)
{
+ CleanupStack::PopAndDestroy(mgr);
return false;
}
}
RCmDestination tmpdst = mgr->DestinationL(id);
ILOG1(ESOCKET,"Is connected return value = %d ", tmpdst.IsConnectedL());
+
+ CleanupStack::PopAndDestroy(mgr);
+
if (!(tmpdst.IsConnectedL()))
{
return false; // no access point within this destination are active
@@ -119,8 +125,6 @@
}
}
return false;
-
-
}
// ---------------------------------------------------------------------------
@@ -139,14 +143,12 @@
TCmDefConnValue obj;
HBufC8 * des;
-
mgr->ReadDefConnL(obj);
id = obj.iId;
type = obj.iType;
LOG1(ESOCKET,EInfo,"readDefConnL returned %d",id);
LOG1(ESOCKET,EInfo,"type is %d",type);
- CleanupStack::PopAndDestroy();
-
+ CleanupStack::PopAndDestroy(mgr);
if (type == ECmDefConnAskOnce || type == ECmDefConnConnectionMethod || type == ECmDefConnDestination)
{
@@ -205,7 +207,6 @@
CleanupClosePushL(dlgSv);
User::LeaveIfError(dlgSv.Connect());
-
TRequestStatus status(KRequestPending);
LOG(ESOCKET,EInfo,"prompting by regenconagent ");
dlgSv.AccessPointConnection(dummy, dummy, snapOrIapId, prefs.iBearerSet, status);
@@ -213,7 +214,6 @@
CleanupStack::PopAndDestroy(&dlgSv);
User::LeaveIfError(status.Int());
-
TMDBElementId tableId = snapOrIapId & KCDMaskShowRecordType;
if (tableId == KCDTIdNetworkRecord)
{
@@ -289,12 +289,17 @@
int snapid = KJavaNetworkAccessNotSpecified;
std::auto_ptr<JavaStorage> js(JavaStorage::createInstance());
- js->open(JAVA_DATABASE_NAME);
-
-
- // Read all attributes of one application specified by UID.
- js->read(APPLICATION_PACKAGE_TABLE, aAppSuiteUid, entries);
- js->close();
+ try
+ {
+ js->open(JAVA_DATABASE_NAME);
+ // Read all attributes of one application specified by UID.
+ js->read(APPLICATION_PACKAGE_TABLE, aAppSuiteUid, entries);
+ js->close();
+ }
+ catch (JavaStorageException& aJse)
+ {
+ LOG(ESOCKET,EInfo,"Attribute read failed.");
+ }
// set the entry as ACCESS_POINT
attribute.setEntry(ACCESS_POINT, L"");
@@ -308,14 +313,14 @@
{
JavaStorageEntry sourceEntry = (*findIterator);
temp.append(sourceEntry.entryValue().c_str());
- HBufC * value = S60CommonUtils::wstringToDes(temp.c_str());
- HBufC8 * temp1 = HBufC8::NewL(value->Des().Length());
+ std::auto_ptr<HBufC>value(S60CommonUtils::wstringToDes(temp.c_str()));
+ std::auto_ptr<HBufC8> temp1(HBufC8::NewL(value->Des().Length()));
temp1->Des().Copy(value->Des());
TRAP_IGNORE(snapid = ParseNetworkAccessPointL(*temp1));
}
else
{
- LOG(ESOCKET,EInfo,"Name attribute does not exists.");
+ LOG(ESOCKET,EInfo,"Access point attribute does not exists.");
}
entries.clear();
}
@@ -447,7 +452,7 @@
}
}
- HBufC* temp1 = HBufC::NewL(des->Des().Length()+1);
+ std::auto_ptr<HBufC>temp1(HBufC::NewL(des->Des().Length()+1));
temp1->Des().Copy(des->Des());
int len1 = des->Length();
@@ -463,13 +468,7 @@
ptr16.ZeroTerminate();
LOG1(ESOCKET,EInfo,"ConnectionManager::setApnIdL() - len of apnString = %d", wcslen(apnString));
-
- std::wstring tmpstring(apnString);
- char *dirName = JavaCommonUtils::wstringToUtf8(tmpstring);
- LOG1(ESOCKET,EInfo,"COnnectionManager::setApnIdL() - storing %s into javastorage",dirName);
-
-
- js->startTransaction();
+ LOG1(ESOCKET,EInfo,"COnnectionManager::setApnIdL() - storing %S into javastorage", apnString);
attribute.setEntry(ACCESS_POINT, apnString);
updateEntries.insert(attribute);
@@ -477,8 +476,10 @@
attribute.setEntry(ID, aAppSuiteUid.toString());
matchEntries.insert(attribute);
+ delete [] apnString;
LOG(ESOCKET,EInfo,"ConnectionManager::setApnIdL() - before js update");
+
try
{
js->update(APPLICATION_PACKAGE_TABLE, updateEntries, matchEntries);
@@ -491,18 +492,6 @@
return;
}
- try
- {
- js->commitTransaction();
- }
- catch (JavaStorageException jse)
- {
- ELOG(ESOCKET,"Commit transaction in javastorage db failed");
- js->close();
- CleanupStack::PopAndDestroy(des);
- return;
- }
-
js->close();
updateEntries.clear();
matchEntries.clear();
--- a/javacommons/connectionmanager/src.s60/connectionmanagerjni.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/connectionmanager/src.s60/connectionmanagerjni.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -61,13 +61,14 @@
{
LOG1(ESOCKET,EInfo,"+apnInfo = %s",apnInfo);
jstring jnistring = aJni->NewStringUTF(apnInfo);
+ delete[] apnInfo;
return jnistring;
}
else
{
+ delete[] apnInfo;
return NULL;
}
-
}
JNIEXPORT jstring JNICALL
@@ -81,10 +82,12 @@
{
LOG1(ESOCKET,EInfo,"+apnInfo = %s",apnInfo);
jstring jnistring = aJni->NewStringUTF(apnInfo);
+ delete[] apnInfo;
return jnistring;
}
else
{
+ delete[] apnInfo;
return NULL;
}
}
--- a/javacommons/fileutils/src/nativefileiohandler.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/fileutils/src/nativefileiohandler.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -392,6 +392,8 @@
struct stat fileStat;
int error = lstat(utf8Name, &fileStat);
+ delete[] utf8Name;
+
if (error < 0)
{
int error = errno;
--- a/javacommons/gcfprotocols/http/inc.s60/chttptransactionclient.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/inc.s60/chttptransactionclient.h Fri Oct 29 11:49:32 2010 +0300
@@ -148,6 +148,7 @@
TInt iFlag;
bool iPartialPostData;
bool iEndOfRequest;
+ bool iRestartedFlag;
};
--- a/javacommons/gcfprotocols/http/inc.s60/httpsessionclient.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/inc.s60/httpsessionclient.h Fri Oct 29 11:49:32 2010 +0300
@@ -77,7 +77,8 @@
RLibrary iCustomiserLib;
RSocketServ iSocketServ;
RConnection iConnection;
- TInt iApnId ;
+ TInt iApnId ; // stores the ap id, could be SNAP id or IAP id depending on iApType
+ TInt iApType; // stores the access point type, 2= SNAP, 3=IAP
//MHttpClientCustomiser* iCustomiser;
};
--- a/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/http/HttpConnectionNative.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/javasrc.s60/com/nokia/mj/impl/http/HttpConnectionNative.java Fri Oct 29 11:49:32 2010 +0300
@@ -1232,7 +1232,6 @@
protected synchronized void sendRequest(boolean aPartialDataFlag) throws IOException
{
ensureConnected();
- Logger.PLOG(Logger.ESOCKET, "HTTP sendRequest() , Flag : " + aPartialDataFlag);
final int count = iRequestProperties.size();
int headerCount = count;
--- a/javacommons/gcfprotocols/http/src.s60/chttpsessionclient.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/chttpsessionclient.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -119,6 +119,7 @@
{
LOG(ESOCKET,EInfo,"+HttpSessionClient::ConstructL ");
+ iApType = aType;
/*CActiveScheduler * scheduler = new CActiveScheduler();
CActiveScheduler::Install(scheduler);
CActiveScheduler::Add(this);*/
@@ -188,6 +189,7 @@
if (aType == 3) // IAP Id
{
LOG(ESOCKET,EInfo,"+HttpSessionClient:: in iap case");
+ iApnId = aAPNId;
if (aAPNId != -1)
{
// Creates connection with selected IAP ID
@@ -336,7 +338,7 @@
void HttpSessionClient::RestartConnection()
{
- LOG(ESOCKET,EInfo,"+HttpSessionClient::RestartConnection12 + ");
+ LOG2(ESOCKET,EInfo,"+HttpSessionClient::RestartConnection12 %d , type = %d ",iApnId,iApType);
iConnection.Close();
TInt ret = iConnection.Open(iSocketServ);
@@ -345,20 +347,29 @@
TConnPrefList prefList;
TExtendedConnPref prefs;
- if (iApnId!=-1)
+ if ((iApnId!=-1) && (iApType == 2))
prefs.SetSnapId(iApnId);
+ else if ((iApnId!=-1) && (iApType == 3))
+ prefs.SetIapId(iApnId);
TRAPD(err,prefList.AppendL(&prefs));
if (err == KErrNone)
ret = iConnection.Start(prefList);
else
ret = iConnection.Start();
#else
- TCommSnapPref connPref;
- if (iApnId!=-1)
- connPref.SetSnap(iApnId);
- ret = iConnection.Start(connPref);
-
+ if ((iApnId!=-1) && (iApType == 2)) // SNAP case
+ {
+ TCommSnapPref snapPref;
+ snapPref.SetSnap(iApnId);
+ ret = iConnection.Start(snapPref);
+ }
+ else if ((iApnId!=-1) && (iApType == 3)) // IAP case
+ {
+ TCommDbConnPref iapPref;
+ iapPref.SetIapId(iApnId);
+ ret = iConnection.Start(iapPref);
+ }
#endif
- LOG(ESOCKET,EInfo,"+HttpSessionClient::RestartConnection + ");
+ ELOG1(ESOCKET,"+HttpSessionClient::RestartConnection --ret = %d ",ret);
}
--- a/javacommons/gcfprotocols/http/src.s60/chttptransactionclient.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/chttptransactionclient.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -73,6 +73,7 @@
iFlag = 0;
iDrmBuf = HBufC8::NewL(256);
iEndOfRequest = false;
+ iRestartedFlag = false;
OpenTransactionL(aUri , aRequestMethod);
}
@@ -129,11 +130,14 @@
}
//Submit the transaction
- RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
- TInt headerCount = aRawHeaders->Count();
- for (TInt ii=0; ii < headerCount; ++ii)
+ if (!iRestartedFlag)
{
- SetHeaderL(hdr, (*aRawHeaders)[ii]);
+ RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
+ TInt headerCount = aRawHeaders->Count();
+ for (TInt ii=0; ii < headerCount; ++ii)
+ {
+ SetHeaderL(hdr, (*aRawHeaders)[ii]);
+ }
}
//iHttpSession.CustomiseHeadersL(hdr);
@@ -703,6 +707,7 @@
{
iTransaction.Cancel();
iHttpSession.RestartConnection();
+ iRestartedFlag = true;
}
if (iJavaWaitingOnCallBack)
--- a/javacommons/gcfprotocols/http/src.s60/nativehttpsession.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/nativehttpsession.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -94,6 +94,8 @@
HBufC* t2 = S60CommonUtils::wstringToDes(req2.c_str());
TInt handle= NativeHttpTransaction::NewL(*aJni,aPeer,/* NULL, */*iHttpSessionClient, (const TDesC*)t1, (const TDesC*)t2,this);
+ delete t1;
+ delete t2;
return handle;
}
--- a/javacommons/gcfprotocols/http/src.s60/nativetransaction.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/http/src.s60/nativetransaction.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -18,12 +18,7 @@
#include <e32def.h>
#include <centralrepository.h>
-
-#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
-#include <CUserAgent.h>
-#else
#include <cuseragent.h>
-#endif
#include "com_nokia_mj_impl_http_HttpConnectionNative.h"
#include "nativehttptransaction.h"
--- a/javacommons/gcfprotocols/secureconnection/inc/nativesecureconnection.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/secureconnection/inc/nativesecureconnection.h Fri Oct 29 11:49:32 2010 +0300
@@ -156,8 +156,6 @@
~NativeSecureConnection();
private:
- char* mName;
- char* mHost;
char **mResult;
int mMode;
int mPort;
--- a/javacommons/gcfprotocols/secureconnection/src/nativesecureconnection.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/secureconnection/src/nativesecureconnection.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -28,12 +28,6 @@
NativeSocketConnection(aName, aMode, aHost, aPort)
{
JELOG2(ESOCKET);
- mName = NULL;
- mHost = NULL;
- mName = new char[strlen(aName) + 1];
- strcpy(mName, aName);
- mHost = new char[strlen(aHost) + 1];
- strcpy(mHost, aHost);
mMode = aMode;
mPort = aPort;
mSecureSocketBuffer = NULL;
--- a/javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/src.s60/apnsettings.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -42,6 +42,7 @@
char * fret = if_indextoname(aApn,interfacename);
strcpy(ifr.ifr_name, interfacename);
ILOG1(ESOCKET, "interface name is %s",interfacename);
+ delete[] interfacename;
}
else
{
--- a/javacommons/gcfprotocols/socket/socket/src/socketserverconnectionjni.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/gcfprotocols/socket/socket/src/socketserverconnectionjni.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -153,6 +153,7 @@
PLOG2(ESOCKET, "getLocalAddress, ret = %d, addr = %s" , err, addr);
jstring jnistring = aJni->NewStringUTF(addr);
aJni->SetObjectArrayElement(address, 0, jnistring);
+ delete[] addr;
return err;
}
--- a/javacommons/javastorage/tsrc/storageclient/build/storageclient.pro Fri Oct 15 12:29:39 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +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=app
-TARGET=JavaStorageTests
-CONFIG += omj stl
-CONFIG -= qt
-
-LIBS += -ljavacomms
-LIBS += -ljavastorage
-LIBS += -lCppUTest
-
-INCLUDEPATH += ../../../../../tools/cpputest/include/CppUTest
-
-symbian {
-INCLUDEPATH += ../../../../../tools/cpputest/include/Platforms/Symbian
-TARGET.CAPABILITY = all -tcb -allfiles -drm
-}
-!symbian {
-INCLUDEPATH += ../../../../../tools/cpputest/include/Platforms/Gcc
-LIBPATH += ../../../../../tools/cpputest/lib
-}
-
-
-
-include(../../../../../build/omj.pri)
--- a/javacommons/security/build/build.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/security/build/build.xml Fri Oct 29 11:49:32 2010 +0300
@@ -57,7 +57,9 @@
<pathelement path="${external.policy.editor.tool.bin}"/>
<pathelement path="${impl.cldc.jar}:${impl.cdc.jar}"/>
<pathelement path="${emma.dir}/emma.jar"/>
- </classpath>
+ <pathelement path="${cobertura.classpath}"/>
+ <pathelement path="${cobertura.ant.classpath}"/>
+ </classpath>
</java>
</target>
--- a/javacommons/utils/inc.s60/javauids.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/utils/inc.s60/javauids.h Fri Oct 29 11:49:32 2010 +0300
@@ -55,9 +55,16 @@
#define KOmjCleanerUid 0x2002119A
// javaappconverter.exe is executed automatically once after OMJ has
-// been installed. It uses javainstaller to convert S60 MIDlets to OMJ
+// been installed as a SIS package. It uses javainstaller to convert
+// S60 MIDlets to OMJ
#define KJavaAppConverterUid 0x2002121C
+// javaafterflashconverter.exe is executed by Java Captain after
+// ROM image that contains OMJ has been flashed to a device that
+// earlier had Java 1.x. It uses javainstaller to convert
+// S60 MIDlets to OMJ
+#define KJavaAfterFlashConverterUid 0x20034612
+
// javarestoreconverter.exe is executed in if old Java 1.X MIDlet
// have been restored and must be converted and installed to OMJ environment
#define KJavaRestoreConverterUid 0x2002B3EA
--- a/javacommons/utils/inc/javainifileutils.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javacommons/utils/inc/javainifileutils.h Fri Oct 29 11:49:32 2010 +0300
@@ -34,7 +34,7 @@
FileContent(char* content) : mContent(content) {}
~FileContent()
{
- delete mContent;
+ delete[] mContent;
mContent = 0;
}
char* getContent()
--- a/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/bluetoothplatformcontrol/src.s60/s60btdialog.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -26,7 +26,7 @@
#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
#include <hbdevicemessageboxsymbian.h>
#include <hbpopup.h>
-#include <QtCore\qvariant.h>
+#include <QtCore/qvariant.h>
#define QUERY_BUF_LEN 512
#endif
--- a/javaextensions/bluetooth/bluetoothcommons/src.s60/servicerecord.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/bluetooth/bluetoothcommons/src.s60/servicerecord.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -219,12 +219,16 @@
if (persistentRecFd < 0)
return errno;
+
// Reading and restoring the DeviceServiceClasses bits
int devServClass = 0;
ret = read(persistentRecFd, &devServClass, sizeof(devServClass));
if (ret <= 0)
+ {
+ close(persistentRecFd);
return errno;
+ }
if (devServClass != 0)
{
@@ -429,7 +433,7 @@
// Indicates a successful retrieval
// of the service record from the persistent file
mRestoredFromPersistentFile = true;
-
+ close(persistentRecFd);
return ret;
}
@@ -1312,6 +1316,7 @@
if (ret <= 0)
{
delete srvRecPopulator;
+ close(persistentRecFd);
return;
}
@@ -1525,7 +1530,7 @@
}
delete srvRecPopulator;
-
+ close(persistentRecFd);
return;
}
--- a/javaextensions/centralrepository/javasrc/com/nokia/mj/impl/cenrep/CentralRepositoryImpl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/centralrepository/javasrc/com/nokia/mj/impl/cenrep/CentralRepositoryImpl.java Fri Oct 29 11:49:32 2010 +0300
@@ -114,7 +114,7 @@
synchronized (this)
{
- if (iState != CLOSED)
+ if (iState != CLOSED && iState == OPEN)
{
iState = CLOSED;
_close(iFunctionSourceHandle, iCenrepHandle);
@@ -329,6 +329,7 @@
long key,
int value);
+
/**
* Checks if MIDlet is permited to access the central repository.
--- a/javaextensions/comm/src.s60/nativecommconnection.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/comm/src.s60/nativecommconnection.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -430,8 +430,17 @@
{
JELOG2(ESOCKET);
int ret = 0;
- User::LoadPhysicalDevice(PDD_NAME); // load physical device drivers
- User::LoadLogicalDevice(LDD_NAME); // load logical device drivers
+ TInt err = User::LoadPhysicalDevice(PDD_NAME); // load physical device drivers
+ if ( KErrNone != err )
+ {
+ return err;
+ }
+
+ err = User::LoadLogicalDevice(LDD_NAME); // load logical device drivers
+ if ( KErrNone != err )
+ {
+ return err;
+ }
ret = mCommServer.Connect();
if (ret != KErrNone)
--- a/javaextensions/datagram/datagram/src.s60/apnsettings.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/datagram/datagram/src.s60/apnsettings.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -42,7 +42,7 @@
char * fret = if_indextoname(aApn,interfacename);
strcpy(ifr.ifr_name, interfacename);
ILOG1(ESOCKET, "interface name is %s",interfacename);
- delete interfacename;
+ delete[] interfacename;
}
else
{
--- a/javaextensions/datagram/datagram/src/datagramconnectionjni.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/datagram/datagram/src/datagramconnectionjni.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -88,6 +88,7 @@
LOG1(ESOCKET,EInfo,"addr = %s",addr);
jnistring = aJni->NewStringUTF(addr);
+ delete[] addr;
aJni->SetObjectArrayElement(aSenderAddr,0,jnistring);
aJni->SetIntArrayRegion(aSenderPort,0,1,&port);
--- a/javaextensions/datagram/serverconnection/src/datagramserverconnection.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/datagram/serverconnection/src/datagramserverconnection.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -141,19 +141,20 @@
int rt = -1;
- char * addr = new char[MAX_SIZE];
+ //char * addr = new char[MAX_SIZE];
if (rt < 0 && pThis->mKeepRunning)
{
char *buf = new char[BUFFER_SIZE];
// wchar_t * sender = new wchar_t[256];
- char * sender = new char[256];
+ //char * sender = new char[256];
while (match == false)
{
rt = recvfrom(pThis->mListenDatagram, buf, BUFFER_SIZE, 0,
(sockaddr*) &sender_addr, &size);
-
- strcpy(sender,inet_ntoa(sender_addr.sin_addr));
+ delete[] buf;
+ //strcpy(sender,inet_ntoa(sender_addr.sin_addr));// Do we need this?
+ //delete[] sender;
ILOG2(ESOCKET, "pThis->mListenDatagram = %d, port = %d",pThis-> mListenDatagram,pThis->mPort);
// validate the filter
--- a/javaextensions/location/position/src/cpositioner.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/location/position/src/cpositioner.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -76,8 +76,8 @@
// Destructor
CPositioner::~CPositioner()
{
+ Cancel();
iTimer.Close();
- Cancel();
}
// -----------------------------------------------------------------------------
--- a/javaextensions/midppush/pushregistryplugin/inc/pushregistryhandler.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/midppush/pushregistryplugin/inc/pushregistryhandler.h Fri Oct 29 11:49:32 2010 +0300
@@ -63,7 +63,7 @@
/**
* This class implements ExtensionPlugin interface of Java Manager.
- * I.e. this class is starting point for all push related tasks in the
+ * I.e. this class is a starting point for all push related tasks in the
* Java Captain process.
*/
OS_NONSHARABLE_CLASS(PushRegistryHandler) : public java::captain::ExtensionPluginInterface,
@@ -162,6 +162,39 @@
int readIntArg(java::comms::CommsMessage& aMsg,const std::string& aMsgName);
long long readLongLongArg(CommsMessage& aMsg,const std::string& aMsgName);
+ //Internal utility classes.
+
+ /**
+ * This "function object" class is used as an "comparison object"
+ * when all driveInfo objects, which has equal root path, is removed from
+ * mDriveInfo vector container. This wrapper class is needed because
+ * we did not wanted to add operator() method to fileutils::driveInfo struct.
+ */
+ class DriveInfoComparisonUtil
+ {
+ public:
+ DriveInfoComparisonUtil(const java::fileutils::driveInfo& aInfo)
+ : mObj(aInfo) {}
+
+ ~DriveInfoComparisonUtil(){}
+
+ DriveInfoComparisonUtil(const DriveInfoComparisonUtil& x)
+ :mObj(x.mObj){}
+
+ bool operator()(const java::fileutils::driveInfo& x)
+ {
+ if (mObj.iRootPath == x.iRootPath)
+ return true;
+ return false;
+ }
+
+ private:
+ const java::fileutils::driveInfo& mObj;
+
+ //Not implemented.
+ DriveInfoComparisonUtil &operator=(const DriveInfoComparisonUtil& x);
+ };
+
//Not implemented.
PushRegistryHandler(const PushRegistryHandler &x);
PushRegistryHandler &operator=(const PushRegistryHandler &x);
--- a/javaextensions/midppush/pushregistryplugin/src/pushregistryhandler.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/midppush/pushregistryplugin/src/pushregistryhandler.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -20,6 +20,7 @@
#include <memory>
#include <string>
#include <time.h>
+#include <algorithm>
#include "pushregistryhandler.h"
#include "coreinterface.h"
@@ -1055,20 +1056,15 @@
*/
void PushRegistryHandler::removeDriveFromContainer(const driveInfo& aDriveInfo)
{
- for (driveInfos::iterator iter = mDriveInfo.begin(); iter != mDriveInfo.end();)
- {
- //Root path is unique for every drive and it is always available
- //in the driveInfo so it is safe to compare equality of two driveInfo objects
- //with this value.
- //On the safe side, a whole list is looped through.
- if (aDriveInfo.iRootPath == iter->iRootPath)
- {
- mDriveInfo.erase(iter);
- continue;
- }
- else
- ++iter;
- }//end for
+ //Root path is unique for every drive and it is always available
+ //in the driveInfo so it is safe to compare equality of two driveInfo objects
+ //with this value.
+ //In theory, there might be duplicate driveInfo objects with same root path
+ //in the vector, so it is better to loop through a whole vector.
+ //Multiple objects can be removed from vector by stl's remove_if method.
+ DriveInfoComparisonUtil searchObj(aDriveInfo);
+ mDriveInfo.erase( remove_if(mDriveInfo.begin(),mDriveInfo.end(),searchObj) ,
+ mDriveInfo.end() );
}
/**
--- a/javaextensions/pim/cntadapter/inc.s60/cpimcontactlistadapter.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/pim/cntadapter/inc.s60/cpimcontactlistadapter.h Fri Oct 29 11:49:32 2010 +0300
@@ -457,6 +457,8 @@
TBool iFirstItemChanges;
java::util::FunctionServer* iFuncServer;
+
+ RMutex iMutex;
};
--- a/javaextensions/pim/cntadapter/src.s60/cpimcontactlistadapter.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/pim/cntadapter/src.s60/cpimcontactlistadapter.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -199,9 +199,11 @@
CPIMContactListAdapter::GetExternalCategoryModificationsL()
{
JELOG2(EPim);
+ iMutex.Wait();
CallMethodL(this, &CPIMContactListAdapter::IsDatabaseReadyL, iFuncServer);
RPointerArray<CPIMCategoryStateChange>* retval = iCategoryChanges;
iCategoryChanges = NULL;
+ iMutex.Signal();
return retval;
}
@@ -290,6 +292,7 @@
iDatabase = NULL;
delete iMinimalFieldsViewDef;
iMinimalFieldsViewDef = NULL;
+ iMutex.Close();
}
// -----------------------------------------------------------------------------
@@ -640,6 +643,7 @@
CContactItemViewDef::EIncludeFields,
CContactItemViewDef::EIncludeHiddenFields);
InitializeMinimalViewDefinitionL();
+ User::LeaveIfError(iMutex.CreateLocal());
}
// -----------------------------------------------------------------------------
@@ -652,6 +656,7 @@
TPIMExternalChangeType aType) // type of the change
{
JELOG2(EPim);
+ iMutex.Wait();
iCategoryManager->FlushCache();
// This should never happen
@@ -702,6 +707,7 @@
CleanupStack::PushL(change);
User::LeaveIfError(iCategoryChanges->Append(change));
CleanupStack::Pop(change);
+ iMutex.Signal();
}
// -----------------------------------------------------------------------------
--- a/javaextensions/satsa/pki/src.s60/cstsseprompt.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/satsa/pki/src.s60/cstsseprompt.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -26,7 +26,7 @@
#ifdef RD_JAVA_S60_RELEASE_10_1_ONWARDS
#include <hbdevicedialog.h>
-#include <QtCore\qvariant.h>
+#include <QtCore/qvariant.h>
const QString KMessageTextKey = "text";
#else
--- a/javaextensions/wma/mms/src.s60/cmmsplatformservices60impl.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javaextensions/wma/mms/src.s60/cmmsplatformservices60impl.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1325,6 +1325,7 @@
delete mMessageHandler;
mMessageHandler = NULL;
}
+ mRFs.Close();
}
// End of File
} //namespace wma
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/build/javacaptain_ext_preinstallerstarter.pro Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/build/javacaptain_ext_preinstallerstarter.pro Fri Oct 29 11:49:32 2010 +0300
@@ -19,6 +19,6 @@
CONFIG += omj stl
CONFIG -= qt
-LIBS += -lapgrfx -ljavacomms -lhal -lsysutil
+LIBS += -lapgrfx -ljavacomms -lhal -lsysutil -lefsrv
include(../../../../../build/omj.pri)
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstarter.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/inc/preinstallerstarter.h Fri Oct 29 11:49:32 2010 +0300
@@ -37,6 +37,13 @@
public EventConsumerInterface,
public ExtensionPluginInterface
{
+ enum TPreinstallerStartMode
+ {
+ ENormal,
+ EIad,
+ ERomUpgrade
+ };
+
public:
PreinstallerStarter();
virtual ~PreinstallerStarter();
@@ -58,11 +65,17 @@
virtual void DoCancel();
private:
- void startPreinstaller(TBool aIadBoot);
+ void startPreinstaller(enum TPreinstallerStartMode aStartMode);
#ifndef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
void registerMidletApplicationTypeHandler();
#endif
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+ // If necessary start javaafterflashconverter.exe and return ETrue,
+ // else return EFalse
+ TBool startConverter();
+#endif
+
CoreInterface* mCore;
RProcess* mPreinstaller;
};
--- a/javamanager/javacaptain/extensionplugins/preinstallerstarter/src.s60/preinstallerstarter.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javacaptain/extensionplugins/preinstallerstarter/src.s60/preinstallerstarter.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -37,6 +37,19 @@
#include "preinstallerstarter.h"
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+// This file in Java Captain private data cage is used to indicate when
+// converting old S60 midlets to OMJ midlets has been done after
+// ROM upgrade flashing.
+_LIT(KAfterFlashConversionDone, "C:\\private\\200211dc\\afconversionsdone.dat"); // codescanner::driveletters
+
+_LIT(KAfterFlashConverterExe, "javaafterflashconverter.exe");
+
+#endif
+
+_LIT(KIad, " iad");
+_LIT(KWaitAFConversion , " waitafconversion");
+
/**
* Return pointer to ExtensionPluginInterface implementation for this
* extension dll
@@ -46,9 +59,9 @@
return new java::captain::PreinstallerStarter();
}
-namespace java
+namespace java // codescanner::namespace
{
-namespace captain
+namespace captain // codescanner::namespace
{
using java::fileutils::driveInfo;
@@ -126,7 +139,7 @@
// Preinstaller will be started with 'iad' command line option
// so that it knows that it has been started for the first
// time after java 2.0 IAD installation.
- startPreinstaller(ETrue);
+ startPreinstaller(EIad);
}
break;
@@ -137,8 +150,19 @@
registerMidletApplicationTypeHandler();
#endif
- // Start preinstaller normally (without 'iad' option).
- startPreinstaller(EFalse);
+ TPreinstallerStartMode startMode = ENormal;
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+ if (startConverter())
+ {
+ // Preinstaller must be started with 'waitconversion' command
+ // line option so that it will wait until javaafterflashconverter.exe
+ // has converted existing MIDlets.
+ startMode = ERomUpgrade;
+ }
+#endif
+
+ // Start preinstaller
+ startPreinstaller(startMode);
}
break;
@@ -167,7 +191,7 @@
// All other MMC events are ignored.
case DriveListenerInterface::REMOVABLE_MEDIA_INSERTED_C:
{
- startPreinstaller(EFalse);
+ startPreinstaller(ENormal);
}
break;
}
@@ -181,9 +205,11 @@
* and preinstalls those java applications in the directories that have not
* yet been installed. After that preinstaller exits.
*
- * @param aIadBoot when true, starts preinstaller with 'iad' parameter
+ * @param aStartMode when value is EIad, starts preinstaller with 'iad' parameter
+ * when value is ERomUpgrade, starts preinstaller with 'waitconversion' parameter
+ * when value is ENormal, starts preinstaller with no parameters
*/
-void PreinstallerStarter::startPreinstaller(TBool aIadBoot)
+void PreinstallerStarter::startPreinstaller(TPreinstallerStartMode aStartMode)
{
// Check that the device has enough free memory (800kB) to start preinstaller process
// and (if needed) also java installer
@@ -270,13 +296,17 @@
TPtr8 ptr8((TUint8 *)java::runtime::JAVA_PREINSTALLER_STARTER_DLL, len, len);
commandLine.Copy(ptr8);
- if (aIadBoot)
+ if (aStartMode == EIad)
{
- commandLine.Append(_L(" iad"));
+ commandLine.Append(KIad);
+ }
+ else if (aStartMode == ERomUpgrade)
+ {
+ commandLine.Append(KWaitAFConversion);
}
// start preinstaller
- mPreinstaller = new RProcess();
+ mPreinstaller = new RProcess(); // codescanner::
TBuf<64> preinstallerProcess; // Actual len of the process name is 9
len = strlen(java::runtime::JAVA_PROCESS);
TPtr8 ptr8Process((TUint8 *)java::runtime::JAVA_PROCESS, len, len);
@@ -291,13 +321,20 @@
// Allow the process to run
mPreinstaller->Resume();
- if (aIadBoot)
+ if (aStartMode == EIad)
{
LOG(
EJavaCaptain,
EInfo,
"PreinstallerStarter: started preinstaller with iad parameter");
}
+ else if (aStartMode == ERomUpgrade)
+ {
+ LOG(
+ EJavaCaptain,
+ EInfo,
+ "PreinstallerStarter: started preinstaller with waitconversion parameter");
+ }
else
{
LOG(EJavaCaptain, EInfo, "PreinstallerStarter: started preinstaller");
@@ -415,6 +452,81 @@
}
}
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+/**
+ * Check whether there is flag file 'afconversionsdone.dat' in the private
+ * data cage of Java Captain.
+ * If the flag file exists, just return EFalse to indicate that Java Preinstaller
+ * does not need to wait for after ROM flash converter.
+ * Otherwise start 'javaafterflashconverter.exe' process and return ETrue
+ * so that Java Preinstaller is started with command line parameter that
+ * tells it to wait until 'javaafterflashconverter.exe' exits.
+ */
+TBool PreinstallerStarter::startConverter()
+{
+ RFs fs; // codescanner::rfs
+ TInt err = fs.Connect();
+ if (KErrNone != err)
+ {
+ ELOG1(EJavaCaptain,
+ "PreinstallerStarter:startConverter: "
+ "Cannot connect to RFs, err %d",
+ err);
+ // Assume that the conversion has been done
+ return EFalse;
+ }
+
+ // Check whether the flag file exists
+ TUint value;
+ TBool flagFileExists(ETrue);
+ err = fs.Att(KAfterFlashConversionDone, value);
+ if ((KErrNotFound == err) || (KErrPathNotFound == err))
+ {
+ flagFileExists = EFalse;
+ }
+ else if (KErrNone == err)
+ {
+ LOG(EJavaCaptain,
+ EInfo,
+ "PreinstallerStarter:startConverter: Flag file exists");
+ flagFileExists = ETrue;
+ }
+ else
+ {
+ WLOG1(EJavaCaptain,
+ "PreinstallerStarter:startConverter: Checking flag file, unexpected error %d",
+ err);
+ // Assume that the conversion has been done
+ flagFileExists = ETrue;
+ }
+
+ if (flagFileExists)
+ {
+ // Conversion has been done, no need to start converter process.
+ return EFalse;
+ }
+
+ // Start 'javaafterflashconverter.exe' process
+ RProcess converter;
+ err = converter.Create(KAfterFlashConverterExe, KNullDesC);
+ if (KErrNone == err)
+ {
+ converter.Resume();
+ LOG(EJavaCaptain, EInfo,
+ "PreinstallerStarter:startConverter: javaafterflashconverter.exe was started ok");
+ }
+ else
+ {
+ ELOG1(EJavaCaptain,
+ "PreinstallerStarter:startConverter: starting javaafterflashconverter failed: %d",
+ err);
+ }
+ converter.Close();
+
+ return ETrue;
+}
+#endif
+
} // namespace captain
} // namespace java
--- a/javamanager/javainstaller/installer/build/build.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/build/build.xml Fri Oct 29 11:49:32 2010 +0300
@@ -12,7 +12,7 @@
#
# Contributors:
#
-# Description:
+# Description:
#
-->
@@ -82,6 +82,7 @@
<target name="create.internal.api.jar">
<omj.internal.apis includes="com/nokia/mj/impl/installer/jsrpluginnotifier/InstallerExtension.class,
+ com/nokia/mj/impl/installer/jsrpluginnotifier/InstallerExtensionException.class,
com/nokia/mj/impl/installer/jsrpluginnotifier/InstallerExtensionInfo.class,
com/nokia/mj/impl/installer/pushregistrator/PushApplicationInfo.class,
com/nokia/mj/impl/installer/pushregistrator/PushInfo.class,
--- a/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistrator.java Fri Oct 29 11:49:32 2010 +0300
@@ -22,6 +22,7 @@
import com.nokia.mj.impl.installer.utils.InstallerException;
import com.nokia.mj.impl.installer.utils.FileRoots;
import com.nokia.mj.impl.installer.utils.FileUtils;
+import com.nokia.mj.impl.installer.utils.IconConverterEswt;
import com.nokia.mj.impl.installer.utils.Log;
import com.nokia.mj.impl.installer.utils.PlatformUid;
import com.nokia.mj.impl.utils.Uid;
@@ -347,7 +348,8 @@
* file inside jar file,
* or null if aInputIconFilename specifies file from disk
* @param aIconSuffix the correct suffix of the icon is returned through
- * this parameter, will contain '.mbm' or '.mif' when function returns
+ * this parameter, will contain '.mbm'/'.png' or '.mif'/'.svg'
+ * when function returns
* @return true if the conversion succeeds
*/
public boolean convertIcon(
@@ -356,6 +358,12 @@
String aJarFilename,
StringBuffer aIconSuffix)
{
+ if (SifRegistrator.getSifMode() > 0)
+ {
+ return IconConverterEswt.convertIcon(
+ aInputIconFilename, aOutputIconFilename,
+ aJarFilename, aIconSuffix);
+ }
Log.log("ApplicationRegistrator.convertIcon: " + aInputIconFilename +
" --> " + aOutputIconFilename + ", from jar " + aJarFilename);
return _convertIcon(aInputIconFilename, aOutputIconFilename,
--- a/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc.s60/com/nokia/mj/impl/installer/applicationregistrator/SifRegistrator.java Fri Oct 29 11:49:32 2010 +0300
@@ -384,6 +384,7 @@
int uid = ((PlatformUid)aSuiteInfo.getUid()).getIntValue();
String[] componentFiles = getComponentFiles(aSuiteInfo);
long componentSize = aSuiteInfo.getInitialSize();
+ int installState = (aSuiteInfo.isPreinstalled()? 1: 0);
String attrValue = aSuiteInfo.getAttributeValue("Nokia-MIDlet-Block-Uninstall");
boolean isRemovable = !(attrValue != null && attrValue.equalsIgnoreCase("true"));
boolean isDrmProtected = (aSuiteInfo.getContentInfo() == aSuiteInfo.CONTENT_INFO_DRM);
@@ -397,7 +398,7 @@
iSessionHandle, uid,
getScrString(suiteName), getScrString(vendor),
getScrString(version), getScrString(globalId),
- componentFiles, componentSize,
+ componentFiles, componentSize, installState,
isRemovable, isDrmProtected,
isOriginVerified, aIsUpdate,
aSuiteInfo.getMediaId(),
@@ -867,6 +868,7 @@
* @param aGlobalId
* @param aComponentFiles
* @param aComponentSize
+ * @param aInstallState
* @param aIsRemovable
* @param aIsDrmProtected
* @param aIsOriginVerified
@@ -883,7 +885,7 @@
private static native int _registerComponent(
int aSessionHandle, int aUid, String aSuiteName, String aVendor,
String aVersion, String aGlobalId,
- String[] aComponentFiles, long aComponentSize,
+ String[] aComponentFiles, long aComponentSize, int aInstallState,
boolean aIsRemovable, boolean aIsDrmProtected,
boolean aIsOriginVerified, boolean aIsUpdate, int aMediaId,
String aMidletInfoUrl, String aMidletDescription,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/InstallerExtensionException.java Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* 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.jsrpluginnotifier;
+
+import com.nokia.mj.impl.utils.InstallerErrorMessage;
+import com.nokia.mj.impl.utils.InstallerDetailedErrorMessage;
+import com.nokia.mj.impl.utils.exception.InstallerExceptionBase;
+
+public class InstallerExtensionException extends InstallerExceptionBase
+{
+
+ /*** ----------------------------- PUBLIC ------------------------------ */
+
+ /**
+ * Constructor
+ *
+ * @param aShortMsgId id for short error message
+ * @param aShortMsgParams parameters for short error message
+ * @param aDetailedMsgId id for detailed error message
+ * @param aDetailedMsgParams parameters for detailed error message
+ * @param aOtaStatusCode OTA status code
+ */
+ public InstallerExtensionException(int aShortMsgId, String[] aShortMsgParams,
+ int aDetailedMsgId, String[] aDetailedMsgParams,
+ int aOtaStatusCode)
+ {
+ super(new InstallerErrorMessage(), aShortMsgId, aShortMsgParams,
+ new InstallerDetailedErrorMessage(), aDetailedMsgId, aDetailedMsgParams,
+ aOtaStatusCode);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param aShortMsgId id for short error message
+ * @param aShortMsgParams parameters for short error message
+ * @param aDetailedMsgId id for detailed error message
+ * @param aDetailedMsgParams parameters for detailed error message
+ * @param aOtaStatusCode OTA status code
+ * @param aRootException the exception which caused this exception
+ */
+ public InstallerExtensionException(int aShortMsgId, String[] aShortMsgParams,
+ int aDetailedMsgId, String[] aDetailedMsgParams,
+ int aOtaStatusCode, Throwable aRootException)
+ {
+ super(new InstallerErrorMessage(), aShortMsgId, aShortMsgParams,
+ new InstallerDetailedErrorMessage(), aDetailedMsgId, aDetailedMsgParams,
+ aOtaStatusCode, aRootException);
+ }
+
+ /*** ---------------------------- PROTECTED --------------------------- */
+ /*** ----------------------------- PACKAGE ---------------------------- */
+ /*** ----------------------------- PRIVATE ---------------------------- */
+ /*** ----------------------------- NATIVE ----------------------------- */
+}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifierBase.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifierBase.java Fri Oct 29 11:49:32 2010 +0300
@@ -76,6 +76,7 @@
* about to be installed by calling the install() method of the plugins.
*
* @param aInfo notification information object
+ * @throws InstallerExtensionException if thrown from any of the Jsr plugins
* @throws InstallerException if any of the Jsr plugins cancels installation
* @see InstallerExtension#install
*/
@@ -83,6 +84,7 @@
{
Log.log("JsrPluginNotifierBase.NotifyInstallation called");
boolean continueInstallation = true;
+ InstallerExtensionException installerExtensionException = null;
InstallerExtension plugin = null;
for (int i = 0; i < iJsrPlugins.size(); i++)
{
@@ -92,6 +94,14 @@
Log.log("Jsr plugin install " + plugin.getClass().getName());
continueInstallation = plugin.install(aInfo);
}
+ catch (InstallerExtensionException iee)
+ {
+ installerExtensionException = iee;
+ Log.logError("Installer Jsr plugin " +
+ plugin.getClass().getName() +
+ " install exception " + iee, iee);
+ continueInstallation = false;
+ }
catch (Throwable t)
{
Log.logError("Installer Jsr plugin " +
@@ -104,9 +114,16 @@
{
// Rollback those plugins which already got notified.
notifyRollbackInstall(aInfo, i);
- InstallerException.internalError(
- "Jsr plugin " + plugin.getClass().getName() +
- " cancelled installation.");
+ if (installerExtensionException != null)
+ {
+ throw installerExtensionException;
+ }
+ else
+ {
+ InstallerException.internalError(
+ "Jsr plugin " + plugin.getClass().getName() +
+ " cancelled installation.");
+ }
}
}
}
@@ -116,6 +133,7 @@
* about to be uninstalled by calling the uninstall() method of the plugins.
*
* @param aInfo notification information object
+ * @throws InstallerExtensionException if thrown from any of the Jsr plugins
* @throws InstallerException if any of the Jsr plugins cancels uninstallation
* @see InstallerExtension#uninstall
*/
@@ -123,6 +141,7 @@
{
Log.log("JsrPluginNotifierBase.notifyUninstallation called");
boolean continueUninstallation = true;
+ InstallerExtensionException installerExtensionException = null;
InstallerExtension plugin = null;
for (int i = 0; i < iJsrPlugins.size(); i++)
{
@@ -132,6 +151,14 @@
Log.log("Jsr plugin uninstall " + plugin.getClass().getName());
continueUninstallation = plugin.uninstall(aInfo);
}
+ catch (InstallerExtensionException iee)
+ {
+ installerExtensionException = iee;
+ Log.logError("Installer Jsr plugin " +
+ plugin.getClass().getName() +
+ " uninstall exception " + iee, iee);
+ continueUninstallation = false;
+ }
catch (Throwable t)
{
Log.logError("Installer Jsr plugin " +
@@ -144,9 +171,16 @@
{
// Rollback those plugins which already got notified.
notifyRollbackUninstall(aInfo, i);
- InstallerException.internalError(
- "Jsr plugin " + plugin.getClass().getName() +
- " cancelled uninstallation.");
+ if (installerExtensionException != null)
+ {
+ throw installerExtensionException;
+ }
+ else
+ {
+ InstallerException.internalError(
+ "Jsr plugin " + plugin.getClass().getName() +
+ " cancelled uninstallation.");
+ }
}
}
}
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/ConvertIcons.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/ConvertIcons.java Fri Oct 29 11:49:32 2010 +0300
@@ -26,6 +26,7 @@
import com.nokia.mj.impl.installer.storagehandler.SuiteInfo;
import com.nokia.mj.impl.installer.utils.FileUtils;
import com.nokia.mj.impl.installer.utils.InstallerException;
+import com.nokia.mj.impl.installer.utils.Log;
import com.nokia.mj.impl.utils.Uid;
@@ -330,8 +331,9 @@
}
else
{
- ball.log("Warning: Converting icon " + iconName + " inside .jar file "
- + ball.iJarFilename + " failed.");
+ Log.logWarning("Converting icon " + iconName +
+ " from " + ball.iJarFilename +
+ " failed.");
// MIDlet icon cannot be used, use already converted suite
// icon if it exists
--- a/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/StartProgressNotifications.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/uninstall/steps/StartProgressNotifications.java Fri Oct 29 11:49:32 2010 +0300
@@ -90,7 +90,7 @@
}
catch (Throwable t)
{
- Log.logError("StartProgressNotifications: SifNotifier.notifyStart failed", t);
+ Log.log("StartProgressNotifications: SifNotifier.notifyStart failed", t);
try
{
ball.iSifNotifier.destroy();
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/utils/IconConverterEswt.java Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,409 @@
+/*
+* 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:
+* Icon conversion utility implemented using eSWT.
+*
+*/
+
+
+package com.nokia.mj.impl.installer.utils;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.jar.JarFile;
+import java.util.jar.JarEntry;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.ImageLoader;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.internal.extension.Toolkit;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Icon conversion utility implemented using eSWT.
+ */
+public class IconConverterEswt
+{
+ /** List of unsupported bitmap image format filename extensions. */
+ private static String[] iUnsupportedBitmapFormats =
+ new String[] { ".wbmp", ".wmf" };
+
+ /**
+ * Converts icon to platform specific format.
+ *
+ * @param aInputIconFilename file name for input icon file
+ * @param aOutputIconFilename file name for output icon file
+ * @param aJarFilename jar file name if aInputIconFilename specifies
+ * file inside jar file,
+ * or null if aInputIconFilename specifies file from disk
+ * @param aIconSuffix the correct suffix of the icon is returned through
+ * this parameter, will contain '.png' or '.svg' when function returns
+ * @return true if the conversion succeeds
+ */
+ public static boolean convertIcon(
+ String aInputIconFilename, String aOutputIconFilename,
+ String aJarFilename, StringBuffer aIconSuffix)
+ {
+ Log.log("IconConverterEswt.convertIcon: " + aInputIconFilename +
+ " to " + aOutputIconFilename + " from " + aJarFilename);
+ boolean result = false;
+ try
+ {
+ if (isSvgIcon(aInputIconFilename, aJarFilename))
+ {
+ result = convertSvgIcon(
+ aInputIconFilename, aOutputIconFilename,
+ aJarFilename, aIconSuffix);
+ }
+ else
+ {
+ result = convertBitmapIcon(
+ aInputIconFilename, aOutputIconFilename,
+ aJarFilename, aIconSuffix);
+ }
+ }
+ catch (Throwable t)
+ {
+ Log.logWarning("IconConverterEswt.convertIcon: Exception when " +
+ "converting " + aInputIconFilename + " to " +
+ aOutputIconFilename + " from " + aJarFilename, t);
+ }
+ return result;
+ }
+
+ /**
+ * Converts bitmap icon to platform specific format.
+ *
+ * @param aInputIconFilename file name for input icon file
+ * @param aOutputIconFilename file name for output icon file
+ * @param aJarFilename jar file name if aInputIconFilename specifies
+ * file inside jar file,
+ * or null if aInputIconFilename specifies file from disk
+ * @param aIconSuffix the correct suffix of the icon is returned through
+ * this parameter
+ * @return true if the conversion succeeds
+ */
+ private static boolean convertBitmapIcon(
+ String aInputIconFilename, String aOutputIconFilename,
+ String aJarFilename, StringBuffer aIconSuffix)
+ {
+ if (!isSupportedBitmapIcon(aInputIconFilename, aJarFilename))
+ {
+ Log.logWarning("IconConverterEswt.convertBitmapIcon: unsupported " +
+ "image format " + aInputIconFilename + " from " +
+ aJarFilename + " not converted");
+ return false;
+ }
+
+ final Display display = Toolkit.getInternalDisplay();
+ if (display == null)
+ {
+ Log.logWarning("IconConverterEswt: Getting Display failed, " +
+ "icon conversion aborted for " + aInputIconFilename +
+ " from " + aJarFilename);
+ return false;
+ }
+
+ final Point iconSize = new Point(88, 88);
+ if (iconSize != null)
+ {
+ display.syncExec(new Runnable()
+ {
+ public void run()
+ {
+ display.setData("org.eclipse.swt.internal.image.loadSize",
+ iconSize);
+ }
+ });
+ }
+
+ Image image = null;
+ if (aJarFilename == null)
+ {
+ // Load image from file.
+ image = new Image(display, aInputIconFilename);
+ }
+ else
+ {
+ // Load image from jar file.
+ JarFile jarFile = null;
+ try
+ {
+ jarFile = new JarFile(aJarFilename);
+ InputStream inputStream = jarFile.getInputStream(
+ new JarEntry(FileUtils.trimJarEntry(aInputIconFilename)));
+ image = new Image(display, inputStream);
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Getting icon " +
+ aInputIconFilename + " from " +
+ aJarFilename + " failed", ioe);
+ }
+ finally
+ {
+ if (jarFile != null)
+ {
+ try
+ {
+ jarFile.close(); // Closes also InputStream.
+ jarFile = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Closing " +
+ aJarFilename + " failed", ioe);
+ }
+ }
+ }
+ }
+
+ boolean result = false;
+ if (image != null)
+ {
+ // Save image to file.
+ OutputStream outputStream = null;
+ try
+ {
+ outputStream = FileUtils.getOutputStream(aOutputIconFilename);
+ ImageLoader imageLoader = new ImageLoader();
+ imageLoader.data = new ImageData[] { image.getImageData() };
+ imageLoader.save(outputStream, SWT.IMAGE_PNG);
+ aIconSuffix.append(".png");
+ result = true;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Saving icon " +
+ aOutputIconFilename + " failed", ioe);
+ }
+ finally
+ {
+ if (outputStream != null)
+ {
+ try
+ {
+ outputStream.close();
+ outputStream = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Closing " +
+ aOutputIconFilename + " failed", ioe);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Converts SVG icon to platform specific format.
+ *
+ * @param aInputIconFilename file name for input icon file
+ * @param aOutputIconFilename file name for output icon file
+ * @param aJarFilename jar file name if aInputIconFilename specifies
+ * file inside jar file,
+ * or null if aInputIconFilename specifies file from disk
+ * @param aIconSuffix the correct suffix of the icon is returned through
+ * this parameter
+ * @return true if the conversion succeeds
+ */
+ private static boolean convertSvgIcon(
+ String aInputIconFilename, String aOutputIconFilename,
+ String aJarFilename, StringBuffer aIconSuffix)
+ {
+ boolean result = false;
+ JarFile jarFile = null;
+ InputStream inputStream = null;
+ OutputStream outputStream = null;
+ try
+ {
+ if (aJarFilename == null)
+ {
+ inputStream = FileUtils.getInputStream(aInputIconFilename);
+ }
+ else
+ {
+ jarFile = new JarFile(aJarFilename);
+ inputStream = jarFile.getInputStream(
+ new JarEntry(FileUtils.trimJarEntry(aInputIconFilename)));
+ }
+ outputStream = FileUtils.getOutputStream(aOutputIconFilename);
+ // Copy the image data from InputStream to OutputStream.
+ byte[] buf = new byte[16384];
+ int i = 0;
+ while ((i = inputStream.read(buf)) != -1)
+ {
+ outputStream.write(buf, 0, i);
+ }
+ aIconSuffix.append(".svg");
+ result = true;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Saving SVG icon " +
+ aInputIconFilename + " from " +
+ aJarFilename + " to " + aOutputIconFilename +
+ " failed", ioe);
+ }
+ finally
+ {
+ if (outputStream != null)
+ {
+ try
+ {
+ outputStream.close();
+ outputStream = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Closing " +
+ aOutputIconFilename + " failed", ioe);
+ }
+ }
+ if (inputStream != null)
+ {
+ try
+ {
+ inputStream.close();
+ inputStream = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Closing " +
+ aInputIconFilename + " failed", ioe);
+ }
+ }
+ if (jarFile != null)
+ {
+ try
+ {
+ jarFile.close();
+ jarFile = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt: Closing " +
+ aJarFilename + " failed", ioe);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Returns true if given icon file is in SVG format.
+ */
+ private static boolean isSvgIcon(String aIconFilename, String aJarFilename)
+ {
+ boolean result = false;
+ // Simple file type detection from filename extension.
+ //if (aIconFilename.toLowerCase().endsWith(".svg"))
+ //{
+ // result = true;
+ //}
+ //return result;
+
+ // Detect SVG files by checking if file begins with "<?xml".
+ JarFile jarFile = null;
+ InputStream inputStream = null;
+ try
+ {
+ if (aJarFilename == null)
+ {
+ inputStream = FileUtils.getInputStream(aIconFilename);
+ }
+ else
+ {
+ jarFile = new JarFile(aJarFilename);
+ inputStream = jarFile.getInputStream(
+ new JarEntry(FileUtils.trimJarEntry(aIconFilename)));
+ }
+ byte[] bytes = new byte[5];
+ int readCount = inputStream.read(bytes);
+ if (readCount == bytes.length)
+ {
+ result = true;
+ byte[] xmlDecl = { '<', '?', 'x', 'm', 'l' };
+ for (int i = 0; i < readCount; i++)
+ {
+ if (bytes[i] != xmlDecl[i])
+ {
+ result = false;
+ break;
+ }
+ }
+ }
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt.isSvgIcon: Checking file type of " +
+ aIconFilename + " from " + aJarFilename +
+ " failed", ioe);
+ }
+ finally
+ {
+ if (inputStream != null)
+ {
+ try
+ {
+ inputStream.close();
+ inputStream = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt.isSvgIcon: Closing " +
+ aIconFilename + " failed", ioe);
+ }
+ }
+ if (jarFile != null)
+ {
+ try
+ {
+ jarFile.close();
+ jarFile = null;
+ }
+ catch (IOException ioe)
+ {
+ Log.logWarning("IconConverterEswt.isSvgIcon: Closing " +
+ aJarFilename + " failed", ioe);
+ }
+ }
+ }
+ return result;
+ }
+
+ /**
+ * Returns true if given icon file is in supported bitmap format.
+ */
+ private static boolean isSupportedBitmapIcon(
+ String aIconFilename, String aJarFilename)
+ {
+ boolean result = true;
+ for (int i = 0; i < iUnsupportedBitmapFormats.length; i++)
+ {
+ if (aIconFilename.toLowerCase().endsWith(
+ iUnsupportedBitmapFormats[i]))
+ {
+ result = false;
+ break;
+ }
+ }
+ return result;
+ }
+}
--- a/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifregistrator.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/src.s60/applicationregistrator/sifregistrator.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -58,6 +58,7 @@
_LIT(KMIDletDescription, "MIDlet-Description");
_LIT(KDownloadURL, "Download-URL");
_LIT(KUpdateURL, "Update-URL");
+_LIT(KInstallState, "InstallState");
_LIT(KSettingsPlugin, "SettingsName");
_LIT(KSettingsPluginValue, "javaapplicationsettingsview");
@@ -387,7 +388,7 @@
TComponentId RegisterComponentL(
JNIEnv *aEnv, RSoftwareComponentRegistry *aScr, jint aUid,
jstring aSuiteName, jstring aVendor, jstring aVersion, jstring aGlobalId,
- jobjectArray aComponentFiles, TInt64 aComponentSize,
+ jobjectArray aComponentFiles, TInt64 aComponentSize, jint aInstallState,
TBool aIsRemovable, TBool aIsDrmProtected,
TBool aIsOriginVerified, TBool aIsUpdate, jint aMediaId,
jstring aMidletInfoUrl, jstring aMidletDescription,
@@ -419,6 +420,8 @@
//LOG(EJavaInstaller, EInfo, "RegisterComponentL: Media-Id property set");
aScr->SetComponentPropertyL(componentId, KSettingsPlugin(), KSettingsPluginValue());
//LOG(EJavaInstaller, EInfo, "RegisterComponentL: Settings plugin property set");
+ aScr->SetComponentPropertyL(componentId, KInstallState(), aInstallState);
+ //LOG(EJavaInstaller, EInfo, "RegisterComponentL: InstallState property set");
SetComponentPropertyL(aEnv, aScr, componentId, KMIDletInfoURL(), aMidletInfoUrl);
SetComponentPropertyL(aEnv, aScr, componentId, KMIDletDescription(), aMidletDescription);
@@ -450,10 +453,11 @@
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_SifRegistrator__1registerComponent
(JNIEnv *aEnv, jclass, jint aSessionHandle, jint aUid, jstring aSuiteName,
jstring aVendor, jstring aVersion, jstring aGlobalId,
- jobjectArray aComponentFiles, jlong aComponentSize, jboolean aIsRemovable,
- jboolean aIsDrmProtected, jboolean aIsOriginVerified, jboolean aIsUpdate,
- jint aMediaId, jstring aMidletInfoUrl, jstring aMidletDescription,
- jstring aDownloadUrl, jstring aUpdateUrl, jobject aComponentId)
+ jobjectArray aComponentFiles, jlong aComponentSize, jint aInstallState,
+ jboolean aIsRemovable, jboolean aIsDrmProtected, jboolean aIsOriginVerified,
+ jboolean aIsUpdate, jint aMediaId, jstring aMidletInfoUrl,
+ jstring aMidletDescription, jstring aDownloadUrl, jstring aUpdateUrl,
+ jobject aComponentId)
{
//__UHEAP_MARK;
RSoftwareComponentRegistry *pScr =
@@ -461,7 +465,7 @@
TComponentId componentId = -1;
TRAPD(err, componentId = RegisterComponentL(
aEnv, pScr, aUid, aSuiteName, aVendor, aVersion, aGlobalId,
- aComponentFiles, aComponentSize, aIsRemovable,
+ aComponentFiles, aComponentSize, aInstallState, aIsRemovable,
aIsDrmProtected, aIsOriginVerified, aIsUpdate, aMediaId,
aMidletInfoUrl, aMidletDescription,
aDownloadUrl, aUpdateUrl));
@@ -1085,7 +1089,7 @@
*/
JNIEXPORT jint JNICALL Java_com_nokia_mj_impl_installer_applicationregistrator_SifRegistrator__1registerComponent
(JNIEnv *, jclass, jint, jint, jstring, jstring, jstring, jstring,
- jobjectArray, jlong, jboolean, jboolean, jboolean, jboolean, jint,
+ jobjectArray, jlong, jint, jboolean, jboolean, jboolean, jboolean, jint,
jstring, jstring, jstring, jstring, jobject)
{
return KErrNone;
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistratorTest.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/applicationregistrator/ApplicationRegistratorTest.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 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"
@@ -321,7 +321,7 @@
"GameMIDlet",
// String aTargetDrive,
"C:",
- // String aIconFileName contains alread the name of the converted icon,
+ // String aIconFileName contains the name of the converted icon,
"c:\\private\\102033E6\\installer\\jiutdata\\icon1.mbm",
// String aJarFileName,
"c:\\private\\102033E6\\installer\\jiutdata\\utils\\einstein_EN_FR_IT_DE_ES_N97_v2942.jar",
@@ -348,7 +348,14 @@
boolean convOk = appReg.convertIcon("icon.png", "c:\\private\\102033E6\\installer\\jiutdata\\icon1.mbm",
"c:\\private\\102033E6\\installer\\jiutdata\\utils\\einstein_EN_FR_IT_DE_ES_N97_v2942.jar", iconSuffix);
assertTrue("Icon conversion failed.", convOk);
- assertTrue("Suffix of the converted icon is incorrect.", iconSuffix.toString().equals(".mbm"));
+ // Allowed icon suffixes .mbm and .png.
+ String expectedSuffix = ".mbm";
+ if (iconSuffix.toString().equals(".png"))
+ {
+ expectedSuffix = ".png";
+ }
+ assertTrue("Suffix of the converted icon is incorrect.",
+ iconSuffix.toString().equals(expectedSuffix));
appReg.registerApplication(appRegInfo);
appReg.commitSession(true);
@@ -706,7 +713,14 @@
boolean convOk = appReg.convertIcon("gear.svg", "c:\\private\\102033E6\\installer\\jiutdata\\icon2.mif",
"c:\\private\\102033E6\\installer\\jiutdata\\utils\\MIDPTestMisc.jar", iconSuffix);
assertTrue("Icon conversion failed.", convOk);
- assertTrue("Suffix of the converted icon is incorrect.", iconSuffix.toString().equals(".mif"));
+ // Allowed icon suffixes are .mif and .svg.
+ String expectedSuffix = ".mif";
+ if (iconSuffix.toString().equals(".svg"))
+ {
+ expectedSuffix = ".svg";
+ }
+ assertTrue("Suffix of the converted icon is incorrect.",
+ iconSuffix.toString().equals(expectedSuffix));
appReg.registerApplication(appRegInfo);
appReg.commitSession(true);
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifierTest.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/JsrPluginNotifierTest.java Fri Oct 29 11:49:32 2010 +0300
@@ -283,7 +283,32 @@
}
catch (InstallerException e)
{
- // OK, installation is cancelled ok
+ // OK, expected exception
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ assertTrue("Test plugin threw unexpected exception: " + t, false);
+ }
+
+ att = new Attribute("JSR-Plugin-Test-Exception", "InstallerExtensionException");
+ iInstallerExtensionInfo.iAttributes.put("JSR-Plugin-Test-Exception", att);
+
+ try
+ {
+ notif.notifyInstallation(iInstallerExtensionInfo);
+ // Test plugin TestPlugin2 throws exception if JAD/JAR attribute
+ // JSR-Plugin-Test-Exception2 exists.
+ assertTrue("Test plugin did not throw exception like should have.", false);
+ }
+ catch (InstallerExtensionException iee)
+ {
+ // OK, expected exception
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ assertTrue("Test plugin threw unexpected exception: " + t, false);
}
}
@@ -371,8 +396,34 @@
}
catch (InstallerException e)
{
- // OK, uninstallation is cancelled ok
+ // OK, expected exception
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ assertTrue("Test plugin threw unexpected exception: " + t, false);
}
+
+ att = new Attribute("JSR-Plugin-Test-Exception", "InstallerExtensionException");
+ iInstallerExtensionInfo.iAttributes.put("JSR-Plugin-Test-Exception", att);
+
+ try
+ {
+ notif.notifyUninstallation(iInstallerExtensionInfo);
+ // Test plugin TestPlugin2 throws exception if JAD/JAR attribute
+ // JSR-Plugin-Test-Exception exists.
+ assertTrue("Test plugin did not throw exception like it should have.", false);
+ }
+ catch (InstallerExtensionException iee)
+ {
+ // OK, expected exception
+ }
+ catch (Throwable t)
+ {
+ t.printStackTrace();
+ assertTrue("Test plugin threw unexpected exception: " + t, false);
+ }
+
}
public void testPluginCancelsUninstallation()
--- a/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installer/tsrc/javasrc/com/nokia/mj/impl/installer/jsrpluginnotifier/TestPlugin2.java Fri Oct 29 11:49:32 2010 +0300
@@ -18,6 +18,11 @@
package com.nokia.mj.impl.installer.jsrpluginnotifier;
+import com.nokia.mj.impl.utils.Attribute;
+import com.nokia.mj.impl.utils.InstallerErrorMessage;
+import com.nokia.mj.impl.utils.InstallerDetailedErrorMessage;
+import com.nokia.mj.impl.utils.OtaStatusCode;
+
/**
* Installer Jsr plugin just for test purposes.
*
@@ -52,7 +57,19 @@
if ((aInstallerExtensionInfo.iAttributes != null) &&
(aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null))
{
- throw new RuntimeException("TestPlugin2.install Exception");
+ if ("InstallerExtensionException".equals(
+ ((Attribute)aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception")).getValue()))
+ {
+ throw new InstallerExtensionException(
+ InstallerErrorMessage.INST_UNEXPECTED_ERR, null,
+ InstallerDetailedErrorMessage.INTERNAL_ERROR,
+ new String[] { "TestPlugin2.install Exception" },
+ OtaStatusCode.INTERNAL_ERROR);
+ }
+ else
+ {
+ throw new RuntimeException("TestPlugin2.install Exception");
+ }
}
return true;
@@ -85,7 +102,19 @@
if ((aInstallerExtensionInfo.iAttributes != null) &&
(aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception") != null))
{
- throw new RuntimeException("TestPlugin2.uninstall Exception");
+ if ("InstallerExtensionException".equals(
+ ((Attribute)aInstallerExtensionInfo.iAttributes.get("JSR-Plugin-Test-Exception")).getValue()))
+ {
+ throw new InstallerExtensionException(
+ InstallerErrorMessage.INST_UNEXPECTED_ERR, null,
+ InstallerDetailedErrorMessage.INTERNAL_ERROR,
+ new String[] { "TestPlugin2.uninstall Exception" },
+ OtaStatusCode.INTERNAL_ERROR);
+ }
+ else
+ {
+ throw new RuntimeException("TestPlugin2.uninstall Exception");
+ }
}
return true;
--- a/javamanager/javainstaller/installerui/data/javaapplicationinstaller.css Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/data/javaapplicationinstaller.css Fri Oct 29 11:49:32 2010 +0300
@@ -17,21 +17,41 @@
QScrollArea#dialogArea {
/* General size parameters for all installer dialogs */
-
/* this depends on display; NHD portrait width:360px and height:640px used */
/* Note that popup width and height is according to portrait dimensions, and is the same in portrait and landscape */
width: 346.6px; /*expr(var(hb-param-screen-short-edge)- 2*var(hb-param-margin-gene-screen)); /* 2un*/
/*height: /*the size of MessageBox with 3-5 rows of text? */
max-height: 626.6px; /*expr(var(hb-param-long-edge)-2*var(hb-param-margin-gene-screen));
/*position: vertically and horizontally centre of screen - is this needed?*/
+ border: 1px solid;
+ border-radius: 7px;
+}
+
+QScrollArea#headingArea {
+ /* Heading area style for installation dialogs. */
+ border: 1px solid;
+ border-top-left-radius: 7px;
+ border-top-right-radius: 7px;
+}
+
+QScrollArea#contentArea {
+ /* Content area style for installation dialogs. */
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+QScrollArea#commandButtonArea {
+ /* Command button area style for installation dialogs. */
+ border: 1px solid;
+ border-bottom-left-radius: 7px;
+ border-bottom-right-radius: 7px;
}
QScrollArea#appInfoArea {
- /* This is valid for all installation query application details,
+ /* This is valid for all installation dialog application details,
* and also for application details in short error message */
- /* (ViewBase) */
/* Note: this text area becomes scrollable if there are more text
- * that can be displayed at one time (this could be also QAbstractScrollArea?)*/
+ * that can be displayed at a time. */
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
@@ -39,22 +59,23 @@
}
QLabel#appInfoLabel {
- /* The font size of application details; each detail is its own label */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
+ font-size: 20px;
}
QLabel#heading {
- /* Any installation query heading text: its text size, and top/left margins */
- font-size: 26.8px; /*hb-param-text-height-primary;/*4un*/
+ /* Any installation dialog heading text. */
font-weight: bold;
max-height: 53.6px; /*expr(var(hb-param-text-height-primary)+2*var(hb-param-margin-gene-popup)) - same as hb-param-widget-popup-heading-height;*/
margin-top: 13.4px; /*hb-param-margin-gene-top; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-left; /*2un*/
+ padding-bottom: 13.4px;
}
QLabel#contentIcon {
- /* This is valid for all icons displayed in the installation query content area */
- /* Application icon, question icon, error icon in installation error dialog etc */
+ /* This is valid for all icons displayed in the
+ * installation dialog content area;
+ * application icon, question icon, error icon in
+ * installation error dialog, etc. */
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
/* size of icon - fixed size */
@@ -65,66 +86,61 @@
}
QComboBox#driveSelector{
- /* Combo box in installationquery. Need to define the top margin at least (InstallConfirmationView). */
+ /* Combo box in installation dialog. */
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
}
QProgressBar#progressBar{
- /* Progress bar in installationquery. Need to define the top margin at least (ProgressView). */
+ /* Progress bar in installation dialog. */
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
}
QLabel#permissionDetails{
- /* String that requests access for protected functionality in permission query */
- /* (PermissionInfo) */
+ /* String that requests access for protected functionality
+ * in permission query. */
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
}
QLabel#errorLabel{
- /* short error message from USIF (note: this is not Java specific error message but
- * common to all installers), (ErrorView) */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
+ /* Short error message (note: this is not Java specific error message but
+ * common to all installers). */
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
}
QLabel#detailsWarningLabel{
- /* Application is certified / is not certified views and permission details
- * view texts (CertificateDetailsView, PermissionDetailsView) */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
+ /* Application is certified / is not certified views and
+ * permission details view texts. */
}
QLabel#urlLabel{
- /* Text in authentication dialog (UsernamePasswordView) */
- /* Note that this dialog is always in portrait */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
+ /* Text in authentication dialog. */
+ /* Note that this dialog is always in portrait. */
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
}
QLabel#authLabel{
- /* Text in authentication dialog (UsernamePasswordView) */
+ /* Text in authentication dialog. */
/* Note that this dialog is always in portrait */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
}
QLabel#usernamePasswordLabel{
- /* Label of username and password input fields in authentication dialog (UsernamePasswordView) */
+ /* Label of username and password input fields in
+ * authentication dialog. */
/* Note that this dialog is always in portrait */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
}
QLabel#usernamePasswordInputField{
- /* Input fields of username and password in authentication dialog (UsernamePasswordView) */
+ /* Input fields of username and password in authentication dialog. */
/* Note that this dialog is always in portrait */
- font-size: 23.45px; /*hb-param-text-height-secondary; /*3.5un*/
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
@@ -133,76 +149,59 @@
/* --- Buttons --- */
-QPushButton {
- font-size: 20.1px;/* hb-param-text-height-tiny; /*3un*/
-}
-
QPushButton#softKeyButton{
- /* Installation query OK button (ConfirmationViewBase) */
- margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
- height: 50.25px; /*hb-param-widget-popup-softkey-height;/*7.5un*/
- /* this depends on display; NHD portrait width:360px and height:640px used */
- width: 173.3px; /*expr((var(hb-param-screen-short-edge)-2*var(hb-param-margin-gene-screen))/2); /* width of one button is half of popup width*/
+ /* Installation query OK button. */
+ height: 40px;
}
QPushButton#softKeyButtonWide{
- /* Ok button to go back from a details view (application is certified / not certified views
- * and permission details view) (CertificateDetailsView, PermissionDetailsView)*/
- /* this ok button has different top margin otherwise the same as OkCommand button with max-width */
- margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
- height: 50.25px; /*hb-param-widget-popup-softkey-height;/*7.5un*/
+ /* Ok button to go back from a details view (application is
+ * certified / not certified views and permission details view)*/
+ height: 40px;
}
QPushButton#securityButton{
- /* Security lock icon button in installation query heading (ViewBase.createSecurityButton) */
+ /* Security lock icon button in installation dialog heading. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
/* size of icon */
min-width: 26.8px; /* hb-param-graphic-size-primary-small; /*4un*/
max-width: 26.8px; /* hb-param-graphic-size-primary-small; /*4un*/
min-height: 26.8px; /* hb-param-graphic-size-primary-small; /*4un*/
max-height: 26.8px; /* hb-param-graphic-size-primary-small; /*4un*/
-
}
QPushButton#detailsLink{
- /* Button in permission query to view details (PermissionConfirmationView) */
+ /* Button in permission query to view details. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-left; /*2un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
+ font-size: 14px;
}
QPushButton#allowButton{
- /* Allow always function button in permission query */
- /* (PermissionConfirmationView) */
+ /* Allow always function button in permission query. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
-
}
QPushButton#denyButton{
- /* Ask me later function buttons in permission query */
- /* (PermissionConfirmationView) */
+ /* Ask me later function buttons in permission query. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
}
QPushButton#cancelButton{
- /* Cancel installing function button in permission query */
- /* (PermissionConfirmationView) */
+ /* Cancel installing function button in permission query. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 5.025px; /*hb-param-margin-gene-middle-vertical; /*0.75un*/
margin-bottom: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
-
}
-QCheckBox#retainDataButton {
- /* Retain user data check box button in update query */
- /* Note that there is 2*hb-param-margin-gene-middle-vertical margin at the top as this check box is placed
- * after drive selector combo */
- /* (InstallConfirmationView) */
+QPushButton#retainDataButton {
+ /* Retain user data check box button in update query. */
margin-right: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-left: 13.4px; /*hb-param-margin-gene-popup; /*2un*/
margin-top: 10.05px; /*expr(2*var(hb-param-margin-gene-middle-vertical));
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/CertificateDetailsView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/CertificateDetailsView.java Fri Oct 29 11:49:32 2010 +0300
@@ -77,8 +77,9 @@
// Add title label.
Label detailsLabel = createLabel(
- InstallerUiTexts.get(InstallerUiTexts.NOT_CERTIFIED_TITLE),
- horizontalSpan, labelStyle);
+ getHeadingComposite(),
+ InstallerUiTexts.get(InstallerUiTexts.NOT_CERTIFIED_TITLE),
+ getHeadingColumns(), labelStyle);
setCssId(detailsLabel, "heading");
// Add domain category label.
@@ -102,7 +103,6 @@
InstallerUiTexts.get(InstallerUiTexts.NOT_CERTIFIED_INFO,
new String[] { appName }),
horizontalSpan, labelStyle);
-
setCssId(warningLabel, "detailsWarningLabel");
}
@@ -115,10 +115,10 @@
int labelStyle = SWT.WRAP;
// Add title label.
- Label detailsLabel = createLabel
- (InstallerUiTexts.get
- (InstallerUiTexts.CERTIFICATE_TITLE),
- horizontalSpan, labelStyle);
+ Label detailsLabel = createLabel(
+ getHeadingComposite(),
+ InstallerUiTexts.get(InstallerUiTexts.CERTIFICATE_TITLE),
+ getHeadingColumns(), labelStyle);
setCssId(detailsLabel, "heading");
SigningCertificate certificate = iCerts[iCertIndex];
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ConfirmationViewBase.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ConfirmationViewBase.java Fri Oct 29 11:49:32 2010 +0300
@@ -68,6 +68,12 @@
super(aInstallerUi, aParent, aColumns, aScrollable);
}
+ /** Constructor */
+ protected ConfirmationViewBase(InstallerUiEswt aInstallerUi, Composite aParent, int aColumns, boolean aScrollable, int aComposites)
+ {
+ super(aInstallerUi, aParent, aColumns, aScrollable, aComposites);
+ }
+
/**
* Set user visible command names for OK and Cancel commands.
* If either parameter is null, then default value is used.
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorDetailsView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorDetailsView.java Fri Oct 29 11:49:32 2010 +0300
@@ -40,7 +40,7 @@
/** Constructor */
protected ErrorDetailsView(InstallerUiEswt aInstallerUi, Composite aParent)
{
- super(aInstallerUi, aParent, 8);
+ super(aInstallerUi, aParent, 8, false, COMMAND_COMPOSITE);
setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED));
setCommands(InstallerUiTexts.get(InstallerUiTexts.OK), null);
}
@@ -68,21 +68,25 @@
*/
protected void createView()
{
+ /*
// Add title.
Label titleLabel = null;
String title = InstallerUiTexts.get(InstallerUiTexts.INSTALL_FAILED);
if (iInstallerUi.getInstallInfo() != null)
{
- titleLabel = createLabel(title, getColumns() - 1, SWT.WRAP);
+ titleLabel = createLabel(
+ getHeadingComposite(), title, getHeadingColumns()-1, SWT.WRAP);
// Add security icon.
iCertificates = iInstallerUi.getInstallInfo().getCertificates();
- createSecurityButton();
+ createSecurityButton(getHeadingComposite());
}
else
{
- titleLabel = createLabel(title, getColumns(), SWT.WRAP);
+ titleLabel = createLabel(
+ getHeadingComposite(), title, getHeadingColumns(), SWT.WRAP);
}
setCssId(titleLabel, "heading");
+ */
int horizontalSpan = getColumns();
int labelStyle = SWT.WRAP;
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ErrorView.java Fri Oct 29 11:49:32 2010 +0300
@@ -77,7 +77,8 @@
}
else
{
- Label titleLabel = createLabel(title, getColumns(), SWT.WRAP);
+ Label titleLabel = createLabel(
+ getHeadingComposite(), title, getHeadingColumns(), SWT.WRAP);
setCssId(titleLabel, "heading");
}
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionConfirmationView.java Fri Oct 29 11:49:32 2010 +0300
@@ -61,7 +61,7 @@
protected PermissionConfirmationView(
InstallerUiEswt aInstallerUi, Composite aParent)
{
- super(aInstallerUi, aParent, 8);
+ super(aInstallerUi, aParent, 8, false, TITLE_COMPOSITE);
setTitle(InstallerUiTexts.get(InstallerUiTexts.INSTALLING));
setCommands(null, null);
}
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionDetailsView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/PermissionDetailsView.java Fri Oct 29 11:49:32 2010 +0300
@@ -43,7 +43,7 @@
InstallerUiEswt aInstallerUi, Composite aParent,
String aTitle, PermissionInfo aPermissionInfo)
{
- super(aInstallerUi, aParent, 1, true);
+ super(aInstallerUi, aParent, 1, true, COMMAND_COMPOSITE);
iPermissionInfo = aPermissionInfo;
setTitle(aTitle);
setCommands(null, InstallerUiTexts.get(InstallerUiTexts.CLOSE));
@@ -60,11 +60,11 @@
int labelStyle = SWT.WRAP;
// Add title label.
- Label detailsLabel = createLabel
- (InstallerUiTexts.get
- (InstallerUiTexts.PERM_VIEW_DETAILS_TITLE),
- horizontalSpan, labelStyle);
- setCssId(detailsLabel, "heading");
+ Label titleLabel = createLabel(
+ InstallerUiTexts.get(
+ InstallerUiTexts.PERM_VIEW_DETAILS_TITLE),
+ horizontalSpan, labelStyle);
+ setCssId(titleLabel, "heading");
// Add permission names.
String[] permNames = iPermissionInfo.getPermissionNames();
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ProgressView.java Fri Oct 29 11:49:32 2010 +0300
@@ -85,7 +85,8 @@
else
{
setTitle(iMsg);
- iLabel = createLabel(iMsg, SWT.WRAP);
+ iLabel = createLabel(getHeadingComposite(), iMsg,
+ getHeadingColumns(), SWT.WRAP);
setCssId(iLabel, "heading");
}
--- a/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ViewBase.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt2/ViewBase.java Fri Oct 29 11:49:32 2010 +0300
@@ -50,6 +50,13 @@
*/
abstract public class ViewBase
{
+ /** Is command composite present in this view. */
+ protected static final int COMMAND_COMPOSITE = 1;
+ /** Is title composite present in this view. */
+ protected static final int TITLE_COMPOSITE = 2;
+ /** Which composites are present in this view. */
+ private int iComposites = COMMAND_COMPOSITE | TITLE_COMPOSITE;
+
/** Maximum view height in percentage from display client area height. */
protected static final int MAX_VIEW_HEIGHT = 80;
/** Maximum view width in percentage from display client area width. */
@@ -58,6 +65,8 @@
protected Shell iParent = null;
/** Container for the contents of the view */
private Composite iContainer = null;
+ /** Composite for heading. */
+ private Composite iHeadingComposite = null;
/** ScrolledComposite for iComposite. */
private ScrolledComposite iScrolledComposite = null;
/** Composite to which subclasses add their widgets. */
@@ -104,7 +113,14 @@
/** Constructor */
protected ViewBase(InstallerUiEswt aInstallerUi, Composite aParent, int aColumns, boolean aScrollable)
{
+ this(aInstallerUi, aParent, aColumns, aScrollable, COMMAND_COMPOSITE | TITLE_COMPOSITE);
+ }
+
+ /** Constructor */
+ protected ViewBase(InstallerUiEswt aInstallerUi, Composite aParent, int aColumns, boolean aScrollable, int aComposites)
+ {
iInstallerUi = aInstallerUi;
+ iComposites = aComposites;
// Each view gets a shell to be used as a parameter.
iParent = (Shell)aParent;
@@ -123,10 +139,22 @@
// Let the contents fill the Shell.
iContainer.setLayout(setZeroMargins(new GridLayout()));
+ if (isCompositePresent(TITLE_COMPOSITE))
+ {
+ // Create a composite for heading.
+ iHeadingComposite = new Composite(iContainer, SWT.NONE);
+ setCssId(iHeadingComposite, "headingArea");
+ GridLayout headingLayout = setZeroMargins(
+ new GridLayout(getHeadingColumns(), true));
+ iHeadingComposite.setLayout(headingLayout);
+ iHeadingComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
+
if (aScrollable)
{
// Create a ScrolledComposite for views which need ScrollBars.
iScrolledComposite = new ScrolledComposite(iContainer, getStyle());
+ setCssId(iScrolledComposite, "contentArea");
iScrolledComposite.setAlwaysShowScrollBars(false);
iScrolledComposite.setExpandHorizontal(true);
iScrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -139,30 +167,26 @@
{
// Create the composite without ScrollBars.
iComposite = new Composite(iContainer, SWT.NONE);
+ setCssId(iComposite, "contentArea");
GridLayout compLayout =
setZeroMargins(new GridLayout(getColumns(), true));
iComposite.setLayout(compLayout);
iComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
}
- // Create a composite for command buttons.
- iCommandComposite = new Composite(iContainer, SWT.NONE);
- GridLayout cmdLayout = setZeroMargins(new GridLayout(2, true));
- cmdLayout.marginTop = 5;
- iCommandComposite.setLayout(cmdLayout);
- iCommandComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ if (isCompositePresent(COMMAND_COMPOSITE))
+ {
+ // Create a composite for command buttons.
+ iCommandComposite = new Composite(iContainer, SWT.NONE);
+ setCssId(iCommandComposite, "commandButtonArea");
+ GridLayout cmdLayout = setZeroMargins(new GridLayout(2, true));
+ iCommandComposite.setLayout(cmdLayout);
+ iCommandComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ }
// Layout now and get the default size of the content area.
iContainer.layout(true);
- Rectangle rect = null;
- if (aScrollable)
- {
- rect = iScrolledComposite.getClientArea();
- }
- else
- {
- rect = iComposite.getClientArea();
- }
+ Rectangle rect = iContainer.getClientArea();
iDefaultContentSize = new Point(rect.width, rect.height);
}
@@ -174,6 +198,12 @@
return iContainer;
}
+ /** Returns composite for heading. */
+ public Composite getHeadingComposite()
+ {
+ return iHeadingComposite;
+ }
+
/** Returns composite to which subclasses can add their widgets. */
public Composite getComposite()
{
@@ -354,10 +384,6 @@
/** Sets the view size according to display size. */
private void doUpdateSize(boolean aVerticalScrollBarVisible)
{
- Shell shell = getShell();
- Composite comp = getComposite();
- Composite cmdComp = getCommandComposite();
-
if (getAppInfoComposite() != null)
{
// Recalculate the size of the app info composite.
@@ -377,48 +403,60 @@
}
}
- int contentWidth = iDefaultContentSize.x * MAX_VIEW_WIDTH / 100;
+ int contentWidth = iDefaultContentSize.x;
if (aVerticalScrollBarVisible)
{
- int verticalScrollBarWidth =
+ contentWidth = getComposite().getSize().x -
getScrolledComposite().getVerticalBar().getSize().x;
- contentWidth -= verticalScrollBarWidth;
}
// Recalculate the size of the content.
- Point contentSize = comp.computeSize(contentWidth, SWT.DEFAULT);
- comp.setSize(contentSize);
- Point cmdContentSize = cmdComp.computeSize(iDefaultContentSize.x, SWT.DEFAULT);
- cmdComp.setSize(cmdContentSize);
+ Point headingContentSize = new Point(0, 0);
+ if (isCompositePresent(TITLE_COMPOSITE))
+ {
+ headingContentSize =
+ getHeadingComposite().computeSize(
+ iDefaultContentSize.x, SWT.DEFAULT);
+ getHeadingComposite().setSize(headingContentSize);
+ }
+ Point contentSize =
+ getComposite().computeSize(contentWidth, SWT.DEFAULT);
+ getComposite().setSize(contentSize);
+ Point cmdContentSize = new Point(0, 0);
+ if (isCompositePresent(COMMAND_COMPOSITE))
+ {
+ cmdContentSize =
+ getCommandComposite().computeSize(
+ iDefaultContentSize.x, SWT.DEFAULT);
+ getCommandComposite().setSize(cmdContentSize);
+ }
// Adjust Shell height and width.
- Rectangle dispRect = shell.getDisplay().getClientArea();
- int offset = iDefaultContentSize.y - contentSize.y - cmdContentSize.y;
-
+ Rectangle dispClientArea = getShell().getDisplay().getClientArea();
Rectangle defShellBounds = iInstallerUi.getDefaultShellBounds();
+ int offset = iDefaultContentSize.y - headingContentSize.y
+ - contentSize.y - cmdContentSize.y;
int newHeight = defShellBounds.height - offset;
- int maxHeight = dispRect.height * MAX_VIEW_HEIGHT / 100;
-
+ int maxHeight = dispClientArea.height * MAX_VIEW_HEIGHT / 100;
if (newHeight > maxHeight)
{
- offset -= maxHeight - newHeight;
newHeight = maxHeight;
}
int newWidth = defShellBounds.width;
- int maxWidth = dispRect.width * MAX_VIEW_WIDTH / 100;
+ int maxWidth = dispClientArea.width * MAX_VIEW_WIDTH / 100;
if (newWidth > maxWidth)
{
newWidth = maxWidth;
}
// Always center horizontally and vertically.
- Rectangle dispBounds = shell.getDisplay().getBounds();
+ Rectangle dispBounds = getShell().getDisplay().getBounds();
int x = dispBounds.width - newWidth;
int y = dispBounds.height - newHeight;
x /= 2;
y /= 2;
- shell.setBounds(x, y, newWidth, newHeight);
- Rectangle clientArea = shell.getClientArea();
+ getShell().setBounds(x, y, newWidth, newHeight);
+ Rectangle clientArea = getShell().getClientArea();
iContainer.setSize(clientArea.width, clientArea.height);
iContainer.layout(true);
}
@@ -464,6 +502,24 @@
}
/**
+ * Returns true if specified composite is present in this view.
+ *
+ * @param aComposite COMMAND_COMPOSITE or TITLE_COMPOSITE.
+ */
+ protected boolean isCompositePresent(int aComposites)
+ {
+ return ((iComposites & aComposites) != 0);
+ }
+
+ /**
+ * Returns number of columns for heading of view.
+ */
+ protected int getHeadingColumns()
+ {
+ return 8;
+ }
+
+ /**
* Returns number of columns for this view.
*/
protected int getColumns()
@@ -481,20 +537,12 @@
/**
* Adds header used in installation views.
+ * Note that this method can be called only for views which
+ * have TITLE_COMPOSITE defined.
*/
protected void addHeader(
String aTitle, InstallInfo aInstallInfo, UninstallInfo aUninstallInfo)
{
- addHeader(aTitle, aInstallInfo, aUninstallInfo, true);
- }
-
- /**
- * Adds header used in installation views.
- */
- protected void addHeader(
- String aTitle, InstallInfo aInstallInfo, UninstallInfo aUninstallInfo,
- boolean aSecurityButton)
- {
// Add title.
if (aTitle == null)
{
@@ -504,7 +552,8 @@
aTitle = InstallerUiTexts.get(InstallerUiTexts.UPDATE_QUERY);
}
}
- Label titleLabel = createLabel(aTitle, getColumns() - 1, SWT.WRAP);
+ Label titleLabel = createLabel(
+ getHeadingComposite(), aTitle, getHeadingColumns() - 1, SWT.WRAP);
setCssId(titleLabel, "heading");
if (aInstallInfo != null)
@@ -515,16 +564,8 @@
{
iCertificates = aUninstallInfo.getCertificates();
}
- if (aSecurityButton)
- {
- // Add security button.
- createSecurityButton();
- }
- else
- {
- // Add security icon.
- createSecurityLabel(iCertificates != null);
- }
+ // Add security button.
+ createSecurityButton(getHeadingComposite());
// Init suite icon data.
if (aInstallInfo != null)
@@ -669,7 +710,23 @@
*/
protected Label createLabel(String aText, int aColumns, int aStyle)
{
- Label label = new Label(getComposite(), aStyle);
+ return createLabel(getComposite(), aText, aColumns, aStyle);
+ }
+
+ /**
+ * Creates a new label with given text and adds it to given
+ * composite in this view.
+ *
+ * @param aComposite composite to which the label is added
+ * @param aText text for the label
+ * @param aColumns number of columns the label takes
+ * @param aStyle SWT style for the label
+ * @return label that was added to this view
+ */
+ protected Label createLabel(
+ Composite aComposite, String aText, int aColumns, int aStyle)
+ {
+ Label label = new Label(aComposite, aStyle);
label.setText(aText);
GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.horizontalSpan = aColumns;
@@ -729,37 +786,9 @@
return label;
}
- /**
- * Creates a new label with security icon.
- *
- * @param aIdentified true if security icon is for an
- * identified application, false otherwise
- * @return label that was added to this view
- */
- protected Label createSecurityLabel(boolean aIdentified)
+ protected Button createSecurityButton(Composite aComposite)
{
- Label label = createLabel((Image)null, 1, SWT.NONE);
- setCssId(label, "securityLabel");
- Image securityIcon = null;
- if (iInstallerUi != null)
- {
- securityIcon = iInstallerUi.getSecurityIcon(
- getDisplay(), aIdentified);
- }
- if (securityIcon != null)
- {
- label.setImage(securityIcon);
- }
- else
- {
- label.setText(aIdentified? "I": "U");
- }
- return label;
- }
-
- protected Button createSecurityButton()
- {
- Button button = new Button(getComposite(), SWT.PUSH);
+ Button button = new Button(aComposite, SWT.PUSH);
setCssId(button, "securityButton");
GridData gridData = new GridData(
GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javamanager/javalauncher/tsrc/doc_pub/readme.txt Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,20 @@
+
+- testmidletstart is simple native console program. Started from eshell to test that Java
+ applications can be started from native applications. The name of the Java application to be started
+ has currently been hard coded to SPtesti (midlet-name).
+
+
+- midlets/sptest contains the SPtesti midlet.
+ If you modify the .java code, you can easily compile the .java file like this:
+javac -source 1.4 -target 1.4 -cp \epoc32\release\winscw\udeb\java_signature_test.jar testimidletti.java
+ Then you can update the .jar file using WinZip.
+
+ When SPtesti midlet is started, it shows the command line and instance count in the form.
+ When the midlet is restarted, it shows the new command line and new instance count.
+
+
+- midlets/plat_req contains platRequest midlet.
+ The .jad file has some sample platform request URLs that edited in the midlet and then used
+ when making platform request.
+ When making platform requests that start native applications, this midlet must be signed to
+ operator or manufacturer domain.
--- a/javamanager/preinstaller/src.s60/main.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javamanager/preinstaller/src.s60/main.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 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"
@@ -33,9 +33,11 @@
_LIT_SECURE_ID(KJavaCaptainSecureID, KJavaCaptainUid);
-// This file is used to indicate when converting old S60 midlets
-// to OMJ midlets has been done.
-_LIT(KConversionOngoing, "D:\\OMJConverting.dat");
+#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
+// This file is used to indicate when preinstallation has been done and
+// converting old S60 midlets to OMJ midlets can start.
+_LIT(KConversionOngoing, "D:\\OMJConverting.dat"); // codescanner::driveletters
+#endif
/**
@@ -43,10 +45,10 @@
* has the same Symbian secure ID as javainstaller and so javainstaller
* can later destroy the keys if necessary.
*/
-static void CreateJavaInstallerPSKeys()
+static void createJavaInstallerPSKeys()
{
LOG(EJavaPreinstaller, EInfo,
- "CreateJavaInstallerPSKeys: Going to create Java Installer PS keys");
+ "createJavaInstallerPSKeys: Going to create Java Installer PS keys");
// any process can read the values of the PS keys
_LIT_SECURITY_POLICY_PASS(KReadPolicy);
@@ -61,7 +63,7 @@
}
if (err != KErrNone)
{
- ELOG1(EJavaPreinstaller, "CreateJavaInstallerPSKeys: "
+ ELOG1(EJavaPreinstaller, "createJavaInstallerPSKeys: "
"creating KPSUidJavaLatestInstallation failed with error %d", err);
}
@@ -73,7 +75,7 @@
}
if (err != KErrNone)
{
- ELOG1(EJavaPreinstaller, "CreateJavaInstallerPSKeys: "
+ ELOG1(EJavaPreinstaller, "createJavaInstallerPSKeys: "
"creating KPSUidJavaLatestInstallationProgress failed with error %d", err);
}
@@ -85,7 +87,7 @@
}
if (err != KErrNone)
{
- ELOG1(EJavaPreinstaller, "CreateJavaInstallerPSKeys: "
+ ELOG1(EJavaPreinstaller, "createJavaInstallerPSKeys: "
"creating KPSUidJavaLatestInstallationState failed with error %d", err);
}
}
@@ -97,7 +99,7 @@
*/
static void startPreinstallationL()
{
- JELOG2(EJavaPreinstaller);
+ LOG(EJavaPreinstaller, EInfo, "startPreinstallationL called");
CActiveScheduler* as = new(ELeave) CActiveScheduler();
@@ -105,7 +107,7 @@
CActiveScheduler::Install(as);
CleanupStack::PushL(as);
- RFs fs;
+ RFs fs; // codescanner::rfs
User::LeaveIfError(fs.Connect());
CleanupClosePushL(fs);
@@ -123,22 +125,74 @@
// Now preinstallation has been done
LOG(EJavaPreinstaller, EInfo, "startPreinstallationL: Cleaning up");
+#ifdef RD_JAVA_S60_RELEASE_5_0_IAD
+ // Notify possibly waiting 'javaupdater.exe' process that preinstallation
+ // has been done and that it can continue.
TInt err = fs.Delete(KConversionOngoing);
LOG1(EJavaPreinstaller,
EInfo,
"startPreinstallationL: Delete flag file returned status code %d",
err);
+#endif
CleanupStack::PopAndDestroy(si);
CleanupStack::PopAndDestroy(&fs); // close connection to file server
CleanupStack::PopAndDestroy(as);
}
+
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+/**
+ * If 'javaafterflashconverter.exe' is running, wait until it exits
+ * so that converter and preinstaller don't try to use Java Installer
+ * simultaneously.
+ */
+static void waitUntilAfterFlashConverterExits()
+{
+ LOG(EJavaPreinstaller, EInfo, "waitUntilAfterFlashConverterExits called");
+
+ TFullName processName;
+ _LIT(KJavaAFConverterProcess, "javaafterflashconverter*");
+ TFindProcess finder(KJavaAFConverterProcess);
+
+ if (finder.Next(processName) != KErrNotFound)
+ {
+ RProcess afConverterProcess; // codescanner::resourcenotoncleanupstack
+ TInt err = afConverterProcess.Open(finder);
+
+ if (KErrNone != err)
+ {
+ WLOG1(EJavaPreinstaller,
+ "waitUntilAfterFlashConverterExits: Process open err: %d", err);
+ }
+ else
+ {
+ if (EExitPending == afConverterProcess.ExitType())
+ {
+ // Converter is still running. Wait until it exits.
+ LOG(EJavaPreinstaller, EInfo,
+ "waitUntilAfterFlashConverterExits going to wait until converter exits");
+ TRequestStatus status;
+ afConverterProcess.Logon(status);
+ User::WaitForRequest(status); // codescanner::userWaitForRequest
+ }
+
+ afConverterProcess.Close();
+ }
+ }
+}
+#endif
+
+
/**
* Allow starting process only from Java Captain.
* Execute actual preinstaller code in CSilentMIDletInstall.
*/
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+void preinstallerMainL(int argc, const char *argv[])
+#else
void preinstallerMainL()
+#endif
{
// The only time that this application should be executed
// is when Java Captain calls it.
@@ -152,7 +206,19 @@
// Create the PS keys that Java Installer will update already now
// so that other processes starting during device boot can start
// immediately listening to the keys.
- CreateJavaInstallerPSKeys();
+ createJavaInstallerPSKeys();
+
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+ if (argc > 1)
+ {
+ // The max size of a preinstaller command line parameter is 80
+ TBufC8<80> param((const TUint8 *)(argv[1])); // codescanner::accessArrayElementWithoutCheck2
+ if (param == _L8("waitafconversion"))
+ {
+ waitUntilAfterFlashConverterExits();
+ }
+ }
+#endif
startPreinstallationL();
}
@@ -162,9 +228,12 @@
* the same starter process as installer and runtime (so that they have the same
* Symbian secure Uid and can access the same data cage).
*/
-int dllMain(int /*argc*/, char */*argv*/[])
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+int dllMain(int argc, const char *argv[])
+#else
+int dllMain(int /* argc */, const char */*argv*/[])
+#endif
{
- JELOG(EJavaPreinstaller, "PREINSTALLER main()");
JavaOsLayer::startUpTrace("PREINSTALLER main() start", -1, -1);
User::RenameProcess(_L("javapreinstaller"));
@@ -175,7 +244,11 @@
// Make sure that this thread has always cleanup stack
CTrapCleanup* cleanupStack = CTrapCleanup::New();
+#ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+ TRAPD(err, preinstallerMainL(argc, argv));
+#else
TRAPD(err, preinstallerMainL());
+#endif
if (KErrNone != err)
{
ELOG1(EJavaPreinstaller, "dllMain: preinstallerMainL leaved with error %d", err);
--- a/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javaruntimes/midp/runtime/javasrc/com/nokia/mj/impl/rt/midp/MidletLifeCycle.java Fri Oct 29 11:49:32 2010 +0300
@@ -273,6 +273,22 @@
if (Log.mOn) Log.logI("Sending shutdown notifications to listeners.");
ApplicationUtilsImpl.doShutdownImpl();
+ String shutdownExtension = System.getProperty("jrt.shutdown.extension");
+ if (Log.mOn) Log.logI("Invoking shutdown extension: " + shutdownExtension);
+
+ if (shutdownExtension != null && shutdownExtension.length() > 0)
+ {
+ try
+ {
+ Class.forName(shutdownExtension).newInstance();
+ }
+ catch (Throwable t)
+ {
+ // no extensions
+ Log.logE("Exp. whe invoking coverage data: ", t);
+ }
+ }
+
if (Log.mOn) Log.logI("Sending close indication to runtime starter.");
_closeInd(mNativeRuntimeStarterHandle);
--- a/javatools/subsystem.mk Fri Oct 15 12:29:39 2010 +0300
+++ b/javatools/subsystem.mk Fri Oct 29 11:49:32 2010 +0300
@@ -42,6 +42,11 @@
usersettingsconfigurator/build \
javarestoreconverter/build
+ifdef RD_JAVA_S60_RELEASE_5_0_ROM
+COMPONENTS += \
+ javaafterflashconverter/build
+endif
+
else
COMPONENTS += \
--- a/javauis/eswt_qt/com.nokia.swt.extensions/extensions/org/eclipse/swt/internal/extension/NetworkStatus.java Fri Oct 15 12:29:39 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,431 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * 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 - initial implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.extension;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Internal_PackageSupport;
-import org.eclipse.swt.widgets.Listener;
-
-/**
- * This class provides notifications that can be used to determine which type of
- * network connections are active at any given moment.
- */
-public final class NetworkStatus {
-
- /**
- * A notification state flag that is raised when there are any active
- * Ethernet data connections.
- */
- public static final int DATA_ETHERNET = 0x00000001;
-
- /**
- * A notification state flag that is raised when there are any active WLAN
- * data connections.
- */
- public static final int DATA_WLAN = 0x00000002;
-
- /**
- * A notification state flag that is raised when there are any active CSD,
- * GPRS, HSCSD, EDGE or cdmaOne data connections.
- */
- public static final int DATA_2G = 0x00000004;
-
- /**
- * A notification state flag that is raised when there are any active CDMA
- * data connections.
- */
- public static final int DATA_CDMA2000 = 0x00000008;
-
- /**
- * A notification state flag that is raised when there are any active
- * W-CDMA/UMTS data connections.
- */
- public static final int DATA_WCDMA = 0x00000010;
-
- /**
- * A notification state flag that is raised when there are any active High
- * Speed Packet Access data connections.
- */
- public static final int DATA_HSPA = 0x00000020;
-
- /**
- * A notification state flag that is raised when there are any active
- * Bluetooth data connections.
- */
- public static final int DATA_BLUETOOTH = 0x00000040;
-
- /**
- * A notification state flag that is raised when there are any active WiMAX
- * data connections.
- */
- public static final int DATA_WIMAX = 0x00000080;
-
- /**
- * A notification state flag that is raised when there are any active voice
- * calls.
- */
- public static final int VOICE_CALL = 0x00000100;
-
- // This flag is set for any other active types than the ones above.
- // No events are sent for this type of active connections.
- private static final int UNKNOWN = 0x80000000;
-
- // The notified states of the connection types
- private static int notifiedStates;
-
- // Singleton instance
- private static NetworkStatus instance;
-
- // References to the listeners of the clients
- private static NetworkStatusListener[] listeners;
-
- // QNetworkConfigurationManager and XQCallInfo handles.
- // Can be 0 if required native parts not compiled in.
- private static int qNetworkConfigurationManagerHandle;
- private static int xqCallInfoHandle;
-
- // QNetworkConfiguration objects for active connections
- private static int activeConfigHandles[];
-
- // The dispose listener that is added to Display
- private static Listener disposeListener;
-
- private NetworkStatus() {
- xqCallInfoHandle = OS.XQCallInfo_create();
- qNetworkConfigurationManagerHandle = OS.QNetworkConfigurationManager_new(0);
- hookEvents();
- addDisposeListener();
- handleNetworkConfigurationChange();
- handleCallInformationChanged();
- }
-
- private static Display getDisplay() {
- Display display;
- display = Internal_PackageSupport.getInternalDisplayInstance();
- if(display == null) {
- display = Internal_PackageSupport.getDisplayInstance();
- }
- return display;
- }
-
- private static void addDisposeListener() {
- disposeListener = new Listener() {
- public void handleEvent(Event event) {
- destroy();
- }
- };
- getDisplay().addListener(SWT.Dispose, disposeListener);
- }
-
- private static void removeDisposeListener() {
- if(disposeListener != null) {
- Display display = getDisplay();
- if(display != null && !display.isDisposed()) {
- display.removeListener(SWT.Dispose, disposeListener);
- disposeListener = null;
- }
- }
- }
-
- private static void checkThread() {
- Display display = getDisplay();
- if(display == null) {
- throw new RuntimeException("Display doesn't exist");
- }
- if(!display.getThread().equals(Thread.currentThread())) {
- throw new RuntimeException("Not the UI thread");
- }
- }
-
- private static NetworkStatus instance() {
- if(instance == null) {
- instance = new NetworkStatus();
- }
- return instance;
- }
-
- private static boolean hasListeners() {
- if(listeners == null) return false;
- for(int i = 0; i < listeners.length; ++i) {
- if(listeners[i] != null) {
- return true;
- }
- }
- return false;
- }
-
- private static void destroy() {
- destroyActiveConfigs();
- if(qNetworkConfigurationManagerHandle != 0) {
- org.eclipse.swt.internal.qt.QObjectDeleteWrapper.deleteSafely(
- qNetworkConfigurationManagerHandle);
- qNetworkConfigurationManagerHandle = 0;
- }
- if(xqCallInfoHandle != 0) {
- org.eclipse.swt.internal.qt.QObjectDeleteWrapper.deleteSafely(
- xqCallInfoHandle);
- xqCallInfoHandle = 0;
- }
- listeners = null;
- instance = null;
- }
-
- /**
- * Adds the listener to the collection of listeners who will be notified of
- * the network status changes. Can only be called by the eSWT UI thread. If
- * there are active connections at the time of adding a listener the
- * listener will be notified. Adding the first listener will automatically
- * allocate the required native resources and removing the last listener
- * will automatically free them. This class will hold a strong reference to
- * the listener object preventing it from getting garbage collected until
- * the listener is removed.
- *
- * @param listener
- * the listener which should be notified when the event occurs
- *
- * @exception IllegalArgumentException
- * <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- *
- * @exception RuntimeException
- * <ul>
- * <li>If eSWT Display doesn't exist</li>
- * <li>If called in a non-UI thread</li>
- * </ul>
- *
- * @see NetworkStatusListener
- * @see #removeListener(NetworkStatusListener)
- */
- public static void addListener(NetworkStatusListener listener) {
- if (listener == null) throw new IllegalArgumentException();
- checkThread();
- instance();
- hook(listener);
- if(notifiedStates != 0) {
- final NetworkStatusListener asyncNofityListener = listener;
- final int asyncNotifyStates = notifiedStates;
- getDisplay().asyncExec(new Runnable() {
- public void run() {
- asyncNofityListener.stateChanged(asyncNotifyStates);
- }
- });
- }
- }
-
- /**
- * Removes the listener from the collection of listeners who will be
- * notified of the network status changes. Can only be called by the eSWT UI
- * thread. Removing the listener will release the reference held by this
- * class to the listener object. When all the listeners have been removed
- * the native resources allocated by this class are no longer needed and are
- * automatically freed.
- *
- * @param listener
- * the listener which should no longer be notified when the event
- * occurs
- *
- * @exception IllegalArgumentException
- * <ul>
- * <li>ERROR_NULL_ARGUMENT - if the listener is null</li>
- * </ul>
- *
- * @exception RuntimeException
- * <ul>
- * <li>If eSWT Display doesn't exist</li>
- * <li>If called in a non-UI thread</li>
- * </ul>
- *
- * @see NetworkStatusListener
- * @see #addListener(NetworkStatusListener)
- */
- public static void removeListener(NetworkStatusListener listener) {
- if (listener == null) throw new IllegalArgumentException();
- checkThread();
- unhook(listener);
- if(!hasListeners()) {
- destroy();
- removeDisposeListener();
- }
- }
-
- // Connect the signals
- private void hookEvents() {
- // Packet data connections
- if(qNetworkConfigurationManagerHandle != 0) {
- int signalProxy = org.eclipse.swt.internal.qt.OS.SignalForwarder_new(
- qNetworkConfigurationManagerHandle, this, OS.QSIGNAL_NETWORKCONFIGURATIONCHANGED);
- org.eclipse.swt.internal.qt.OS.QObject_connectOrThrow(
- qNetworkConfigurationManagerHandle,
- "configurationAdded(const QNetworkConfiguration&)",
- signalProxy, "widgetSignal()",
- org.eclipse.swt.internal.qt.OS.QT_AUTOCONNECTION);
- org.eclipse.swt.internal.qt.OS.QObject_connectOrThrow(
- qNetworkConfigurationManagerHandle,
- "configurationChanged(const QNetworkConfiguration&)",
- signalProxy, "widgetSignal()",
- org.eclipse.swt.internal.qt.OS.QT_AUTOCONNECTION);
- org.eclipse.swt.internal.qt.OS.QObject_connectOrThrow(
- qNetworkConfigurationManagerHandle,
- "configurationRemoved(const QNetworkConfiguration&)",
- signalProxy, "widgetSignal()",
- org.eclipse.swt.internal.qt.OS.QT_AUTOCONNECTION);
- }
-
- // Voice calls
- if(xqCallInfoHandle != 0) {
- int signalProxy = org.eclipse.swt.internal.qt.OS.SignalForwarder_new(
- xqCallInfoHandle, this, OS.QSIGNAL_CALLINFORMATIONCHANGED);
- org.eclipse.swt.internal.qt.OS.QObject_connectOrThrow(
- xqCallInfoHandle,
- "callInformationChanged()",
- signalProxy, "widgetSignal()",
- org.eclipse.swt.internal.qt.OS.QT_AUTOCONNECTION);
- }
- }
-
- // Connected signals come here
- boolean eventProcess(int widgetHandle, int eventType, int time,
- int arg1, int arg2, int arg3, int arg4, int arg5, String arg6) {
- switch(eventType) {
- case OS.QSIGNAL_NETWORKCONFIGURATIONCHANGED:
- handleNetworkConfigurationChange();
- break;
- case OS.QSIGNAL_CALLINFORMATIONCHANGED:
- handleCallInformationChanged();
- break;
- default:
- break;
- }
- return false;
- }
-
- private static void destroyActiveConfigs() {
- // Free the QNetworkConfiguration objects
- if(activeConfigHandles != null) {
- for(int i = 0; i < activeConfigHandles.length; ++i) {
- OS.QNetworkConfiguration_delete(activeConfigHandles[i]);
- activeConfigHandles[i] = 0;
- }
- activeConfigHandles = null;
- }
- }
-
- private static void updateActiveConfigs() {
- destroyActiveConfigs();
- // Get all the currently active configurations
- if(qNetworkConfigurationManagerHandle != 0) {
- activeConfigHandles = OS.QNetworkConfigurationManager_allConfigurations(
- qNetworkConfigurationManagerHandle, OS.QNETWORKCONFIGURATION_ACTIVE);
- }
- }
-
- private static void handleNetworkConfigurationChange() {
- updateActiveConfigs();
-
- // Find out the new states of all connection types
- int newStates = 0;
- newStates |= (notifiedStates & VOICE_CALL); // Voice call state didn't change
- for(int i = 0; i < activeConfigHandles.length; ++i) {
- int activeFlag = bearerNameToConnectionFlag(
- OS.QNetworkConfiguration_bearerName(activeConfigHandles[i]));
- if(activeFlag == UNKNOWN) continue;
- newStates |= activeFlag;
- }
-
- notifyChangedStates(newStates);
- }
-
- private static void handleCallInformationChanged() {
- if(xqCallInfoHandle != 0) {
- int newStates = notifiedStates;
- if(OS.XQCallInfo_swt_hasCalls(xqCallInfoHandle)) {
- newStates |= VOICE_CALL;
- } else {
- newStates &= ~VOICE_CALL;
- }
-
- notifyChangedStates(newStates);
- }
- }
-
- private static void notifyChangedStates(int newStates) {
- if(newStates != notifiedStates) {
- notifyListeners(newStates);
- }
- }
-
- private static void notifyListeners(int state) {
- if(listeners != null) {
- for(int i = 0; i < listeners.length; ++i) {
- if(listeners[i] == null) break;
- listeners[i].stateChanged(state);
- }
- }
- notifiedStates = state;
- }
-
- private static int bearerNameToConnectionFlag(String bearerName) {
- if(bearerName.equalsIgnoreCase("WCDMA")) {
- return DATA_WCDMA;
- } else if(bearerName.equalsIgnoreCase("HSPA")) {
- return DATA_HSPA;
- } else if(bearerName.equalsIgnoreCase("2G")) {
- return DATA_2G;
- } else if(bearerName.equalsIgnoreCase("WLAN")) {
- return DATA_WLAN;
- } else if(bearerName.equalsIgnoreCase("Bluetooth")) {
- return DATA_BLUETOOTH;
- } else if(bearerName.equalsIgnoreCase("CDMA2000")) {
- return DATA_CDMA2000;
- } else if(bearerName.equalsIgnoreCase("WiMAX")) {
- return DATA_WIMAX;
- } else if(bearerName.equalsIgnoreCase("Ethernet")) {
- return DATA_ETHERNET;
- }
- return UNKNOWN;
- }
-
- private static void hook(NetworkStatusListener listener) {
- if (listeners == null) listeners = new NetworkStatusListener[1];
- int length = listeners.length, index = length - 1;
- while (index >= 0) {
- if (listeners [index] != null) break;
- --index;
- }
- index++;
- if (index == length) {
- NetworkStatusListener[] newListeners = new NetworkStatusListener[length + 1];
- System.arraycopy (listeners, 0, newListeners, 0, length);
- listeners = newListeners;
- }
- listeners [index] = listener;
- }
-
- private static void unhook(NetworkStatusListener listener) {
- if (listeners == null) return;
- for (int i = 0; i < listeners.length; i++) {
- if (listeners [i] == listener) {
- remove (i);
- return;
- }
- }
- }
-
- private static void remove (int index) {
- int end = listeners.length - 1;
- System.arraycopy (listeners, index + 1, listeners, index, end - index);
- index = end;
- listeners [index] = null;
- }
-}
--- a/javauis/eswt_qt/com.nokia.swt.extensions/extensions/org/eclipse/swt/internal/extension/NetworkStatusListener.java Fri Oct 15 12:29:39 2010 +0300
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * 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 - initial implementation
- *******************************************************************************/
-package org.eclipse.swt.internal.extension;
-
-/**
- * A listener interface used in connection with the class
- * <code>NetworkStatus</code>.
- */
-public interface NetworkStatusListener {
- /**
- * Called by the class <code>NetworkStatus</code> in the UI thread to
- * provide the current state of the network connections.
- *
- * @param newStateFlags
- * Combination of flags representing the currently active network
- * connections. The flags are defined in the class
- * <code>NetworkStatus</code>.
- * @see NetworkStatus
- */
- public void stateChanged(int newStateFlags);
-}
--- a/javauis/eswt_qt/com.nokia.swt.extensions/extensions/org/eclipse/swt/internal/extension/OS.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/com.nokia.swt.extensions/extensions/org/eclipse/swt/internal/extension/OS.java Fri Oct 29 11:49:32 2010 +0300
@@ -11,28 +11,5 @@
package org.eclipse.swt.internal.extension;
public final class OS {
- public static final int QSIGNAL_NETWORKCONFIGURATIONCHANGED = 1;
- public static final int QSIGNAL_CALLINFORMATIONCHANGED = 2;
-
- public static final int QNETWORKCONFIGURATION_ACTIVE = 0x000000e;
-
- //
- // QNetworkConfigurationManager
- //
- public static final native int QNetworkConfigurationManager_new(int parent);
- public static final native int[] QNetworkConfigurationManager_allConfigurations(int handle, int filter);
-
- //
- // QNetworkConfiguration
- //
- public static final native String QNetworkConfiguration_bearerName(int handle);
- public static final native void QNetworkConfiguration_delete(int handle);
-
- //
- // XQCallInfo
- //
- public static final native int XQCallInfo_create();
- public static final native boolean XQCallInfo_swt_hasCalls(int handle);
-
public static final native int HbInputSettingProxy_availableHwKeyboard();
}
--- a/javauis/eswt_qt/org.eclipse.swt/.classpath Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/.classpath Fri Oct 29 11:49:32 2010 +0300
@@ -6,7 +6,7 @@
<classpathentry kind="src" path="extensions"/>
<classpathentry kind="src" path="Eclipse_SWT_PI/common_j2me"/>
<classpathentry kind="src" path="Eclipse_SWT_PI/s60"/>
- <classpathentry kind="src" path="Eclipse SWT/common_j2me"/>
+ <classpathentry excluding="org/eclipse/swt/internal/CDCCompatibilityDelegate.java" kind="src" path="Eclipse SWT/common_j2me"/>
<classpathentry kind="src" path="Eclipse SWT/qt"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
<classpathentry kind="src" path="Eclipse SWT Browser/qt"/>
@@ -14,6 +14,5 @@
<classpathentry kind="src" path="Eclipse_SWT_PI/qt"/>
<classpathentry kind="var" path="OMJ_CLASSES"/>
<classpathentry kind="var" path="CLDC_CLASSES"/>
- <classpathentry kind="lib" path="extra_jars/cdc-compilation-support.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/common_j2me/org/eclipse/swt/internal/Compatibility.java Fri Oct 29 11:49:32 2010 +0300
@@ -381,31 +381,66 @@
if (key == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);
+ // ok button in dialog
if(key.equals("ok")){
- iRes = ResourceLoader.getInstance("eswtcore", "qtn_eswt_softkey_");
+ iRes = ResourceLoader.getInstance("common", "txt_common_button_");
return iRes.format(key).toString();
}
-
+
+ // cancel button in dialog
if(key.equals("cancel")){
- iRes = ResourceLoader.getInstance("eswtcore", "qtn_eswt_softkey_");
+ iRes = ResourceLoader.getInstance("common", "txt_common_button_");
+ return iRes.format(key).toString();
+ }
+
+ // fetch contact from device phone book - in Options menu
+ if(key.equals("opt_fetch")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("fetch_url")){
- iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_option_");
+ // fetch contact from device phone book - in context menu
+ if(key.equals("menu_fetch")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // fetch contact from device phone book - in button
+ if(key.equals("button_fetch")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // create a call - in Options menu
+ if(key.equals("opt_call")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("fetch_email")){
- iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_option_pb_");
+ // create a call - in context menu
+ if(key.equals("menu_call")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // create a call - in button
+ if(key.equals("button_call")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("dialog_title")){
- iRes = ResourceLoader.getInstance("eswtmobile", "qtn_eswt_favorites_");
+
+ // title of selection list of bookmarks in TextExtension
+ if(key.equals("title_select_bookmark")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // string displayed in empty list
+ if(key.equals("info_no_data")){
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
+
return key;
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/TextExtension.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/ercp/swt/mobile/TextExtension.java Fri Oct 29 11:49:32 2010 +0300
@@ -307,11 +307,11 @@
String cmdTxt = null;
if ((extraStyle() & EMAILADDRESS) != 0) {
- cmdTxt = SWT.getMessage("fetch_email");
+ cmdTxt = SWT.getMessage("menu_fetch");
inputFlags |= OS.QT_IMHEMAILCHARACTERSONLY;
addCommand(cmdTxt);
} else if ((extraStyle() & URL) != 0) {
- cmdTxt = SWT.getMessage("fetch_url");
+ cmdTxt = SWT.getMessage("menu_fetch");
inputFlags |= OS.QT_IMHURLCHARACTERSONLY;
addCommand(cmdTxt);
}
@@ -348,7 +348,7 @@
return null;
}
OS.XQServiceRequest_swt_setArgumentsForFetchEmail(serviceRequest,
- SWT.getMessage("fetch_email"), OS.CNT_ACTIONALL,
+ SWT.getMessage("menu_fetch"), OS.CNT_ACTIONALL,
OS.CNT_DISPLAYALL);
Display display = Internal_PackageSupport.display(this);
int handler = OS.SignalHandler_new(topHandle(),
@@ -386,7 +386,7 @@
return null;
}
OS.XQServiceRequest_swt_setArgumentsForFetchEmail(serviceRequest,
- SWT.getMessage("fetch_phonenumber"), OS.CNT_ACTIONALL,
+ SWT.getMessage("menu_fetch"), OS.CNT_ACTIONALL,
OS.CNT_DISPLAYALL);
Display display = Internal_PackageSupport.display(this);
int handler = OS.SignalHandler_new(topHandle(),
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/FileDialog.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/FileDialog.java Fri Oct 29 11:49:32 2010 +0300
@@ -42,8 +42,7 @@
String fileName;
String[] fileNames = new String[] {};
int filterIndex = -1;
- static final char SEPARATOR = System.getProperty("file.separator")
- .charAt(0);
+ static final char SEPARATOR = '/'; // See QDir::fromNativeSeparators
static final String EXTENSION_SEPARATOR = ";;";
String dialogID;
static int dialogCount;
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Tree.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/Tree.java Fri Oct 29 11:49:32 2010 +0300
@@ -978,8 +978,11 @@
void releaseChildren_pp(boolean destroy) {
if (topLevelItems != null) {
for (int i = topLevelItemCount-1; i >= 0; i--) {
- TreeItem item = _getItem(i);
- if(item.cached){
+ // Cannot use _getItem here, since in a VIRTUAL style Tree it may cause
+ // creating a new TreeItem, which doesn't make sense when trying to release
+ // all children.
+ TreeItem item = topLevelItems[i];
+ if(item != null && item.cached){
if (item != null && !item.isDisposed() ) {
item.childrenItemCount = 0;
item.childrenItems = null;
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/TreeItem.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse SWT/qt/org/eclipse/swt/widgets/TreeItem.java Fri Oct 29 11:49:32 2010 +0300
@@ -778,7 +778,9 @@
void releaseChildren_pp(boolean destroy) {
if (childrenItems != null) {
for (int i = childrenItemCount-1; i >= 0; i--) {
- TreeItem item = _getItem(i);
+ // Don't use _getItem() here, in a VIRTUAL style Tree it would
+ // cause children items to be created.
+ TreeItem item = childrenItems[i];
if (item != null && !item.isDisposed()) {
item.release(destroy);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/common/library/readme.txt Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,1 @@
+Common library folder.
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/linux/org/eclipse/swt/internal/qt/s60/readme.txt Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,1 @@
+Folder for matching directory structure with s60 branch.
\ No newline at end of file
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/eswt_widgets.pri Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/eswt_widgets.pri Fri Oct 29 11:49:32 2010 +0300
@@ -54,9 +54,7 @@
##### Symbian specific items ######
symbian {
CONFIG += mobility
- MOBILITY += bearer
-
- CONFIG +=hb
+
HEADERS += \
swts60.h \
swtmobiledevice.h \
@@ -77,12 +75,9 @@
-lapgrfx \
-lHWRMVibraClient \
-lHWRMLightClient \
- -lxqservice \
- -lxqtelephonyservice \
-lQtContacts \
-lhal \
-lws32 \
-lgdi \
- -lHbCore \
-lfbscli
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/gfxos.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/gfxos.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -38,7 +38,7 @@
GfxException e(EGfxErrorNoMemory, "Bad alloc"); \
swtApp->jniUtils().Throw(aJniEnv, e); \
} \
-catch(GfxException e) \
+catch(GfxException& e) \
{ \
swtApp->jniUtils().Throw(aJniEnv, e); \
}
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/graphics.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/graphics.h Fri Oct 29 11:49:32 2010 +0300
@@ -1711,7 +1711,7 @@
mMsg = new char[aMsg.size()+1];
strcpy(mMsg, aMsg.toAscii().data());
};
- //~GfxException() { delete mMsg; };
+ ~GfxException() { delete mMsg; mMsg = NULL; };
int getErrorCode() { return mErrorCode; };
const char* getMsg() { return (const char*)mMsg; };
private:
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imagedataimpl.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/graphics/qt/imagedataimpl.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -101,6 +101,7 @@
mAlphaData.clear();
mMaskData.clear();
delete mPaletteData;
+ mPaletteData = 0;
// Get image information
mDepth = aImage->depth();
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/os.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/os.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -79,12 +79,9 @@
#include <QChar>
#include <QLibrary>
-#ifdef __SYMBIAN32__
+#if 0
#include <xqservicerequest.h>
-#include <xqcallinfo.h>
#include <cntservicescontact.h>
-#include <qnetworkconfigmanager.h>
-#include <qnetworkconfiguration.h>
#include <hbinputsettingproxy.h>
#include <hbicon.h>
#include <XQAiwRequest.h>
@@ -6362,7 +6359,7 @@
JNIEXPORT jint JNICALL OS_NATIVE ( HbIcon_1new )
(JNIEnv* aJniEnv , jclass, jstring aName)
{
-#ifdef __SYMBIAN32__
+#if 0
HbIcon* icon = NULL;
SWT_TRY
{
@@ -6379,7 +6376,7 @@
JNIEXPORT jint JNICALL OS_NATIVE( HbIcon_1pixmap )
(JNIEnv* aJniEnv , jclass, jint aHandle)
{
-#ifdef __SYMBIAN32__
+#if 0
QPixmap* pixmap = NULL;
SWT_TRY
{
@@ -6397,7 +6394,7 @@
JNIEXPORT void JNICALL OS_NATIVE( HbIcon_1delete )
(JNIEnv* aJniEnv , jclass, jint aHandle)
{
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11396,7 +11393,7 @@
(JNIEnv* aJniEnv, jclass)
{
jint result = 0;
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11446,13 +11443,13 @@
//
JNIEXPORT jint JNICALL OS_NATIVE( XQServiceRequest_1new )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jstring aService, jstring aOperation, jboolean aSynchronous)
#else
(JNIEnv* aJniEnv, jclass, jstring, jstring, jboolean)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
XQServiceRequest* request = NULL;
SWT_TRY
{
@@ -11467,13 +11464,13 @@
}
JNIEXPORT void JNICALL OS_NATIVE( XQServiceRequest_1swt_1setArgumentsForFetchEmail )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle, jstring aTitle, jstring aAction, jstring)
#else
(JNIEnv* aJniEnv, jclass, jint, jstring, jstring, jstring)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11487,13 +11484,13 @@
}
JNIEXPORT void JNICALL OS_NATIVE( XQServiceRequest_1swt_1setArgumentsForDial )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle, jstring aNumber, jboolean aAsyncAnswer)
#else
(JNIEnv* aJniEnv, jclass, jint, jstring, jboolean)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11507,13 +11504,13 @@
}
JNIEXPORT jboolean JNICALL OS_NATIVE( XQServiceRequest_1send )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle)
#else
(JNIEnv* aJniEnv, jclass, jint)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
bool result = false;
SWT_TRY
{
@@ -11535,13 +11532,13 @@
//
JNIEXPORT jint JNICALL OS_NATIVE( XQApplicationManager_1new )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass)
#else
(JNIEnv* aJniEnv, jclass)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
XQApplicationManager* aiwMgr = NULL;
SWT_TRY
{
@@ -11556,13 +11553,13 @@
}
JNIEXPORT jint JNICALL OS_NATIVE( XQApplicationManager_1create )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv * aJniEnv, jclass,jint aHandle, jstring aService, jstring aInterface, jstring aOperation, jboolean aSynchronous)
#else
(JNIEnv *, jclass, jint, jstring, jstring, jstring, jboolean)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
XQAiwRequest* request = NULL;
SWT_TRY
{
@@ -11584,13 +11581,13 @@
// XQAiwRequest
//
JNIEXPORT void JNICALL OS_NATIVE( XQAiwRequest_1setArguments )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle, jstring aNumber)
#else
(JNIEnv* aJniEnv, jclass, jint, jstring)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11609,13 +11606,13 @@
}
JNIEXPORT void JNICALL OS_NATIVE( XQAiwRequest_1swtDialer_1setArguments )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle, jstring aNumber)
#else
(JNIEnv* aJniEnv, jclass, jint, jstring)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
SWT_TRY
{
SWT_LOG_JNI_CALL();
@@ -11638,13 +11635,13 @@
}
JNIEXPORT jboolean JNICALL OS_NATIVE( XQAiwRequest_1send )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle)
#else
(JNIEnv* aJniEnv, jclass, jint)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
bool result = false;
SWT_TRY
{
@@ -11668,13 +11665,13 @@
//
JNIEXPORT jobjectArray JNICALL OS_NATIVE( CntServicesContactList_1swt_1contacts )
-#ifdef __SYMBIAN32__
+#if 0
(JNIEnv* aJniEnv, jclass, jint aHandle)
#else
(JNIEnv* aJniEnv, jclass, jint)
#endif
{
-#ifdef __SYMBIAN32__
+#if 0
jobjectArray javaStringArray = NULL;
SWT_TRY
{
@@ -11921,157 +11918,6 @@
}
//
-// QNetworkConfigurationManager
-//
-
-JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_extension_OS_QNetworkConfigurationManager_1new
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass, jint aParent)
-#else
-(JNIEnv*, jclass, jint)
-#endif
-{
- jint result = 0;
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
- SWT_LOG_DATA_1("parent=%x", aParent);
- HANDLE_TO_POINTER(QObject*, parent, aParent);
- result = POINTER_TO_HANDLE(new QtMobility::QNetworkConfigurationManager(parent));
- }
- SWT_CATCH
-#endif
- return result;
-}
-
-JNIEXPORT jintArray JNICALL Java_org_eclipse_swt_internal_extension_OS_QNetworkConfigurationManager_1allConfigurations
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass, jint aHandle, jint aFilter)
-#else
-(JNIEnv*, jclass, jint, jint)
-#endif
-{
- jintArray javaArray = NULL;
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
- SWT_LOG_DATA_2("handle=%x filter=%x", aHandle, aFilter);
-
- HANDLE_TO_POINTER(QtMobility::QNetworkConfigurationManager*, manager, aHandle);
-
- QList<QtMobility::QNetworkConfiguration> configs =
- manager->allConfigurations(static_cast<QtMobility::QNetworkConfiguration::StateFlags>(aFilter));
-
- int count = configs.size();
- QVector<int> handles(count);
- int* handleData = handles.data();
- for(int i = 0; i < count; ++i)
- {
- handleData[i] = reinterpret_cast<int>(new QtMobility::QNetworkConfiguration(configs.at(i)));
- }
- javaArray = swtApp->jniUtils().NewJavaIntArray(aJniEnv, handleData, count);
- }
- SWT_CATCH
-#endif
- return javaArray;
-}
-
-//
-// QNetworkConfiguration
-//
-
-JNIEXPORT jstring JNICALL Java_org_eclipse_swt_internal_extension_OS_QNetworkConfiguration_1bearerName
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass, jint aHandle)
-#else
-(JNIEnv *, jclass, jint)
-#endif
-{
-#ifdef __SYMBIAN32__
- jstring result = NULL;
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
- SWT_LOG_DATA_1("handle=%x", aHandle);
- QtMobility::QNetworkConfiguration* config = reinterpret_cast<QtMobility::QNetworkConfiguration*>(aHandle);
- result = swtApp->jniUtils().QStringToJavaString(aJniEnv, config->bearerName());
- }
- SWT_CATCH
-#endif
- return result;
-#endif
-}
-
-JNIEXPORT void JNICALL Java_org_eclipse_swt_internal_extension_OS_QNetworkConfiguration_1delete
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass, jint aHandle)
-#else
-(JNIEnv *, jclass, jint)
-#endif
-{
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
- SWT_LOG_DATA_1("handle=%x", aHandle);
- delete reinterpret_cast<QtMobility::QNetworkConfiguration*>(aHandle);
- }
- SWT_CATCH
-#endif
-}
-
-//
-// XQCallInfo
-//
-
-JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_extension_OS_XQCallInfo_1create
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass)
-#else
-(JNIEnv *, jclass)
-#endif
-{
- jint result = 0;
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
-#ifndef __WINSCW__
- result = POINTER_TO_HANDLE(XQCallInfo::create());
-#endif
- }
- SWT_CATCH
-#endif
- return result;
-}
-
-JNIEXPORT jboolean JNICALL Java_org_eclipse_swt_internal_extension_OS_XQCallInfo_1swt_1hasCalls
-#ifdef __SYMBIAN32__
-(JNIEnv* aJniEnv, jclass, jint aHandle)
-#else
-(JNIEnv *, jclass, jint)
-#endif
-{
- jboolean result = JNI_FALSE;
-#ifdef __SYMBIAN32__
- SWT_TRY
- {
- SWT_LOG_JNI_CALL();
- SWT_LOG_DATA_1("handle=%x", aHandle);
- HANDLE_TO_POINTER(XQCallInfo*, callInfo, aHandle);
- QList<CallInfo> callInfos;
- callInfo->getCalls(callInfos);
- result = callInfos.empty() ? JNI_FALSE : JNI_TRUE;
- }
- SWT_CATCH
-#endif
- return result;
-}
-
-//
// Other
//
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/slotcallback.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/library/slotcallback.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -13,7 +13,7 @@
#include <QString>
#include <QUrl>
#include <QModelIndex>
-#ifdef __SYMBIAN32__
+#if 0
#include <cntservicescontact.h>
#endif
@@ -199,7 +199,7 @@
callJava(reinterpret_cast<jint>(&value));
}
-#ifdef __SYMBIAN32__
+#if 0
Q_IMPLEMENT_USER_METATYPE(CntServicesContact)
Q_IMPLEMENT_USER_METATYPE_NO_OPERATORS(CntServicesContactList)
#endif
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/internal/qt/graphics/Config.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/internal/qt/graphics/Config.java Fri Oct 29 11:49:32 2010 +0300
@@ -28,5 +28,5 @@
* Default type for images. Used when image type is not specified as an argument in Image constructor.
* This setting is also used for ImageLoader output Images (default), if no explicit target Image type is specified.
*/
- static final int IMAGE_DEFAULT_TYPE = Image.IMAGE_TYPE_QIMAGE;
+ static final int IMAGE_DEFAULT_TYPE = Image.IMAGE_TYPE_QPIXMAP;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/javauis/eswt_qt/xlibutils/java/bin/readme.txt Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,1 @@
+Target folder for xlibutils binaries.
\ No newline at end of file
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Display.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Display.java Fri Oct 29 11:49:32 2010 +0300
@@ -290,7 +290,7 @@
}
else
{
- if(displayable.isPopup())
+ if(displayable.isPopup() && displayable instanceof TextBox)
{
TextBox textbox = (TextBox) displayable;
if(currentDisplayable == null)
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/Displayable.java Fri Oct 29 11:49:32 2010 +0300
@@ -199,11 +199,25 @@
{
eswtUpdateSizes();
- // If it is popup textbox ticker should not be visible
+ // If it is popup textbox or alert ticker should not be visible
if (ticker != null && !isPopup())
{
+ if (tickerLabel != null && !tickerLabel.getVisible())
+ {
+ // Show ticker:
+ tickerLabel.setVisible(true);
+ }
ticker.start();
}
+ else if (ticker != null && isPopup())
+ {
+ if (tickerLabel != null && tickerLabel.getVisible())
+ {
+ // Hide ticker:
+ tickerLabel.setVisible(false);
+ }
+
+ }
shell.addShellListener(eswtShellListener);
shell.addDisposeListener(eswtDisposeListener);
shell.addControlListener(eswtControlListener);
@@ -338,7 +352,7 @@
int newWidth = (aWidth > 0 ? aWidth : contentBounds.width);
int newHeight = (aHeight > 0 ? aHeight : contentBounds.height);
- if(tickerLabel != null)
+ if(tickerLabel != null && !isPopup())
{
newHeight += tickerLabel.getBounds().height;
}
@@ -369,7 +383,7 @@
{
Rectangle shellArea = shell.getClientArea();
- if(tickerLabel != null)
+ if(tickerLabel != null && !isPopup())
{
int tickerHeight = tickerLabel.getBounds().height;
@@ -396,7 +410,7 @@
{
contentArea = newArea;
initialized = true;
- if(ticker != null)
+ if(ticker != null && !isPopup())
{
ticker.updateSpeed();
}
@@ -725,7 +739,7 @@
// Setting ticker:
tickerLabel.setText(finalTicker.getFormattedString());
- // If it is popup textbox ticker should not be visible
+ // If it is popup textbox or alert ticker should not be visible
if (!currentDisplayable.isPopup())
{
@@ -743,7 +757,7 @@
// Removing ticker:
tickerLabel.setText("");
- // If it is popup textbox ticker should not be visible
+ // If it is popup textbox or alert ticker should not be visible
if (!currentDisplayable.isPopup())
{
// Removing ticker:
@@ -757,7 +771,7 @@
{
if(isLcduiVisible)
{
- // If it is popup textbox ticker should not be visible
+ // If it is popup textbox or alert ticker should not be visible
if (!isPopup())
{
// Start to scroll the ticker. Ticker may be already running
@@ -827,17 +841,7 @@
{
public void run()
{
- // Alert's ticker should be added to top part of the screen
- Composite parent = shell;
- if (currentDisplayable instanceof Alert)
- {
- parent = shell.getParent();
- if(parent == null)
- {
- parent = shell;
- }
- }
- tickerLabel = new Label(parent,
+ tickerLabel = new Label(shell,
SWT.SHADOW_NONE | SWT.HORIZONTAL | SWT.CENTER);
}
});
@@ -906,10 +910,10 @@
{
boolean isPopup = false;
- if(this instanceof TextBox &&
+ if(this instanceof Alert || (this instanceof TextBox &&
!JadAttributeUtil.isValue(
JadAttributeUtil.ATTRIB_NOKIA_UI_ENHANCEMENT,
- JadAttributeUtil.VALUE_FULLSCREEN_TEXTBOX))
+ JadAttributeUtil.VALUE_FULLSCREEN_TEXTBOX)))
{
isPopup = true;
}
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/KeyTable.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/KeyTable.java Fri Oct 29 11:49:32 2010 +0300
@@ -123,25 +123,25 @@
return "9";
case Canvas.KEY_STAR:
- return "*";
+ return OpenLcduiLocalization.getMessage("canvas_key_star_key");
case Canvas.KEY_POUND:
- return "#";
+ return OpenLcduiLocalization.getMessage("canvas_key_hash_key");
case -1:
- return OpenLcduiLocalization.getMessage("key_up");
+ return OpenLcduiLocalization.getMessage("canvas_key_up");
case -2:
- return OpenLcduiLocalization.getMessage("key_down");
+ return OpenLcduiLocalization.getMessage("canvas_key_down");
case -3:
- return OpenLcduiLocalization.getMessage("key_left");
+ return OpenLcduiLocalization.getMessage("canvas_key_left");
case -4:
- return OpenLcduiLocalization.getMessage("key_right");
+ return OpenLcduiLocalization.getMessage("canvas_key_right");
case -5:
- return OpenLcduiLocalization.getMessage("key_select");
+ return OpenLcduiLocalization.getMessage("canvas_key_selection_key");
default:
throw new IllegalArgumentException(
--- a/javauis/lcdui_qt/src/javax/microedition/lcdui/MsgRepository.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/lcdui_qt/src/javax/microedition/lcdui/MsgRepository.java Fri Oct 29 11:49:32 2010 +0300
@@ -24,55 +24,170 @@
*/
final class MsgRepository
{
-
+
// Command labels:
+
+ // SCREEN command
+ // for Options menu position
public static final String COMMAND_LABEL_SCREEN =
- OpenLcduiLocalization.getMessage("key_select");
+ OpenLcduiLocalization.getMessage("opt_screen_cmd_select");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_SCREEN_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_screen_cmd_select");
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_SCREEN_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_screen_cmd_select_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_SCREEN_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_screen_cmd_select_2");
+
+ // BACK command
+ // for Options menu positions
public static final String COMMAND_LABEL_BACK =
- OpenLcduiLocalization.getMessage("back");
-
+ OpenLcduiLocalization.getMessage("opt_cmd_back");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_BACK_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_cmd_back");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_BACK_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_cmd_back_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_BACK_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_cmd_back_2");
+
+ // CANCEL command
+ // for Options menu position
public static final String COMMAND_LABEL_CANCEL =
- SWT.getMessage("cancel");
+ SWT.getMessage("opt_cmd_cancel");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_CANCEL_CTX_MENU =
+ SWT.getMessage("menu_cmd_cancel");
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_CANCEL_BUTTON_1 =
+ SWT.getMessage("button_cmd_cancel_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_CANCEL_BUTTON_2 =
+ SWT.getMessage("button_cmd_cancel_2");
+
+ // OK command
+ // for Options menu position
public static final String COMMAND_LABEL_OK =
- SWT.getMessage("ok");
+ SWT.getMessage("opt_cmd_ok");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_OK_CTX_MENU =
+ SWT.getMessage("menu_cmd_ok");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_OK_BUTTON_1 =
+ SWT.getMessage("button_cmd_ok_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_OK_BUTTON_2 =
+ SWT.getMessage("button_cmd_ok_2");
+ // HELP command
+ // for Options menu position
public static final String COMMAND_LABEL_HELP =
- OpenLcduiLocalization.getMessage("help");
+ OpenLcduiLocalization.getMessage("opt_cmd_help");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_HELP_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_cmd_help");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_HELP_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_cmd_help_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_HELP_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_cmd_help_2");
+ // STOP command
+ // for Options menu position
public static final String COMMAND_LABEL_STOP =
- OpenLcduiLocalization.getMessage("key_stop");
-
+ OpenLcduiLocalization.getMessage("opt_cmd_stop");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_STOP_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_cmd_stop");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_STOP_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_cmd_stop_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_STOP_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_cmd_stop_2");
+
+ // EXIT command
+ // for Options menu position
public static final String COMMAND_LABEL_EXIT =
- OpenLcduiLocalization.getMessage("close");
-
+ OpenLcduiLocalization.getMessage("opt_cmd_close");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_EXIT_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_cmd_close");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_EXIT_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_cmd_close_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_EXIT_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_cmd_close_2");
+
+ // ITEM command
+ // for Options menu position (Note: should not be used, as ITEM type commands
+ // should never be mapped to Options menu!)
public static final String COMMAND_LABEL_ITEM =
- OpenLcduiLocalization.getMessage("key_select");
-
+ OpenLcduiLocalization.getMessage("opt_item_cmd_select");
+
+ // for context menu position
+ public static final String COMMAND_LABEL_ITEM_CTX_MENU =
+ OpenLcduiLocalization.getMessage("menu_item_cmd_select");
+
+ // for button position (one button/softkey only)
+ public static final String COMMAND_LABEL_ITEM_BUTTON_1 =
+ OpenLcduiLocalization.getMessage("button_item_cmd_select_1");
+
+ // for button position (two buttons/softkeys)
+ public static final String COMMAND_LABEL_ITEM_BUTTON_2 =
+ OpenLcduiLocalization.getMessage("button_item_cmd_select_2");
+
// Alert texts:
public static final String ALERT_DEFAULT_TEXT_ERROR =
- OpenLcduiLocalization.getMessage("alert_error");
+ OpenLcduiLocalization.getMessage("info_alert_error");
public static final String ALERT_DEFAULT_TEXT_WARNING =
- OpenLcduiLocalization.getMessage("alert_warning");
+ OpenLcduiLocalization.getMessage("info_alert_warning");
public static final String ALERT_DEFAULT_TEXT_INFO =
- OpenLcduiLocalization.getMessage("alert_info");
+ OpenLcduiLocalization.getMessage("info_alert_information");
public static final String ALERT_DEFAULT_TEXT_CONFIRMATION =
- OpenLcduiLocalization.getMessage("alert_conf");
+ OpenLcduiLocalization.getMessage("info_alert_confirmation");
public static final String ALERT_DEFAULT_TEXT_ALARM =
- OpenLcduiLocalization.getMessage("alert_alarm");
-
+ OpenLcduiLocalization.getMessage("info_alert_alarm");
+
+ // AlertType.NULL
public static final String ALERT_DEFAULT_TEXT_ALERT =
- OpenLcduiLocalization.getMessage("alert_null");
+ OpenLcduiLocalization.getMessage("info_alert");
+
// Exceptions below - dont need translation !!!
-
public static final String COMMAND_EXCEPTION_LABEL_IS_NULL =
"Short label cannot be null";
--- a/javauis/lcdui_qt/src_j2me/javax/microedition/lcdui/OpenLcduiLocalization.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/lcdui_qt/src_j2me/javax/microedition/lcdui/OpenLcduiLocalization.java Fri Oct 29 11:49:32 2010 +0300
@@ -31,139 +31,535 @@
if(key == null) throw new IllegalArgumentException(
MsgRepository.TEXT_EXCEPTION_TXT_IS_NULL);
- if(key.equals("key_up"))
+ // arrow up key name
+ if(key.equals("canvas_key_up"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("key_down"))
+ // arrow down key name
+ if(key.equals("canvas_key_down"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("key_left"))
+ // arrow left key name
+ if(key.equals("canvas_key_left"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("key_right"))
+ // arrow right key name
+ if(key.equals("canvas_key_right"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("key_select"))
+ // selection key name
+ if(key.equals("canvas_key_selection_key"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("key_stop"))
+ // media key stop, key name
+ if(key.equals("canvas_media_key_stop"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // media key play/pause, key name
+ if(key.equals("canvas_media_key_play"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // media key previous (rewind), key name
+ if(key.equals("canvas_media_key_previous"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // media key next (forward), key name
+ if(key.equals("canvas_media_key_next"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // SK1, positive softkey - key name, used mainly in on-screen-keypad
+ if(key.equals("canvas_key_lsk"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // SK2, negative softkey - key name, used mainly in on-screen-keypad
+ if(key.equals("canvas_key_rsk"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Send key, "green phone key" key name
+ if(key.equals("canvas_key_send"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // End key, "red phone key" key name
+ if(key.equals("canvas_key_end"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Clear key, in qwerty keyboard, key name
+ if(key.equals("canvas_key_clear"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Applications key, key name
+ if(key.equals("canvas_key_apps"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("alert_error"))
+
+ // Enter key in qwerty keyboard, key name
+ if(key.equals("canvas_key_enter"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Voice/volume key, key name
+ if(key.equals("canvas_key_voice"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Modifier keys, key name
+ if(key.equals("canvas_key_modifier"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Space key in qwerty keyboard, key name
+ if(key.equals("canvas_key_space"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Escape key in qwerty keyboard, key name
+ if(key.equals("canvas_key_escape"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Tab key in qwerty keyboard, key name
+ if(key.equals("canvas_key_tab"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Delete key in qwerty keyboard, key name
+ if(key.equals("canvas_key_delete"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Hash key in ITU-T keyboard, key name
+ if(key.equals("canvas_key_hash_key"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Star key in ITU-T keyboard, key name
+ if(key.equals("canvas_key_star_key"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // back space button key name
+ if(key.equals("canvas_key_backspace"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("alert_warning"))
+ // default text for error Alert
+ if(key.equals("info_alert_error"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for warning Alert
+ if(key.equals("info_alert_warning"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for information Alert
+ if(key.equals("info_alert_information"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for confirmation Alert
+ if(key.equals("info_alert_confirmation"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for alarm Alert
+ if(key.equals("info_alert_alarm"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("alert_info"))
+ // default text for alarm Alert (AlertType.NULL)
+ if(key.equals("info_alert"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for Options menu - fetch contact from device phone book
+ if(key.equals("opt_fetch"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("alert_conf"))
+ // default text for context menu - fetch contact from device phone book
+ if(key.equals("menu_fetch"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for button - fetch contact from device phone book
+ if(key.equals("button_fetch"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("alert_alarm"))
+ // default text for Options menu - create a call
+ if(key.equals("opt_call"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for context menu - create a call
+ if(key.equals("menu_call"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // default text for button - create a call
+ if(key.equals("button_call"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("alert_null"))
+ // String displayed in empty form or list
+ if(key.equals("info_no_data"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Softkey label in Alert that has only one button - for opening "Options" menu
+ if(key.equals("button_options_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Softkey label in Alert that has two buttons - for opening "Options" menu
+ if(key.equals("button_options_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("pb_fetch_number"))
+
+ // Softkey label in Alert - for implicit dismiss command, Note: this command is then the only command in Alert
+ if(key.equals("button_alert_ok"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // Softkey label in Alert - for implicit dismiss command, Note: in context menu.
+ if(key.equals("menu_alert_dismiss"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // IMPLICIT List default select command - in context menu
+ if(key.equals("menu_implicit_list_select"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
+
+ // Default command labels
- if(key.equals("pb_fetch_number_short"))
+ // HELP - in Options menu
+ if(key.equals("opt_cmd_help"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // HELP - in context menu
+ if(key.equals("menu_cmd_help"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // HELP - if only one button/softkey
+ if(key.equals("button_cmd_help_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("pb_fetch_email"))
+
+ // HELP - if two buttons/softkeys
+ if(key.equals("button_cmd_help_2"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // STOP - in Options menu
+ if(key.equals("opt_cmd_stop"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("pb_fetch_email_short"))
+
+ // STOP - in context menu
+ if(key.equals("menu_cmd_stop"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // STOP - if only one button/softkey
+ if(key.equals("button_cmd_stop_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // STOP - if two buttons/softkeys
+ if(key.equals("button_cmd_stop_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("create_call"))
+ // EXIT - in Options menu
+ if(key.equals("opt_cmd_close"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // EXIT - in context menu
+ if(key.equals("menu_cmd_close"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // EXIT - if only one button/softkey
+ if(key.equals("button_cmd_close_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // EXIT - if two buttons/softkeys
+ if(key.equals("button_cmd_close_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("create_call_short"))
+
+ // SCREEN - in Options menu
+ if(key.equals("opt_screen_cmd_select"))
{
- iRes = ResourceLoader.getInstance("lcdui", "qtn_midp_option_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("back"))
+
+ // SCREEN - in context menu
+ if(key.equals("menu_screen_cmd_select"))
{
- iRes = ResourceLoader.getInstance("lcduiavkon", "text_softkey_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // SCREEN - if only one button/softkey
+ if(key.equals("button_screen_cmd_select_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // SCREEN - if two buttons/softkeys
+ if(key.equals("button_screen_cmd_select_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
- if(key.equals("close"))
+ // BACK - in Options menu
+ if(key.equals("opt_cmd_back"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // BACK - in context menu
+ if(key.equals("menu_cmd_back"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // BACK - if only one button/softkey
+ if(key.equals("button_cmd_back_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // BACK - if two buttons/softkeys
+ if(key.equals("button_cmd_back_2"))
{
- iRes = ResourceLoader.getInstance("lcduiavkon", "text_softkey_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // CANCEL - in Options menu
+ if(key.equals("opt_cmd_cancel"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // CANCEL - in context menu
+ if(key.equals("menu_cmd_cancel"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // CANCEL - if only one button/softkey
+ if(key.equals("button_cmd_cancel_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // CANCEL - if two buttons/softkeys
+ if(key.equals("button_cmd_cancel_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("empty_list"))
+
+ // OK - in Options menu
+ if(key.equals("opt_cmd_ok"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // OK - in context menu
+ if(key.equals("menu_cmd_ok"))
{
- iRes = ResourceLoader.getInstance("lcduiavkon", "qtn_selec_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // OK - if only one button/softkey
+ if(key.equals("button_cmd_ok_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // OK - if two buttons/softkeys
+ if(key.equals("button_cmd_ok_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
- if(key.equals("help"))
+
+ // ITEM - in Options menu
+ if(key.equals("opt_item_cmd_select"))
{
- iRes = ResourceLoader.getInstance("lcduiavkon", "qtn_options_");
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // ITEM - in context menu
+ if(key.equals("menu_item_cmd_select"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
return iRes.format(key).toString();
}
-
+
+ // ITEM - if only one button/softkey
+ if(key.equals("button_item_cmd_select_1"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
+ // ITEM - if two buttons/softkeys
+ if(key.equals("button_item_cmd_select_2"))
+ {
+ iRes = ResourceLoader.getInstance("javauitoolkits", "txt_java_");
+ return iRes.format(key).toString();
+ }
+
return SWT.getMessage(key);
+
}
}
\ No newline at end of file
--- a/javauis/m2g_qt/inc/CM2GRenderContext.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/CM2GRenderContext.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -109,7 +109,7 @@
TM2GSvgDocumentHandle& aSvgDocHandle,
const TReal32 aCurrentTime,
TInt aSvgW, TInt aSvgH,
- TM2GRenderRect& aRect,
+ TM2GRenderRect& aRect,
TBool aUseNativeClear,
TInt* aReturnData);
@@ -123,16 +123,7 @@
*/
virtual void SetTransparency(TReal32 aAlpha);
-
- TInt SaveBitmapL(const CFbsBitmap& aNVGBitmap, const TFileName& aFileName);
-protected: // METHODS
- /**
- * Get the image's bitmap handle
- *
- * @return Svg surface handle.
- * @throws Exception if not ok.
- */
- TM2GBitmapHandle GetImgHandleL() const;
+
private:
/**
@@ -179,59 +170,38 @@
TBool aUseNativeClear,
TInt* aReturnData);
- /**
- * Clear the bitmap with 0
- * Fills all pixel with 0 value
- *
- * @param aBmp the bitmap to be filled
- */
- void CM2GRenderContext::ClearBitmapL(CFbsBitmap* aBmp);
+private: // VARIABLES
- /**
- * Fills all the pixels of a bitmap with a specific byte
- *
- * @param aBmp the bitmap to be filled
- * @param aChar the character(byte) to fill with
- */
- void FillBitmapL(CFbsBitmap* aBmp, const TUint8& aChar);
-
-
-private: // VARIABLES
-
- //For WindowsSurface CFbsBitmap || Qimage
- Java::GFX::WindowSurface* iWindowSurface;
-
-
MM2GSVGProxy* iProxy;
TM2GSvgEngineHandle iEngineHandle;
TReal32 iAlpha;
TUint8 iScaledAlpha;
-
+
//for eswt compatibility
CFbsBitmap* iImgBmp;
RFbsSession iFbsSession;
-
-
+
+//For WindowsSurface CFbsBitmap || Qimage
+ Java::GFX::WindowSurface* iWindowSurface;
+
+
+
// Temporary buffer ( offscreen ) for QImage support
QImage* iOffScreenQImage;
CFbsBitmap* iOffScreenBitmap;
-
+
QImage* iTargetQImage;
Java::GFX::WindowSurfaceType wSurfaceType;
CSvgtBitmap * targetBitmap;
-
+
CFbsBitmap* tempBitmapForMask ;
-protected:
- TM2GSvgBitmapHandle GetBufferHandleL() const;
- void InitializeQImageOffscreenBufferL(TSize aScreenSize,QImage* aQimage);
- void InitializeCFbsBitmapOffscreenBufferL(TSize aScreenSize,CFbsBitmap* aBitmap);
- void ClearSurfaceL(TM2GSvgBitmapHandle aSvgtBmpHandle);
+
private:
-
+
};
/*-----------------------------------------------------------
class : CFbsBitmapHack
--- a/javauis/m2g_qt/inc/CM2GSVGProxy.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/CM2GSVGProxy.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -438,16 +438,15 @@
TM2GBitmapHandle aSurfaceMaskHandle,
TReal32 aCurrentTime);
-// pankaj Qimage related changes TODO following Changes done
virtual void RenderDocumentL(
const TM2GSvgEngineHandle& aEngineHandle,
const TM2GSvgDocumentHandle& aDocumentHandle,
const TM2GSvgBitmapHandle& aSurfaceHandle,
TM2GSvgBitmapHandle aSurfaceMaskHandle,
TReal32 aCurrentTime);
- /**
- * @see MM2GSVGProxy::RenderQualityL
- */
+ /**
+ * @see MM2GSVGProxy::RenderQualityL
+ */
virtual void RenderQualityL(
const TM2GSvgEngineHandle& aEngineHandle,
TInt aQuality);
--- a/javauis/m2g_qt/inc/CSynchronization.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/CSynchronization.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/inc/M2GGeneral.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/M2GGeneral.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -21,7 +21,7 @@
#include <e32base.h>
#include "jstringutils.h"
#include "jni.h"
-//#include <jutils.h>
+
#if defined ( _DEBUG )
#if defined ( __WINSCW__ )
--- a/javauis/m2g_qt/inc/M2GNamespace.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/M2GNamespace.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -27,7 +27,8 @@
#ifndef M2G_NO_NAMESPACE_SWITCH
#define M2G_NS_ /**/ m2g_namespace
#define M2G_NS_START /**/ namespace M2G_NS_ {
-#define M2G_NS_END /**/ }
+#define M2G_NS_END /**/
+}
#define M2G_NS(X) /**/ ::M2G_NS_::X
#define USING_WHOLE_M2G_NS /**/ using namespace ::M2G_NS_;
#define USING_M2G_NS(X) /**/ using ::M2G_NS_::X;
--- a/javauis/m2g_qt/inc/M2GUtils.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/M2GUtils.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -24,6 +24,7 @@
#include "M2GGeneral.h"
#include <QPixmap>
#include <jni.h>
+#include "CSynchronization.h" //For UI Thread Execution.
M2G_NS_START
// CONSTANTS
@@ -32,6 +33,22 @@
// MACROS
+
+/*!
+ * \brief Macros for serializing m2gcore function calls
+ * in native threading environment.
+ */
+
+#define M2G_DO_LOCK CSynchronization::InstanceL()->Lock();
+
+#define M2G_DO_UNLOCK(aEnv) {\
+ TInt errorCode = CSynchronization::InstanceL()->GetErrorCode();\
+ if ( errorCode != 0){\
+ M2GGeneral::CheckErrorCode(aEnv,errorCode);\
+ }\
+ CSynchronization::InstanceL()->Unlock();\
+ }\
+
// FORWARD DECLARATIONS
class CFbsBitmapDevice;
class CFbsBitGc;
@@ -40,19 +57,6 @@
// CLASS DECLARATION
-
-//For UI Thread Execution.
-#include "CSynchronization.h"
-
-#define M2G_DO_LOCK CSynchronization::InstanceL()->Lock();
-
-
-//TODO Have to Raise Exception in case we find any error.
-#define M2G_DO_UNLOCK(aEnv) {\
- TInt errorCode = CSynchronization::InstanceL()->GetErrorCode();\
- CSynchronization::InstanceL()->Unlock();\
- }\
-
/**
* @class M2GBitmapUtils
* @brief Static methods for alpha blending and bitmaps
@@ -84,13 +88,13 @@
const CFbsBitmap* aSourceMask,
/*MSwtClient* aClientHandle,*/
TBool aUseNativeClear = EFalse);
-
+
static TInt BitQBlt(QImage& aTargetQimage,
- const QImage& aSourceQimage,
- const TPoint& aPoint,
- const TRect* aRect,
- const CFbsBitmap* aSourceMask);
-
+ const QImage& aSourceQimage,
+ const TPoint& aPoint,
+ const TRect* aRect,
+ const CFbsBitmap* aSourceMask);
+
/**
* Checks if two bitmap are equal.
* @since Series S60 3.0
--- a/javauis/m2g_qt/inc/MM2GRenderContext.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/MM2GRenderContext.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -108,7 +108,7 @@
const TReal32 aCurrentTime,
TInt aSvgW,
TInt aSvgH,
- TM2GRenderRect& aRect,
+ TM2GRenderRect& aRect,
TBool aUseNativeClear,
TInt* aReturnData) = 0;
--- a/javauis/m2g_qt/inc/MM2GSVGProxy.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/inc/MM2GSVGProxy.h Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -679,14 +679,13 @@
TM2GBitmapHandle aSurfaceMaskHandle,
TReal32 aCurrentTime) = 0;
-// pankaj Qimage related changes TODO following Changes done
virtual void RenderDocumentL(
const TM2GSvgEngineHandle& aEngineHandle,
const TM2GSvgDocumentHandle& aDocumentHandle,
const TM2GSvgBitmapHandle& aSurfaceHandle,
TM2GSvgBitmapHandle aSurfaceMaskHandle,
TReal32 aCurrentTime)=0;
-
+
/**
* Sets render quality
* @since Series S60 3.1
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/ESWTScalableGraphics.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/ESWTScalableGraphics.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -35,15 +35,15 @@
public ESWTScalableGraphics(Display display)
{
-
-
+
+
iSg = ScalableGraphics.createInstance();
iDisplay = display;
}
public ESWTScalableGraphics(Display display, Rectangle canvasBounds)
{
-
+
iSg = ScalableGraphics.createInstance();
iDisplay = display;
iCanvasBounds = canvasBounds;
@@ -56,7 +56,7 @@
public void bindTarget(GC gc)
{
-
+
iRealGC = gc;
iBufferedImage = new Image(iDisplay, iCanvasBounds);
iBufferGC = new GC(iBufferedImage);
@@ -65,7 +65,7 @@
public void releaseTarget()
{
-
+
iSg.releaseTarget();
iBufferedImage.dispose();
@@ -76,20 +76,20 @@
public void render(int x, int y, ScalableImage image)
{
-
+
iSg.render(x,y, image);
iRealGC.drawImage(iBufferedImage, x, y);
}
public void setRenderingQuality(int mode)
{
-
+
iSg.setRenderingQuality(mode);
}
public void setTransparency(float alpha)
{
-
+
iSg.setTransparency(alpha);
}
}
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDOMChangeObserver.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDOMChangeObserver.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDestroyable.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDestroyable.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -17,8 +17,6 @@
package com.nokia.microedition.m2g;
-//import com.nokia.mj.impl.rt.legacy.ToolkitInvoker;
-//import com.nokia.mj.impl.rt.legacy.ToolkitObserver;
/**
* Interface
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDocument.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GDocument.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -37,30 +37,7 @@
// STATIC CONSTANTS
//--------------------------------------------------
// Error constants
- /* Optimization: static finals changed to local variables
- public static final String UNSUPORTED_ELEMENT_TYPE_ESTR =
- "The type of element is not supported by the implementation.";
- public static final String UNSUPORTED_NAMESPACE_ESTR =
- "The URI is not the SVG namespace URI.";
- public static final String ID_IS_NULL_ESTR =
- "The ID is null.";
- public static final String NAMESPACE_URI_IS_NULL_ESTR =
- "The namespace URI is null.";
- public static final String QUALIFIED_NAME_IS_NULL_ESTR =
- "The qualifiedName is null.";
- public static final String CANNOT_APPEND_CHILD_ESTR =
- "Cannot appendChild to a Document node.";
- public static final String CANNOT_INSERT_BEFORE_ESTR =
- "Cannot insertBefore a Document node.";
- public static final String CANNOT_REMOVE_CHILD_ESTR =
- "Cannot removeChild from a Document node.";
- public static final String DOCUMENT_IS_ILLEGAL_ESTR =
- "The SVG document does not conform to the XML 1.0 specification.";
- public static final String HEIGHT_IS_ILLEGAL_ESTR =
- "The height is negative.";
- public static final String WIDTH_IS_ILLEGAL_ESTR =
- "The width is negative.";
- */
+
//--------------------------------------------------
// VARIABLES
@@ -94,7 +71,7 @@
* Creates new document object. If aData is null or empty then
* an empty document is create.
* @param aImage Svg image
- * @param aBaseUrl A base url from where a document is downloaded.
+ * @param aBaseUrl A base url from where a document is downloaded.
* @param aSuffixUrl A suffix url from where a document is downloaded
* @param aData Plain text svg data
*/
@@ -102,8 +79,7 @@
String aData)
{
super();
-
-
+
iImage = aImage;
iBaseUrl = aBaseUrl;
iSuffixUrl = aSuffixUrl;
@@ -357,7 +333,7 @@
int elementHandle = _getElementById(
getNativeSVGProxyHandle(),
getHandle(),
- id );
+ id);
return M2GSVGElement.buildElement(elementHandle, this);
}
@@ -442,7 +418,7 @@
{
return _getViewportWidth(
getNativeSVGProxyHandle(),
- getHandle() );
+ getHandle());
}
@@ -697,7 +673,7 @@
_setViewportWidth(
getNativeSVGProxyHandle(),
getHandle(),
- width );
+ width);
Logger.LOG(Logger.EJavaUI, Logger.EInfo,
"setViewportWidth:" + width + " - end");
}
@@ -1244,10 +1220,10 @@
ExternalResourceHandler aHandler)
throws IOException
{
-
+
if ((aData == null) || (aData.equals("")))
{
-
+
throw new IOException(
/*SF*/"The SVG document does not conform to the XML 1.0 specification."/*SF*/);
}
@@ -1317,13 +1293,13 @@
String aId);
private static native int _getViewportHeight(
- int aSvgProxyHandle, int aDocumentHandle);
+ int aSvgProxyHandle, int aDocumentHandle);
private static native int _getViewportWidth(
- int aSvgProxyHandle, int aDocumentHandle);
+ int aSvgProxyHandle, int aDocumentHandle);
private native static int _isElementInDOM(
- int aSvgProxyHandle, int aDocumentHandle,
+ int aSvgProxyHandle, int aDocumentHandle,
int aElementHandle);
private static native int _requestCompleted(
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GEvent.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GEvent.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GManager.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GManager.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -18,9 +18,7 @@
package com.nokia.microedition.m2g;
import java.lang.ref.WeakReference;
-//import com.nokia.mj.impl.rt.legacy.MIDEventServer;
import java.util.Hashtable;
-//import com.nokia.mj.impl.rt.legacy.MemoryUtil;
import java.util.Enumeration;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.events.DisposeEvent;
@@ -54,26 +52,16 @@
private M2GManager()
{
super();
-
-
- //As Display is created in Thread only.. So no need to handle display over here.
- //scom.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javam2g");
- /*// setup the finalization via eswt's Display
- Display display = Display.getCurrent();
- if (display == null)
+
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
{
- return; // ?
- }
- display.addListener(SWT.Dispose, (Listener)this); */
-
-
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- iSVGProxyHandle = _createSvgProxy();
- }
- });
+ public void doRun()
+ {
+ iSVGProxyHandle = _createSvgProxy();
+ }
+ });
M2GManager.heuristicGC();
}
@@ -183,14 +171,14 @@
{
if (sWeakManagerProxy != null)
{
-
+
weakManager = (M2GWeakManager)sWeakManagerProxy.get();
}
// Check if object null
if (weakManager == null)
{
// Create a new object and put it into the static member variable
-
+
weakManager = new M2GWeakManager(new M2GManager());
sWeakManagerProxy = new WeakReference(weakManager);
}
@@ -209,13 +197,13 @@
//--------------------------------------------------
// NATIVE METHODS
//--------------------------------------------------
- private static native int _createSvgEngine(int aSvgProxyHandle );
+ private static native int _createSvgEngine(int aSvgProxyHandle);
private static native int _createSvgProxy();
private static native void _deleteSvgEngine(int aSvgProxyHandle, int aSvgEngineHandle);
- private static native void _deleteSvgProxy( int aSvgProxyHandle);
+ private static native void _deleteSvgProxy(int aSvgProxyHandle);
}
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GObject.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GObject.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -27,13 +27,13 @@
/**
* Base class
*/
-abstract class M2GObject
+abstract class M2GObject
{
//--------------------------------------------------
// STATIC CONSTANTS
//--------------------------------------------------
public static final int INVALID_NATIVE_HANDLE = 0;
- // static final String ESWT_PACKAGE = "org.eclipse.swt.widgets.Display" ;
+ // static final String ESWT_PACKAGE = "org.eclipse.swt.widgets.Display" ;
//--------------------------------------------------
// VARIABLES
//--------------------------------------------------
@@ -50,7 +50,7 @@
M2GObject()
{
this(INVALID_NATIVE_HANDLE);
-
+
}
/**
@@ -59,11 +59,11 @@
*/
M2GObject(int aHandle)
{
-
+
iNativeHandle = aHandle;
-
+
iManager = M2GManager.getInstance();
-
+
}
/**
@@ -105,7 +105,7 @@
{
Logger.LOG(Logger.EJavaUI, Logger.EInfo,
"createDestroyer(): " + this.getClass().getName());
-
+
}
/**
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GRunnableQt.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GRunnableQt.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2003-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGAnimationElement.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGAnimationElement.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -52,7 +52,7 @@
_beginElementAt(
getNativeSVGProxyHandle(),
getDocument().getHandle(), getHandle(), offset,
- getDocument().getRootElement().getCurrentTime() );
+ getDocument().getRootElement().getCurrentTime());
}
/**
@@ -71,7 +71,7 @@
{
short endAttribute = _getEnumTrait(
getNativeSVGProxyHandle(),
- getHandle(), M2GSVGConstants.AT_END );
+ getHandle(), M2GSVGConstants.AT_END);
// NOTE Native SVG engine checks that element is active so
// java side doesn't have to do that
if (endAttribute == M2GSVGConstants.ANIM_INDEFINITE)
@@ -84,7 +84,7 @@
_endElementAt(
getNativeSVGProxyHandle(),
getDocument().getHandle(), getHandle(),
- (offset + getDocument().getRootElement().getCurrentTime()) );
+ (offset + getDocument().getRootElement().getCurrentTime()));
}
}
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGAnimator.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGAnimator.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -26,34 +26,13 @@
import com.nokia.mj.impl.utils.Logger;
-public class M2GSVGAnimator extends SVGAnimator
+public class M2GSVGAnimator extends SVGAnimator
{
//--------------------------------------------------
// STATIC CONSTANTS
//--------------------------------------------------
private static final String ANIMATOR_CANVAS_BASE_CLASS =
"javax.microedition.lcdui.Canvas";
- // Exception text
- /* Optimization: static finals changed to local variables
- private static final String COMPONENT_BASE_CLASS_NOT_SUPPORTED_ESTR =
- "The requested componentBaseClass is not supported by the implementation.";
- private static final String ILLEGAL_TIME_INCREMENT_ESTR =
- "The timeIncrement is less than or equal to zero.";
- private static final String ANIMATOR_PLAY_ESTR =
- "The animator is not currently in the stopped or paused state.";
- private static final String ANIMATOR_PAUSE_ESTR =
- "The animator is not in the playing state.";
- private static final String ANIMATOR_STOP_ESTR =
- "The animator is not in the playing or paused state.";
- private static final String INVALID_RUNNABLE_ESTR =
- "The runnable is null.";
- private static final String ANIMATOR_IS_STOPPED_ESTR =
- "The animator is in the stopped state.";
- private static final String RUNNABLE_IS_NULL_ESTR =
- "The runnable is null.";
- private static final String ANIMATOR_INVOKE_ESTR =
- "The animator is in the stopped state.";
- */
//--------------------------------------------------
// VARIABLES
@@ -70,17 +49,17 @@
*/
protected M2GSVGAnimator(SVGImage aImage)
{
-
+
iSVGCanvas = new M2GSVGCanvas(false, aImage);
mFinalizer = new Finalizer()
- {
+ {
public void finalizeImpl()
{
-
+
doFinalize();
}
};
-
+
}
/**
@@ -157,14 +136,14 @@
*/
public void play()
{
-
+
if (iSVGCanvas.isPlaying())
{
throw new IllegalStateException(
/*SF*/"The animator is not currently in the stopped or paused state."/*SF*/);
}
Logger.LOG(Logger.EJavaUI, Logger.EInfo, "play()");
-
+
iSVGCanvas.play();
}
@@ -172,7 +151,7 @@
{
if (mFinalizer != null)
{
-
+
registeredFinalize();
mFinalizer = null;
}
@@ -201,7 +180,7 @@
*/
public void setTimeIncrement(float timeIncrement)
{
-
+
if (timeIncrement <= 0)
{
throw new IllegalArgumentException(
@@ -210,7 +189,7 @@
Logger.LOG(Logger.EJavaUI, Logger.EInfo, "setTimeIncrement() - "
+ timeIncrement);
iSVGCanvas.setTimeIncrement(timeIncrement);
-
+
}
/**
@@ -218,7 +197,7 @@
*/
public void stop()
{
-
+
if (iSVGCanvas.isStopped())
{
throw new IllegalStateException(
@@ -227,7 +206,7 @@
Logger.LOG(Logger.EJavaUI, Logger.EInfo, "stop()");
iSVGCanvas.stop();
-
+
}
//--------------------------------------------------
@@ -241,13 +220,13 @@
*/
public static SVGAnimator buildAnimator(SVGImage svgImage)
{
-
+
if (svgImage == null)
{
-
+
throw new NullPointerException();
}
-
+
return new M2GSVGAnimator(svgImage);
}
@@ -319,10 +298,10 @@
* @see javax.microedition.lcdui.game.GameCanvas#GameCanvas()
*/
public M2GSVGCanvas(boolean aSuppressKeyEvents, SVGImage aSVGImage)
- {
+ {
super(aSuppressKeyEvents);
-
+
// get the instance to the Graphics of the offscreen buffer
iOffscreen = getGraphics();
@@ -331,8 +310,8 @@
// down-casting to M2GDocument/M2GSVGSVGElement to have access to internal methods
M2GDocument doc = (M2GDocument)iSVGImage.getDocument();
iRootElement = (M2GSVGSVGElement)iSVGImage.getDocument().getDocumentElement();
-
-
+
+
iState = STATE_STOPPED;
// Create render context
iSg = ScalableGraphics.createInstance();
@@ -340,9 +319,9 @@
iDeltaTime = DEFAULT_DELTA_TIME;
doc.registerDOMChangeObserver(this);
-
-
-
+
+
+
Logger.LOG(Logger.EJavaUI, Logger.EInfo, "Ctor - delta time:"
+ iDeltaTime + ", state:" + iState);
}
@@ -500,25 +479,25 @@
public void paint(Graphics g)
{
// Clears bitmap
-
+
g.setColor(255, 255, 255);
g.fillRect(0, 0, getWidth(), getHeight());
try
{
-
+
iSg.bindTarget(g);
-
+
// NOTE: Source is defaultly fully opaque
iSg.render(0, 0, iSVGImage);
-
+
}
finally
{
-
+
iSg.releaseTarget();
-
+
}
}
@@ -637,7 +616,7 @@
public synchronized void play()
{
Logger.LOG(Logger.EJavaUI, Logger.EInfo, "play()");
-
+
if (iState == STATE_PLAYING)
{
// don't do anything if animation is already playing
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGConstants.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGConstants.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGElement.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGElement.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -21,10 +21,8 @@
import org.w3c.dom.*;
import org.w3c.dom.svg.*;
import org.w3c.dom.events.*;
-//import com.nokia.mj.impl.rt.legacy.ToolkitInvoker;
import java.io.IOException;
import org.eclipse.swt.widgets.*;
-//import org.eclipse.swt.widgets.Display;
import com.nokia.mj.impl.utils.Logger;
public class M2GSVGElement extends M2GObject implements SVGElement
@@ -39,79 +37,6 @@
"The listener is null.";
static final String CAPTURE_NOT_SUPPORTED_ESTR =
"The capture phase is not supported in SVG Tiny.";
- //static final String ESWT_PACKAGE =
- // "org.eclipse.swt.widgets.Display" ;
-
- /* Optimization: static finals changed to local variables
- static final String TRAIT_IS_NULL_ESTR =
- "The trait is null.";
- static final String TRAIT_NOT_SUPPORTED_ON_ELEM_ESTR =
- "The trait is not supported on this element.";
- static final String TRAIT_NOT_SUPPORTED_IN_NS_ESTR =
- "The trait is not supported in this namespace.";
- static final String GET_FLOAT_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a float.";
- static final String SET_FLOAT_MISMATCH_ESTR =
- "Trait's value cannot be specified as a float.";
- static final String GET_MATRIX_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a SVGMatrix.";
- static final String SET_MATRIX_MISMATCH_ESTR =
- "Trait's value cannot be specified as a SVGMatrix.";
- static final String GET_PATH_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a SVGPath.";
- static final String SET_PATH_MISMATCH_ESTR =
- "Trait's value cannot be specified as a SVGPath.";
- static final String GET_RECT_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a SVGRect.";
- static final String SET_RECT_MISMATCH_ESTR =
- "Trait's value cannot be specified as a SVGRect.";
- static final String GET_RGB_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a SVGRGBColor.";
- static final String SET_RGB_MISMATCH_ESTR =
- "Trait's value cannot be specified as a SVGRGBColor.";
- static final String NS_NOT_SUPPORTED_ESTR =
- "The namespace is not supported.";
- static final String GET_TRAIT_NS_STRING_MISMATCH_ESTR =
- "Trait's computed value cannot be converted to a String.";
- static final String SET_TRAIT_NS_STRING_MISMATCH_ESTR =
- "Trait's value cannot be specified as a String.";
- static final String ID_IS_NULL_ESTR =
- "The id is null.";
- static final String EXISTING_ELEM_ID_CHANGE_ESTR =
- "Existing element id cannot be changed.";
- static final String ELEM_ID_EXIST_IN_DOCUMENT_ESTR =
- "Element id already exists in the document.";
- static final String INVALID_INPUT_VALUE_ESTR =
- "The input value is an invalid value for the given trait.";
- static final String VALUE_IS_NULL_ESTR =
- "Value cannot be set to null.";
- static final String SET_READONLY_MISMATCH_ESTR =
- "Attempt to change readonly trait.";
- static final String INVALID_VALUE_ESTR =
- "The value is invalid.";
- static final String INVALID_USE_ELEMENT_ESTR =
- "The <use> element is hooked into the document tree and the the value of xlink:href is set invalid.";
- static final String CANNOT_REMOVE_NODE_ESTR =
- "Cannot remove this type of node.";
- static final String CANNOT_REMOVE_NOT_CHILD_ESTR =
- "Not a child of this node.";
- static final String CANNOT_REMOVE_NON_NULL_ID_ESTR =
- "The element being removed or one of its decendants have non-null id.";
- static final String INSERT_NODE_OF_THAT_TYPE_ESTR =
- "Cannot insert node of that type.";
- static final String APPEND_DOCUMENT_ESTR =
- "Cannot append Document elements.";
- static final String DOCUMENT_HIERARCHY_ESTR =
- "Hierarchy request error in Document.";
- static final String CHILD_IS_WRONG_TYPE_ESTR =
- "Child is wrong type (Document).";
- static final String CHILD_BELONG_TO_DIFFERENT_DOCUMENT_ESTR =
- "Child belongs to different document.";
- static final String CHILD_NOT_FOUND_ESTR =
- "The child to insert before doesn't exist in this current node.";
- static final String INVALID_ELEMENT_ID_VALUE =
- "Invalid element id value.";
- */
//--------------------------------------------------
// VARIABLES
@@ -262,7 +187,7 @@
{
// Get child element's handle
int childHandle = _getFirstElementChild(
- getNativeSVGProxyHandle(), getHandle());
+ getNativeSVGProxyHandle(), getHandle());
if (M2GObject.checkHandle(childHandle))
{
return (Element)M2GSVGElement.buildElement(childHandle, iDocument);
@@ -373,7 +298,7 @@
public Element getNextElementSibling()
{
int elementHandle = _getNextElementSibling(
- getNativeSVGProxyHandle(), getHandle());
+ getNativeSVGProxyHandle(), getHandle());
if (M2GObject.checkHandle(elementHandle))
{
return M2GSVGElement.buildElement(elementHandle, iDocument);
@@ -394,7 +319,7 @@
throw new SecurityException(M2GSVGConstants.ACCESS_RIGHTS_ESTR);
}
int parentHandle = _getParent(
- getNativeSVGProxyHandle(), getHandle());
+ getNativeSVGProxyHandle(), getHandle());
if (M2GObject.checkHandle(parentHandle))
{
return M2GSVGElement.buildElement(parentHandle, iDocument);
@@ -767,7 +692,7 @@
getNativeSVGProxyHandle(),
((M2GSVGElement)newChild).getHandle(),
M2GSVGConstants.AT_XLINKHREF);
- // Need to call resource handler if element is elementindom, image,
+ // call resource handler call if element is elementindom, image,
// and if it has an href attribute
if ((href != null) &&
(((M2GSVGElement)newChild).iElementTypeId == M2GSVGConstants.EL_IMAGE) &&
@@ -960,7 +885,7 @@
/*SF*/"The input value is an invalid value for the given trait."/*SF*/);
}
- _setPathTrait( getNativeSVGProxyHandle(),
+ _setPathTrait(getNativeSVGProxyHandle(),
getHandle(), id, ((M2GSVGPath)path).getHandle());
// inform observer about changes in DOM only if element is in DOM
@@ -1282,7 +1207,7 @@
String id = M2GSVGElement._getStringTrait(
M2GManager.getInstance().getSVGProxyHandle(),
aElementHandle,
- M2GSVGConstants.AT_ID );
+ M2GSVGConstants.AT_ID);
if ((id != null) && id.equals("text_use_svg_default_font"))
{
return buildElement(
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGElementWrapper.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGElementWrapper.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGImage.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGImage.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -39,18 +39,7 @@
//--------------------------------------------------
// STATIC CONSTANTS
//--------------------------------------------------
- /* Optimization: static finals changed to local variables
- private static final String NULL_TYPE_ESTR =
- "The type is null.";
- private static final String ILLEGAL_VALUS_ESTR =
- "The x or y values are negative.";
- private static final String EVENT_TYPE_NOT_SUPPORTED_ESTR =
- "The event type is not supported.";
- private static final String INVALID_ELEMENT_ESTR =
- "Invalid element.";
- public static final String URI_IS_NULL_ESTR =
- "The URI is null.";
- */
+
//--------------------------------------------------
// VARIABLES
@@ -198,7 +187,7 @@
_focusOn(
((M2GSVGElement)element).getNativeSVGProxyHandle(),
((M2GSVGElement)element).getDocument().getHandle(),
- ((M2GSVGElement)element).getHandle() );
+ ((M2GSVGElement)element).getHandle());
}
tempNode = element;
while (tempNode != null)
@@ -339,7 +328,7 @@
{
throw new NullPointerException();
}
-
+
String strData = new String(StreamUtils.readBytesFromStream(stream, -1));
@@ -351,7 +340,7 @@
// Creates and setups svg image
M2GSVGImage image = new M2GSVGImage();
-
+
M2GDocument document = M2GDocument.buildDocument(
image,
baseUrl,
@@ -359,9 +348,9 @@
strData,
handler);
// Checks document validity
-
+
image.setDocument(document);
-
+
if (handler != null)
{
// Gets size of external resources
@@ -383,11 +372,11 @@
}
}
}
-
+
// initialise the viewport
_initViewport(document.getNativeSVGProxyHandle(),
document.getHandle());
-
+
return image;
}
@@ -454,19 +443,19 @@
// NATIVE METHODS
//--------------------------------------------------
private native static int _dispatchMouseEvent(
- int aSvgProxyHandle,int aDocumentHandle,
+ int aSvgProxyHandle,int aDocumentHandle,
int aX, int aY);
private native static void _focusOn(
- int aSvgProxyHandle,int aDocumentHandle,
+ int aSvgProxyHandle,int aDocumentHandle,
int aSvgElementHandle);
private native static void _focusOut(
- int aSvgProxyHandle,int aDocumentHandle,
+ int aSvgProxyHandle,int aDocumentHandle,
int aSvgElementHandle);
native static int _getExternalListSize(
- int aSvgProxyHandle, int aDocumentHandle);
+ int aSvgProxyHandle, int aDocumentHandle);
native static String _getExternalListItem(
int aSvgProxyHandle, int aDocumentHandle,
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGLocatableElement.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGLocatableElement.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -44,7 +44,7 @@
{
M2GSVGRect bbox = new M2GSVGRect();
M2GSVGElement._getBBox(getNativeSVGProxyHandle(), getHandle(),
- M2GSVGConstants.AT_BBOX, bbox.getComponents());
+ M2GSVGConstants.AT_BBOX, bbox.getComponents());
// Checks element's type
if ((iElementTypeId == M2GSVGConstants.EL_G) ||
(iElementTypeId == M2GSVGConstants.EL_PATH) ||
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGMatrix.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGMatrix.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGPath.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGPath.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -31,12 +31,7 @@
//--------------------------------------------------
// STATIC CONTANTS
//--------------------------------------------------
- /* Optimization: static finals changed to local variables
- private static final String SEGMENT_INDEX_SIZE_ESTR =
- "The segment index is out of bounds.";
- private static final String PARAMETER_INDEX_SIZE_ESTR =
- "The parameter index is out of bounds for this segment's type.";
- */
+
private static final int CLOSE_PARAMETER_COUNT = 0;
private static final int MOVE_TO_PARAMETER_COUNT = 2;
private static final int LINE_TO_PARAMETER_COUNT = 2;
@@ -91,7 +86,7 @@
protected void doCleanup()
{
_destroyPath(getNativeSVGProxyHandle(),
- getHandle());
+ getHandle());
resetHandles();
}
@@ -111,7 +106,7 @@
public int getNumberOfSegments()
{
return _getNumberOfSegments(getNativeSVGProxyHandle(),
- getHandle() );
+ getHandle());
}
/**
@@ -168,7 +163,7 @@
public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
{
_addCurveTo(getNativeSVGProxyHandle(),
- getHandle(), x1, y1, x2, y2, x3, y3);
+ getHandle(), x1, y1, x2, y2, x3, y3);
}
/**
@@ -209,7 +204,7 @@
*/
public void moveTo(float x, float y)
{
- _addMoveTo(getNativeSVGProxyHandle(), getHandle(), x, y );
+ _addMoveTo(getNativeSVGProxyHandle(), getHandle(), x, y);
}
/**
@@ -222,7 +217,7 @@
x1,
y1,
x2,
- y2 );
+ y2);
}
//--------------------------------------------------
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGPoint.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGPoint.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGRGBColor.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGRGBColor.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGRect.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGRect.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGSVGElement.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGSVGElement.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -27,12 +27,7 @@
//--------------------------------------------------
// STATIC CONSTANTS
//--------------------------------------------------
- /* Optimization: static finals changed to local variables
- public static final String INVALID_SVG_VERSION_ESTR =
- "Invalid version.";
- public static final String INVALID_SVG_BASE_PROFILE_ESTR =
- "Invalid base profile.";
- */
+
//------------------------------------------------------------------
// VARIABLES
@@ -250,7 +245,7 @@
}
M2GSVGElement._setMatrixTrait(
- getNativeSVGProxyHandle(), getHandle(),
+ getNativeSVGProxyHandle(), getHandle(),
M2GSVGConstants.AT_TRANSFORM, matrixComponents);
// inform observer about changes in DOM
@@ -398,9 +393,9 @@
// NATIVE METHODS
//------------------------------------------------------------------
protected native static float _getMediaTime(
- int aSvgProxyHandle, int aDocumentHandle);
+ int aSvgProxyHandle, int aDocumentHandle);
private native static void _setMediaTime(
int aSvgProxyHandle, int aDocumentHandle,
- float aSeconds );
+ float aSeconds);
}
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGeSWTAnimator.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GSVGeSWTAnimator.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -31,26 +31,7 @@
"org.eclipse.swt.widgets.Canvas";
// Exception text
- /* Optimization: static finals changed to local variables
- private static final String COMPONENT_BASE_CLASS_NOT_SUPPORTED_ESTR =
- "The requested componentBaseClass is not supported by the implementation.";
- private static final String ILLEGAL_TIME_INCREMENT_ESTR =
- "The timeIncrement is less than or equal to zero.";
- private static final String ANIMATOR_PLAY_ESTR =
- "The animator is not currently in the stopped or paused state.";
- private static final String ANIMATOR_PAUSE_ESTR =
- "The animator is not in the playing state.";
- private static final String ANIMATOR_STOP_ESTR =
- "The animator is not in the playing or paused state.";
- private static final String INVALID_RUNNABLE_ESTR =
- "The runnable is null.";
- private static final String ANIMATOR_IS_STOPPED_ESTR =
- "The animator is in the stopped state.";
- private static final String RUNNABLE_IS_NULL_ESTR =
- "The runnable is null.";
- private static final String ANIMATOR_INVOKE_ESTR =
- "The animator is in the stopped state.";
- */
+
//--------------------------------------------------
// VARIABLES
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GScalableGraphics.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/M2GScalableGraphics.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -29,7 +29,7 @@
import com.nokia.mj.impl.nokialcdui.LCDUIInvoker;
import org.eclipse.swt.internal.qt.GCData;
import org.eclipse.swt.internal.qt.graphics.GraphicsContext;
-import org.eclipse.swt.internal.extension.GraphicsUtil;
+import org.eclipse.swt.internal.extension.GraphicsUtil;
/*
* ScalableGraphics
@@ -40,23 +40,7 @@
//--------------------------------------------------
// STATIC CONSTANTS
//--------------------------------------------------
- // Exception text
- /* Optimization: static finals changed to local variables
- private static final String ALPHA_OUT_OF_RANGE_ESTR =
- "The alpha is out of range";
- private static final String INVALID_TARGET_ESTR =
- "The target is invalid";
- private static final String MODE_INVALID_ESTR =
- "The mode is invalid";
- private static final String NULL_IMAGE_ESTR =
- "The image is null";
- private static final String NULL_TARGET_ESTR =
- "The target is null";
- private static final String TARGET_ALREADY_BOUND_ESTR =
- "Target is already bound";
- private static final String TARGET_NOT_BOUND_ESTR =
- "Target is not bound";
- */
+
// Transparency alpha max and min limits
private static final float MAX_TRANSPARENCY_ALPHA = 1.0f;
private static final float MIN_TRANSPARENCY_ALPHA = 0.0f;
@@ -69,8 +53,8 @@
private Graphics iTargetGraphics;
private Rectangle iSurfaceRectangle;
private Rectangle iFinalESWTSurfaceRectangle;
-
- int iSurfaceHandle;
+
+ int iSurfaceHandle;
//--------------------------------------------------
// METHODS
@@ -81,7 +65,7 @@
public M2GScalableGraphics()
{
super();
-
+
doConstruct();
}
/**
@@ -89,91 +73,79 @@
*/
public synchronized void bindTarget(Object target)
{
-
- if (target == null )
- {
- throw new NullPointerException(/*SF*/"The target is null"/*SF*/);
- }
-
- if (target instanceof org.eclipse.swt.graphics.GC)
- {
-
- final GC finalGc = (GC)target;
+ if (target == null)
+ {
+ throw new NullPointerException(/*SF*/"The target is null"/*SF*/);
+ }
+
+ if (target instanceof org.eclipse.swt.graphics.GC)
+ {
+ final GC finalGc = (GC)target;
+
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ iFinalESWTSurfaceRectangle = GraphicsUtil.startExternalRendering(finalGc);
+
+ // Get GCData from GC
+ iSurfaceHandle = GraphicsUtil.getWindowSurface(finalGc).getHandle();
+ _bind(getHandle(), iSurfaceHandle);
+ }
+ });
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- iFinalESWTSurfaceRectangle = GraphicsUtil.startExternalRendering(finalGc);
-
- // Get GCData from GC
- /*TODO check for this cahnge GCData gcData = ((org.eclipse.swt.graphics.GC)finalGc).getGCData();
- // Get internalGC (Graphicscontext), WindowSurface and the WindowSurface handle for native access
- iSurfaceHandle = gcData.internalGc.getWindowSurface().getHandle();*/
- iSurfaceHandle = GraphicsUtil.getWindowSurface(finalGc).getHandle();
-
- _bind(getHandle(), iSurfaceHandle);
-
- }
- });
- // currentTarget = target;
- iTargetGC = (GC)finalGc;
- // Handling for LCDUI Graphics
- //
- }
-//Change accordingly to M3G not as site content.
- else if (target instanceof javax.microedition.lcdui.Graphics)
- {
- Graphics g = (Graphics)target;
- final Graphics finalG = g;
- iSurfaceRectangle = LCDUIInvoker.startExternalRendering( finalG );
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
-
-
-
- iSurfaceHandle = LCDUIInvoker.getWindowSurface(finalG).getHandle();
-
- // Flush Canvas
- //M2GManager.flushDisplayBuffer();
- _bind(getHandle(), iSurfaceHandle);
-
+ iTargetGC = (GC)finalGc;
+ // Handling for LCDUI Graphics
+ }
+ else if (target instanceof javax.microedition.lcdui.Graphics)
+ {
+ Graphics g = (Graphics)target;
+ final Graphics finalG = g;
+ iSurfaceRectangle = LCDUIInvoker.startExternalRendering(finalG);
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
- }
- });
-
- iTargetGraphics = (Graphics)finalG;
- }
-
- else {
- throw new IllegalArgumentException();
- }
-
- //TODO Check for : when to give this exception java.lang.IllegalStateException - if target is already bound.
-
- }
-
+ iSurfaceHandle = LCDUIInvoker.getWindowSurface(finalG).getHandle();
+
+ // Flush Canvas
+ //M2GManager.flushDisplayBuffer();
+ _bind(getHandle(), iSurfaceHandle);
+ }
+ });
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ iTargetGraphics = (Graphics)finalG;
+ }
+
+ else
+ {
+ throw new IllegalArgumentException();
+ }
+ }
/**
* @see com.nokia.microedition.m2g.M2GObject#doConstruct()
*/
public void doConstruct()
{
- super.doConstruct();
-
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- setHandle(_createRenderContext(
- getNativeSVGProxyHandle() ));
- // Add object to the live objects container
- }
- });
+ super.doConstruct();
+
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ setHandle(_createRenderContext(
+ getNativeSVGProxyHandle()));
+ // Add object to the live objects container
+ }
+ });
register(this);
}
@@ -182,16 +154,18 @@
*/
public synchronized void doCleanup()
{
-
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- _deleteRenderContext(
- getHandle() );
- }
- }
- );
+
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ _deleteRenderContext(
+ getHandle());
+ }
+ }
+ );
resetHandles();
iTargetGC = null;
iTargetGraphics = null;
@@ -202,53 +176,49 @@
*/
public synchronized void releaseTarget()
{
-
- if (iTargetGC != null)
- {
-
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- GraphicsUtil.endExternalRendering(iTargetGC);
- _release(iSurfaceHandle, getHandle());
- }
- });
+ if (iTargetGC != null)
+ {
+
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ GraphicsUtil.endExternalRendering(iTargetGC);
+ _release(iSurfaceHandle, getHandle());
+ }
+ });
iTargetGC = null;
}
- else if (iTargetGraphics != null )
- {
-
-
- final Graphics finalG = iTargetGraphics;
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- _release(iSurfaceHandle, getHandle());
- }
- });
- LCDUIInvoker.endExternalRendering( iTargetGraphics );
-
- iTargetGraphics = null;
+ else if (iTargetGraphics != null)
+ {
+ final Graphics finalG = iTargetGraphics;
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ _release(iSurfaceHandle, getHandle());
+ }
+ });
+ LCDUIInvoker.endExternalRendering(iTargetGraphics);
+
+ iTargetGraphics = null;
}
- else
- {
-
- // check for invalid Graphics TODO this exception is getting trough when we trying to bind.s
+ else
+ {
throw new IllegalStateException(/*SF*/"Target is not bound"/*SF*/);
- }
+ }
}
+
public synchronized void render(
int x, int y, ScalableImage image, boolean aUseNativeClear)
{
-
-
iUseNativeClear = aUseNativeClear ? 1 : 0;
render(x, y, image);
iUseNativeClear = 0;
-
-
-
+
}
/**
@@ -256,14 +226,14 @@
*/
public synchronized void render(int x, int y, ScalableImage image)
{
-
+
if (image == null)
{
Logger.ELOG(Logger.EJavaUI, "render() - exception: "
+ /*SF*/"The target is null"/*SF*/);
throw new NullPointerException(/*SF*/"The target is null"/*SF*/);
}
- if (iTargetGC != null)
+ if (iTargetGC != null)
{
final M2GDocument finalDoc = (M2GDocument)((SVGImage)image).getDocument();
// Get synchronized svg image data
@@ -273,16 +243,15 @@
{
return;
}
- // Calculate clip dimensions TODO check the new clipping rect provided from StartExternalRendering API.s
- //Rectangle clipRect = iTargetGC.getClipping();
+
Rectangle clipRect = iFinalESWTSurfaceRectangle;
-
+
final int finalClipX = clipRect.x;
final int finalClipY = clipRect.y;
final int finalClipW = clipRect.width;
final int finalClipH = clipRect.height;
-
-
+
+
// if none of the svg image is visible due to clipping then don't
// bother to call render
if ((x >= (finalClipX + finalClipW)) || (y >= (finalClipY + finalClipH)))
@@ -297,67 +266,60 @@
"render() - svg image isn't visible due to clipping");
return;
}
-
+
+
+ final int finalX = x;
+ final int finalY = y;
+
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+
+ final int[] finalData = _renderESWT(getHandle(),
+ finalDoc.getHandle(), finalX, finalY,
+ finalClipX, finalClipY, finalClipW, finalClipH, finalSvgW, finalSvgW,
+ finalDoc.getRootElement().getCurrentTime(),
+ iUseNativeClear);
- final int finalX = x;
- final int finalY = y;
-
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
-
-
-
- final int[] finalData = _renderESWT(getHandle(),
- finalDoc.getHandle(), finalX, finalY,
- finalClipX, finalClipY, finalClipW, finalClipH, finalSvgW, finalSvgW,
- finalDoc.getRootElement().getCurrentTime(),
- iUseNativeClear);
-
- int[] bitmapHandles;
- bitmapHandles = new int[4];
- for (int i = 0; i < 4; i++)
- {
- bitmapHandles[i] = finalData[i];
- }
- int[] renderData;
- renderData = new int[6];
- for (int i = 0; i < 6; i++)
- {
- renderData[i] = finalData[i+4];
- }
- //iTargetGC.internal_drawM2GImage(bitmapHandles, renderData, iUseNativeClear);
+ int[] bitmapHandles;
+ bitmapHandles = new int[4];
+ for (int i = 0; i < 4; i++)
+ {
+ bitmapHandles[i] = finalData[i];
+ }
+ int[] renderData;
+ renderData = new int[6];
+ for (int i = 0; i < 6; i++)
+ {
+ renderData[i] = finalData[i+4];
+ }
- }});
-
+ }
+ });
+
}//if(true)
- else if (iTargetGraphics != null)
- {
-
-
+ else if (iTargetGraphics != null)
+ {
+
+
final M2GDocument finalDoc = (M2GDocument)((SVGImage)image).getDocument();
// Get synchronized svg image data
final int finalSvgW = image.getViewportWidth();
final int finalSvgH = image.getViewportHeight();
if ((finalSvgW == 0) || (finalSvgH == 0))
- {
-
+ {
+
return;
}
-
-
- //TODO as we are using Surface rectangle provided by StartExternalRendering as Clip Rectangle.
+
final int finalClipX = iSurfaceRectangle.x;
final int finalClipY = iSurfaceRectangle.y;
final int finalClipW = iSurfaceRectangle.width;
final int finalClipH = iSurfaceRectangle.height;
- // Calculate clip dimensions
- /*final int finalClipX = iTargetGraphics.getClipX() + iTargetGraphics.getTranslateX();
- final int finalClipY = iTargetGraphics.getClipY() + iTargetGraphics.getTranslateY();
- final int finalClipW = iTargetGraphics.getClipWidth();
- final int finalClipH = iTargetGraphics.getClipHeight();*/
// if none of the svg image is visible due to clipping then don't
// bother to call render
if ((x >= (finalClipX + finalClipW)) || (y >= (finalClipY + finalClipH)))
@@ -372,31 +334,30 @@
"render() - svg image isn't visible due to clipping");
return;
}
-
- final int finalX = x;
- final int finalY = y;
-
-
+
+ final int finalX = x;
+ final int finalY = y;
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- _renderLCDUI(getHandle(), finalDoc.getHandle(), finalX, finalY,
- finalClipX, finalClipY, finalClipW, finalClipH, finalSvgW, finalSvgH,
- finalDoc.getRootElement().getCurrentTime());
- }});
-
-
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ _renderLCDUI(getHandle(), finalDoc.getHandle(), finalX, finalY,
+ finalClipX, finalClipY, finalClipW, finalClipH, finalSvgW, finalSvgH,
+ finalDoc.getRootElement().getCurrentTime());
+ }
+ });
}
- else
- {
- Logger.ELOG(Logger.EJavaUI, "render() - exception: "
- + /*SF*/"Target is not bound"/*SF*/);//TODO for time being commented.s
- throw new IllegalStateException(/*SF*/"Target is not bound"/*SF*/);
- }
-
+ else
+ {
+ Logger.ELOG(Logger.EJavaUI, "render() - exception: "
+ + /*SF*/"Target is not bound"/*SF*/);
+ throw new IllegalStateException(/*SF*/"Target is not bound"/*SF*/);
+ }
+
}
/**
@@ -407,14 +368,16 @@
if ((mode == ScalableGraphics.RENDERING_QUALITY_LOW) ||
(mode == ScalableGraphics.RENDERING_QUALITY_HIGH))
{
- final int finalMode = mode;
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- _setRenderingQuality(getHandle(), finalMode);
- }
- });
+ final int finalMode = mode;
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ _setRenderingQuality(getHandle(), finalMode);
+ }
+ });
}
else
{
@@ -431,15 +394,17 @@
{
if (alpha >= MIN_TRANSPARENCY_ALPHA && alpha <= MAX_TRANSPARENCY_ALPHA)
{
- final float finalAlpha = alpha;
- // Execute in UI thread
- Platform.executeInUIThread(
- new M2GRunnableQt() {
- public void doRun() {
- _setTransparency(getHandle(), finalAlpha);
- }
- }
- );
+ final float finalAlpha = alpha;
+ // Execute in UI thread
+ Platform.executeInUIThread(
+ new M2GRunnableQt()
+ {
+ public void doRun()
+ {
+ _setTransparency(getHandle(), finalAlpha);
+ }
+ }
+ );
}
else
{
@@ -460,17 +425,17 @@
private native void _deleteRenderContext(
int aRenderContextHandle);
private native int _release(
- int aSurfaceHandle ,int aRenderContextHandle);
+ int aSurfaceHandle ,int aRenderContextHandle);
private native int _renderLCDUI(
- int aRenderContextHandle, int aDocumentHandle,
+ int aRenderContextHandle, int aDocumentHandle,
int aX, int aY, int aClipX, int aClipY, int aClipW, int aClipH,
int aSvgW, int aSvgH, float aCurrentTime);
private native int[] _renderESWT(
- int aRenderContextHandle, int aDocumentHandle,
+ int aRenderContextHandle, int aDocumentHandle,
int aX, int aY, int aClipX, int aClipY, int aClipW, int aClipH,
int aSvgW, int aSvgH, float aCurrentTime, int iUseNativeClear);
private native void _setRenderingQuality(
- int aRenderContextHandle, int aMode);
+ int aRenderContextHandle, int aMode);
private native void _setTransparency(
- int aRenderContextHandle, float aAlpha);
+ int aRenderContextHandle, float aAlpha);
}
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/NativeError.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/NativeError.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/Platform.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/Platform.java Fri Oct 29 11:49:32 2010 +0300
@@ -95,22 +95,22 @@
else
{
//display = DisplayExtension.getDisplayInstance();
- //As now the thread is always available we are taking it from Toolkit.
- display = Toolkit. getInternalDisplay();
-
-
- if (display == null)
+ //As now the thread is always available we are taking it from Toolkit.
+ display = Toolkit. getInternalDisplay();
+
+
+ if (display == null)
{
-
+
return false;
}
else
{
-
+
// UI thread is available, so load native library if not already loaded
if (!libraryLoaded)
{
-
+
com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javam2g");
libraryLoaded = true;
}
@@ -118,81 +118,9 @@
}
}
}
-
- /**
- * Load Library if not already loaded
- *
-
- static void loadLibarary()
- {
- if (!libraryLoaded)
- {
-
- com.nokia.mj.impl.rt.support.Jvm.loadSystemLibrary("javam2g");
- libraryLoaded = true;
- }
- }*/
+
- /**
- * Registers an Object3D in the global handle-to-object map. The
- * handle of the object must already be set at this point!
- */
-// static final void registerFinalizer(Object3D obj)
-// {
-// //heuristicGC();
-// }
-//
-// /**
-// * Registers a Graphics3D object (not derived from Object3D) for
-// * finalization.
-// */
-// static final void registerFinalizer(Graphics3D g3d)
-// {
-// //heuristicGC();
-// }
-//
-// /**
-// * Registers an Interface object for finalization
-// */
-// static final void registerFinalizer(Interface m2G)
-// {
-// }
-//
-// /**
-// * Registers a Loader object for finalization
-// */
-// static final void registerFinalizer(Loader loader)
-// {
-// }
-//
-// /**
-// * Flushes all pending rendering to a Graphics context and blocks
-// * until finished
-// */
-// static final void sync(Graphics g)
-// {
-// //ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-// //invoker.toolkitSync(invoker.getToolkit());
-// }
-//
-// /**
-// * Flushes all pending rendering to an Image object
-// */
-// static final void sync(Image img)
-// {
-// //ToolkitInvoker invoker = ToolkitInvoker.getToolkitInvoker();
-// //invoker.toolkitSync(invoker.getToolkit());
-// }
-//
-// /**
-// * Finalizes the native peer of an interface
-// */
-// static final native void finalizeInterface(int handle);
-//
-// /**
-// * Finalizes the native peer of an object
-// * JCF: added this wrapper method so we could pass the toolkit handle to the native method.
-// */
+
static final void finalizeObject(int handle)
{
try
@@ -213,31 +141,6 @@
}
}
- /**
- * Finalizes the native peer of an object associated with
- * given Interface instance
- */
-// static final void finalizeObject(int handle, Interface aInterface)
-// {
-// try
-// {
-// final int finalHandle = handle;
-// executeInUIThread(
-// new M2GRunnableQt()
-// {
-// public void doRun()
-// {
-// _finalizeObject(finalHandle);
-// }
-// });
-// }
-// catch (Exception e)
-// {
-// // do nothing
-// }
-// }
-
-
//------------------------------------------------------------------
// Private methods
//------------------------------------------------------------------
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionFactory.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionFactory.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionPolicy.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionPolicy.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionPolicyHandler.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionPolicyHandler.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionProxy.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GConnectionProxy.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GDefaultExternalResourceHandler.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GDefaultExternalResourceHandler.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GUrlTokenizer.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/M2GUrlTokenizer.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -195,7 +195,7 @@
/**
* Resolve URL according to existing base url and
* the given relative url
- * TODO: Should be resolved by using RFC 2396
+ * Should be resolved by using RFC 2396
* @aRelativeUrl Relative URL.
* @return Resolved URL
*/
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/common/M2GConnectionPolicyImpl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/common/M2GConnectionPolicyImpl.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/common/M2GConnectionProxyImpl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/common/M2GConnectionProxyImpl.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/file/M2GConnectionPolicyImpl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/file/M2GConnectionPolicyImpl.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/file/M2GConnectionProxyImpl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/com/nokia/microedition/m2g/connection/file/M2GConnectionProxyImpl.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/javasrc/eclipse/swt/widgets/SVGAnimatorControl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/eclipse/swt/widgets/SVGAnimatorControl.java Fri Oct 29 11:49:32 2010 +0300
@@ -16,8 +16,7 @@
*/
package org.eclipse.swt.widgets;
-// this package is removed from Qt import org.eclipse.swt.internal.symbian.
-/*import org.eclipse.swt.internal.symbian.*;*/
+
import org.eclipse.swt.internal.*;
import org.eclipse.swt.widgets.Control;
import javax.microedition.m2g.*;
@@ -29,7 +28,7 @@
import org.eclipse.swt.events.*;
import com.nokia.mj.impl.utils.Logger;
import org.eclipse.swt.widgets.Internal_PackageSupport;
-import org.eclipse.swt.graphics.Internal_GfxPackageSupport;
+import org.eclipse.swt.graphics.Internal_GfxPackageSupport;
@@ -71,8 +70,6 @@
*/
public SVGAnimatorControl(SVGImage aSVGImage)
{
-
-
iSVGImage = aSVGImage;
iState = STATE_STOPPED;
// Create render context, use M2GScalableGraphics
@@ -94,10 +91,6 @@
// Init widget after parent and display are known
//Have to create Widget.
-//Workaround for Qt changes this method is now in with one int argument.L:\sf\app\jrt\javauis\eswt_qt\org.eclipse.swt\Eclipse SWT\qt\org\eclipse\swt\widgets\Control.java
-// int i =10;
-// createWidget(i);
-// internal_createWidget();
// Add this to necessary listeners
addControlListener(this);
@@ -113,9 +106,9 @@
/**
* @see org.eclipse.swt.widgets.Control#paint()
*/
- public void paintControl(PaintEvent e) {
+ public void paintControl(PaintEvent e)
+ {
GC gc = e.gc;
-
// Render image
try
{
@@ -126,7 +119,6 @@
}
finally
{
-
iSg.releaseTarget();
}
}
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/ExternalResourceHandler.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/ExternalResourceHandler.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGAnimator.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGAnimator.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
@@ -142,55 +142,16 @@
* @return a new <code>SVGAnimator</code> instance.
* @throws NullPointerException if <code>svgImage</code> is null.
*/
-
- public static SVGAnimator createAnimator(SVGImage svgImage)
- {
- SVGAnimator tempAnimator = null;
-
-
-
- tempAnimator=M2GSVGAnimator.buildAnimator(svgImage);
-
-
- return tempAnimator;
- }
-
-
-
- public static SVGAnimator createAnimator(SVGImage svgImage,java.lang.String componentBaseClass)
- {
- SVGAnimator tempAnimator = null;
-
- if (componentBaseClass == "org.eclipse.swt.widgets.Control")
- {
-
- tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage);
-
- }
- else
- {
-
- tempAnimator=M2GSVGAnimator.buildAnimator(svgImage);
-
- }
- return tempAnimator;
- }
-
- /* public static SVGAnimator createAnimator(SVGImage svgImage)
+ public static SVGAnimator createAnimator(SVGImage svgImage)
{
SVGAnimator tempAnimator = null;
-
-
-
- tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage);
-
-
+
+ tempAnimator=M2GSVGAnimator.buildAnimator(svgImage);
- //tempAnimator=M2GSVGAnimator.buildAnimator(svgImage);
-
return tempAnimator;
- }*/
+ }
+
/**
* This method creates a new <code>SVGAnimator</code> for the specified SVGImage.
@@ -217,29 +178,34 @@
* <code>componentBaseClass</code> is not supported by the
* implementation.
*/
-//
-// public static SVGAnimator createAnimator(SVGImage svgImage, String componentBaseClass)
-// {
-// SVGAnimator tempAnimator = null;
-//
-// tempAnimator=M2GSVGAnimator.buildAnimator(svgImage, componentBaseClass);
-//
-// return tempAnimator;
-//
-// }
-
-
-
-/* public static SVGAnimator createAnimator(
- SVGImage svgImage, String componentBaseClass)
+
+ public static SVGAnimator createAnimator(SVGImage svgImage,java.lang.String componentBaseClass)
{
-
+ SVGAnimator tempAnimator = null;
- SVGAnimator tempAnimator = null;
+ if (componentBaseClass == null)
+ {
+ tempAnimator = createAnimator(svgImage);
+ return tempAnimator;
+ }
+
+ else if (componentBaseClass == "org.eclipse.swt.widgets.Control")
+ {
tempAnimator=M2GSVGeSWTAnimator.buildAnimator(svgImage);
-// TODO Check for the toolkit?? tempAnimator=M2GSVGAnimator.buildAnimator(svgImage, componentBaseClass);
+ }
+
+ else if (componentBaseClass == "javax.microedition.lcdui.Canvas")
+ {
+ tempAnimator=M2GSVGAnimator.buildAnimator(svgImage);
+ return tempAnimator;
+ }
+
+ else
+ {
+ throw new IllegalArgumentException();
+ }
return tempAnimator;
- }*/
+ }
/**
* The type of target component associated with the animator depends on the
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGEventListener.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGEventListener.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGImage.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/SVGImage.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/ScalableGraphics.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/ScalableGraphics.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -42,9 +42,7 @@
*/
private ScalableGraphics()
{
-
iSg = new M2GScalableGraphics();
-
}
/**
@@ -63,9 +61,7 @@
*/
public void bindTarget(java.lang.Object target)
{
-
iSg.bindTarget(target);
-
}
/**
@@ -87,9 +83,7 @@
*/
public void releaseTarget()
{
-
iSg.releaseTarget();
-
}
/**
@@ -106,9 +100,7 @@
*/
public void render(int x, int y, ScalableImage image)
{
-
iSg.render(x,y, image);
-
}
/**
--- a/javauis/m2g_qt/javasrc/javax/microedition/m2g/ScalableImage.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/javasrc/javax/microedition/m2g/ScalableImage.java Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2004-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"
--- a/javauis/m2g_qt/src/CM2GRenderContext.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/CM2GRenderContext.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -93,22 +93,22 @@
{
TRAP_IGNORE(iProxy->DeleteSvgEngineL(iEngineHandle));
}
- if(iWindowSurface)
- {
- delete iWindowSurface;
- }
- if(targetBitmap)
- {
+ if (iWindowSurface)
+ {
+ delete iWindowSurface;
+ }
+ if (targetBitmap)
+ {
delete targetBitmap;
- }
- if(iTargetQImage)
- {
+ }
+ if (iTargetQImage)
+ {
delete iTargetQImage;
- }
- if(tempBitmapForMask)
- {
+ }
+ if (tempBitmapForMask)
+ {
delete tempBitmapForMask;
- }
+ }
delete iImgBmp;
iFbsSession.Disconnect();
}
@@ -117,125 +117,73 @@
// CM2GRenderContext::BindL
// -----------------------------------------------------------------------------
void CM2GRenderContext::BindL(TInt& aTargetHandle)
- {
+{
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::BindL()");
// get the screen size
- TSize screenSize = CEikonEnv::Static()->ScreenDevice()->SizeInPixels();
-
+ TSize screenSize = CEikonEnv::Static()->ScreenDevice()->SizeInPixels();
+
iWindowSurface = (reinterpret_cast<Java::GFX::WindowSurface*>(aTargetHandle));
- //wSurfaceType = (Java::GFX::WindowSurfaceType)iWindowSurface->getType();
- wSurfaceType = Java::GFX::WsTypeQtImage;
-
- iWindowSurface->bind(wSurfaceType);
-
- switch(wSurfaceType)
- {
- case Java::GFX::WsTypeQtImage:
- User::LeaveIfNull(iOffScreenQImage = iWindowSurface->getQtImage());
- targetBitmap = new CSvgtBitmap ((TInt8*)iOffScreenQImage->bits(),
- TSize(iOffScreenQImage->size().width(),iOffScreenQImage->size().height()),
- EColor16MA,iOffScreenQImage->bytesPerLine());
- break;
+
+ iWindowSurface->bind(Java::GFX::WsTypeQtImage);
+
+ wSurfaceType = (Java::GFX::WindowSurfaceType)iWindowSurface->getType();
- /*TODO for time being..case Java::GFX::WsTypeQtImage:
- User::LeaveIfNull(iTargetQImage = iWindowSurface->getQtImage());
- InitializeQImageOffscreenBufferL(screenSize,iTargetQImage);
- break;*/
-
- case Java::GFX::WsTypeSymbianBitmap:
- CFbsBitmap* tempBitmap;
- User::LeaveIfNull(tempBitmap = (reinterpret_cast<Java::GFX::WindowSurface*>(aTargetHandle)->getSymbianBitmap()));
- InitializeCFbsBitmapOffscreenBufferL(screenSize,tempBitmap);
- //iOffScreenBitmap = new(ELeave) CFbsBitmap();
- break;
-
- default:
- User::Leave(KErrNotSupported);
- break;
- }
-
+ switch (wSurfaceType)
+ {
+ case Java::GFX::WsTypeQtImage:
+ User::LeaveIfNull(iOffScreenQImage = iWindowSurface->getQtImage());
+ targetBitmap = new CSvgtBitmap((TInt8*)iOffScreenQImage->bits(),
+ TSize(iOffScreenQImage->size().width(),iOffScreenQImage->size().height()),
+ EColor16MA,iOffScreenQImage->bytesPerLine());
+ break;
+
+ case Java::GFX::WsTypeSymbianBitmap:
+ break;
+
+ default:
+ User::Leave(KErrNotSupported);
+ break;
}
+}
+
// -----------------------------------------------------------------------------
-// CM2GRenderContext::InitializeQImageOffscreenBufferL
-// -----------------------------------------------------------------------------
-void CM2GRenderContext::InitializeQImageOffscreenBufferL(TSize aScreenSize,QImage* aQimage)
- {
- QSize aSize;
- aSize.setHeight(aScreenSize.iHeight);
- aSize.setWidth(aScreenSize.iWidth);
- iOffScreenQImage = new QImage(aSize,aQimage->format());
-
- //TODO For time being the format is EColor16MU
- targetBitmap = new CSvgtBitmap ((TInt8*)iOffScreenQImage->bits(),
- TSize(iOffScreenQImage->size().width(),iOffScreenQImage->size().height()),
- EColor16MU,iOffScreenQImage->bytesPerLine());
- }
-
-// -----------------------------------------------------------------------------
-// CM2GRenderContext::InitializeCFbsBitmapOffscreenBufferL
-// -----------------------------------------------------------------------------
-void CM2GRenderContext::InitializeCFbsBitmapOffscreenBufferL(TSize aScreenSize,CFbsBitmap* aBitmap)
- {
-
- iOffScreenBitmap = new(ELeave) CFbsBitmap();
- User::LeaveIfError(
- iOffScreenBitmap->Create(aScreenSize, aBitmap->DisplayMode()));
-
-// TODO check for stride in case of bitmap.
-// iTargetBitmap = new CSvgtBitmap( (TInt8*)iOffScreenBitmap->DataAddress() ,aScreenSize,iOffScreenBitmap->DisplayMode()/*KDefaultDisplayMode TODO chk this*/,iOffScreenBitmap->ScanLineLength(iOffScreenBitmap->SizeInPixels().iWidth,KDefaultDisplayMode) );
- }
-
-// -----------------------------------------------------------------------------
-// CM2GRenderContext::GetImgHandleL
-// -----------------------------------------------------------------------------
-/*
- * TODO we don't need method anymore as now we need Surface handle
- * TM2GBitmapHandle CM2GRenderContext::GetImgHandleL() const
-{
- User::LeaveIfNull(iImgBmp);
-
- return REINTERPRET_CAST(TM2GBitmapHandle, iImgBmp);
-}*/
-
-
// -----------------------------------------------------------------------------
// CM2GRenderContext::InitImageBitmapL
// -----------------------------------------------------------------------------
void CM2GRenderContext::InitImageBitmapL()
- {
+{
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::InitImageBitmapL() - begin");
// get the screen size
TSize screenSize = CEikonEnv::Static()->ScreenDevice()->SizeInPixels();
switch (wSurfaceType)
- {
- case Java::GFX::WsTypeQtImage:
- {
- break;
- }
- case Java::GFX::WsTypeSymbianBitmap:
- {
- break;
- }
-
- default:
- break;
- }
+ {
+ case Java::GFX::WsTypeQtImage:
+ {
+ break;
+ }
+ case Java::GFX::WsTypeSymbianBitmap:
+ {
+ break;
+ }
+
+ default:
+ break;
+ }
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::InitImageBitmapL() - end");
- }
-// -----------------------------------------------------------------------------
+}
// CM2GRenderContext::ReleaseL
// -----------------------------------------------------------------------------
void CM2GRenderContext::ReleaseL()
- {
+{
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ReleaseL() - begin");
-
+
iTargetQImage = NULL;
iOffScreenQImage = NULL;
iWindowSurface->release();
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ReleaseL() - end");
- }
+}
// -----------------------------------------------------------------------------
// CM2GRenderContext::RenderL
@@ -307,7 +255,7 @@
// CM2GRenderContext::ConstructL
// -----------------------------------------------------------------------------
void CM2GRenderContext::ConstructL(MM2GSVGProxy* aProxy)
- {
+{
// Init member variables
SetTransparency(MM2GRenderContext::KFullOpaque);
@@ -327,7 +275,7 @@
User::LeaveIfError(iFbsSession.Connect());
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ConstructL() - end");
- }
+}
// -----------------------------------------------------------------------------
// CM2GRenderContext::PrepareViewbox
// -----------------------------------------------------------------------------
@@ -366,11 +314,11 @@
}
void CM2GRenderContext::RenderLCDUIL(
- TM2GSvgDocumentHandle& aSvgDocHandle,
- TReal32 aCurrentTime,
- const TRect& aViewbox,
- const TPoint& aAnchor)
- {
+ TM2GSvgDocumentHandle& aSvgDocHandle,
+ TReal32 aCurrentTime,
+ const TRect& /*aViewbox*/,
+ const TPoint& /*aAnchor*/)
+{
M2G_DEBUG_4("M2G_DEBUG: CM2GRenderContext::RenderL() viewbox: x=%d, y=%d, w=%d, h=%d begin", aViewbox.iTl.iX, aViewbox.iTl.iY, aViewbox.Size().iWidth, aViewbox.Size().iHeight);
// No need to render if content is fully transparency (i.e. alpha=0)
@@ -379,47 +327,29 @@
return;
}
- QStringList list;
- list <<"QImage-Format_RGB32";
- TBuf8<32> fname;
-
// 1: render the svg document on the iImgBmp
iProxy->RenderDocumentL(
iEngineHandle,
aSvgDocHandle,
- (TM2GSvgBitmapHandle)targetBitmap
+ (TM2GSvgBitmapHandle)targetBitmap
, (TUint)NULL, aCurrentTime);
-
- fname.Zero();
- fname.Format(_L8("c:\\%s.bmp"), list.at(0).toLocal8Bit().constData());
- TBool ret = iOffScreenQImage->save((const char*)fname.PtrZ());
-
- QPixmap pixmap = QPixmap::fromImage(*iOffScreenQImage);
- tempBitmapForMask = pixmap.toSymbianCFbsBitmap();
-
- TFileName bitmapFilename;
- bitmapFilename.Copy(_L("c:\\bugbitmap"));
- bitmapFilename.AppendNum(tempBitmapForMask->Handle());
- bitmapFilename.Append(_L(".bmp"));
- SaveBitmapL(*tempBitmapForMask, bitmapFilename);
- //TODO Release function should be called from FrameWork
- //iWindowSurface->release();
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::RenderL() end");
- }
+
+ M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::RenderL() end");
+}
// -----------------------------------------------------------------------------
-/*TODO
- * Write the separate RenderDocumentL method for QImage and CFbsBitmap
+/*
+ * Write the separate RenderDocumentL method for QImage and CFbsBitmap
* also handle subsequent BitBlt and
* CreateAlphaBlendMaskL
* */
void CM2GRenderContext::RenderESWTL(
TM2GSvgDocumentHandle& aSvgDocHandle,
TReal32 aCurrentTime,
- const TRect& aViewbox,
- const TPoint& aAnchor,
+ const TRect& /*aViewbox*/,
+ const TPoint& /*aAnchor*/,
TBool /*aUseNativeClear*/,
- TInt* aReturnData)
+ TInt* /*aReturnData*/)
{
M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::RenderESWTL() Start");
// No need to render if content is fully transparency (i.e. alpha=0)
@@ -427,139 +357,13 @@
{
return;
}
-
+
// 1: render the svg document on the iImgBmp
- iProxy->RenderDocumentL(iEngineHandle,
- aSvgDocHandle,
- (TM2GSvgBitmapHandle)targetBitmap, (TUint)NULL, aCurrentTime);
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::RenderESWTL() end");
-
-}
-// CM2GRenderContext::CreateAlphaBlendMask
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-// CM2GRenderContext::ClearBitmapL
-// -----------------------------------------------------------------------------
-void CM2GRenderContext::ClearBitmapL(CFbsBitmap* aBmp)
-{
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearBitmap - begin");
+ iProxy->RenderDocumentL(iEngineHandle,
+ aSvgDocHandle,
+ (TM2GSvgBitmapHandle)targetBitmap, (TUint)NULL, aCurrentTime);
+ M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::RenderESWTL() end");
- User::LeaveIfNull(aBmp);
-
- TM2GBitmapLock lock(aBmp);
-
- TSize size = aBmp->SizeInPixels();
- TInt scanlineLength = aBmp->ScanLineLength(size.iWidth, aBmp->DisplayMode());
-
- TUint32* buf = aBmp->DataAddress();
- char* bufBytes = REINTERPRET_CAST(char*, buf);
-
- Mem::FillZ(bufBytes, size.iHeight * scanlineLength);
-
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearBitmap - end");
}
-
-void CM2GRenderContext::ClearSurfaceL(TM2GSvgBitmapHandle aSvgtBmpHandle )
- {
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearBitmap - begin");
-//TODO As Currently we are not using this functionality.
-/* switch(wSurfaceType)
- {
- case Java::GFX::WsTypeQtImage:
- QImage* tempQImage;
- User::LeaveIfNull(tempQImage = (reinterpret_cast<Java::GFX::WindowSurface*>(aSvgtBmpHandle)->getQtImage()));
- //TODO Do we need to lock the qimage as implemented below TM2GBitmapLock lock(tempBitmap);?
- QSize sizeQimage = tempQImage->size();//TODO Check for SizeInPixels
- TInt scanlineLengthQimage = tempQImage->bytesPerLine();
- //uchar* bufBytesQimage = REINTERPRET_CAST(uchar*, tempQImage->bits());
-
- Mem::FillZ(tempQImage->bits(), sizeQimage.height() * scanlineLengthQimage);
-
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearSurface Qimage Clear function- end");
- break;
-
- case Java::GFX::WsTypeSymbianBitmap:
- CFbsBitmap* tempBitmap;
- User::LeaveIfNull(tempBitmap = (reinterpret_cast<Java::GFX::WindowSurface*>(aSvgtBmpHandle)->getSymbianBitmap()));
- TM2GBitmapLock lock(tempBitmap);
- TSize sizeBmp = tempBitmap->SizeInPixels();
- TInt scanlineLengthBmp = tempBitmap->ScanLineLength(sizeBmp.iWidth, tempBitmap->DisplayMode());
- TUint32* bufBmp = tempBitmap->DataAddress();
- char* bufBytesBmp = REINTERPRET_CAST(char*, bufBmp);
-
- Mem::FillZ(bufBytesBmp, sizeBmp.iHeight * scanlineLengthBmp);
-
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearSurface Bitmap Clear function- end");
- break;
-
- default:
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::ClearBitmap Type Not Supported.- end");
- User::Leave(KErrNotSupported);
- break;
- }
- */
- }
-
-// -----------------------------------------------------------------------------
-// CM2GRenderContext::FillBitmapL
-// -----------------------------------------------------------------------------
-void CM2GRenderContext::FillBitmapL(CFbsBitmap* aBmp, const TUint8& aChar)
-{
- M2G_DEBUG_1("M2G_DEBUG: CM2GRenderContext::FillBitmap() filled with=%d - begin", aChar);
- User::LeaveIfNull(aBmp);
- TM2GBitmapLock lock(aBmp);
-
- TSize size = aBmp->SizeInPixels();
- TInt scanlineLength = aBmp->ScanLineLength(size.iWidth, aBmp->DisplayMode());
-
- TUint32* buf = aBmp->DataAddress();
- char* bufBytes = REINTERPRET_CAST(char*, buf);
-
- Mem::Fill(bufBytes, size.iHeight * scanlineLength, aChar);
-
- M2G_DEBUG_0("M2G_DEBUG: CM2GRenderContext::FillBitmap - end");
-}
-
-// -----------------------------------------------------------------------------
-// CM2GRenderContext::GetBufferHandleL
-// -----------------------------------------------------------------------------
-TM2GSvgBitmapHandle CM2GRenderContext::GetBufferHandleL() const
- {
- switch(wSurfaceType)
- {
- case Java::GFX::WsTypeQtImage:
- User::LeaveIfNull(iOffScreenQImage);
- return REINTERPRET_CAST(TM2GSvgBitmapHandle , iOffScreenQImage);
- break;
-
- case Java::GFX::WsTypeSymbianBitmap:
- User::LeaveIfNull(iOffScreenBitmap);
- return REINTERPRET_CAST(TM2GSvgBitmapHandle , iOffScreenBitmap);
- break;
-
- default:
- User::Leave(KErrNotSupported);
- break;
- }
-
- }
-
-//CODE to check the Bitmap Contain.
-TInt CM2GRenderContext::SaveBitmapL(const CFbsBitmap& aNVGBitmap, const TFileName& aFileName)
- {
- TFileName bitmapFilename;
- bitmapFilename.Copy(aFileName);
- RFs aFs;
- User::LeaveIfError(aFs.Connect());
- CImageEncoder * imgEncoder = 0;
- TRequestStatus requesStatus = 0;
- imgEncoder = CImageEncoder::FileNewL(aFs, bitmapFilename, _L8("image/bmp"), CImageEncoder::EOptionAlwaysThread);
- imgEncoder->Convert(&requesStatus, aNVGBitmap);
- User::WaitForRequest(requesStatus);
- delete imgEncoder;
- aFs.Close();
- return 0;
- }
-
M2G_NS_END
--- a/javauis/m2g_qt/src/CM2GSVGProxy.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/CM2GSVGProxy.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -279,7 +279,7 @@
TInt findResult = iSvgDocuments.Find(aDocumentHandle);
if (findResult != KErrNotFound)
{
- // Try to remove the handle from the container
+ // Remove the handle from the container
TRAPD(err, iSvgDocuments.Remove(findResult));
if (err != KM2GOk)
{
@@ -301,7 +301,7 @@
TInt findResult = iSvgEngines.Find(aEngineHandle);
if (findResult != KErrNotFound)
{
- // Try to remove the handle from the container
+ // Remove the handle from the container
TRAPD(err, iSvgEngines.Remove(findResult));
if (err != KM2GOk)
{
@@ -837,22 +837,20 @@
M2G_DEBUG_0("M2G_DEBUG: CM2GSVGProxy::RenderDocumentL() - end");
}
-//TODO following changes done for Qimage
-//Check for TUint or TInt for subsequent API Call
void CM2GSVGProxy::RenderDocumentL(
const TM2GSvgEngineHandle& aEngineHandle,
const TM2GSvgDocumentHandle& aDocumentHandle,
const TM2GSvgBitmapHandle& aSurfaceHandle,
TM2GSvgBitmapHandle aSurfaceMaskHandle,
TReal32 aCurrentTime)
- {
+{
M2G_DEBUG_2("M2G_DEBUG: CM2GSVGProxy::RenderDocumentL() Qimage variant native:%d, time=%f - begin", iNative, aCurrentTime);
M2G_DEBUG_3("M2G_DEBUG: CM2GSVGProxy::RenderDocumentL() engine:%d, doc:%d, SvgBitmapHandle:%d", aEngineHandle, aDocumentHandle, aSurfaceHandle);
iNative->SvgEngineRenderDocument(
aEngineHandle, aDocumentHandle, aSurfaceHandle, aSurfaceMaskHandle, aCurrentTime);
M2G_DEBUG_0("M2G_DEBUG: CM2GSVGProxy::RenderDocumentL() - end");
-
- }
+
+}
// -----------------------------------------------------------------------------
// CM2GSVGProxy::RenderQualityL
@@ -1098,34 +1096,7 @@
M2G_DEBUG_0("M2G_DEBUG: CM2GSVGProxy::ConstructL() - begin");
//Get the font spec with variant default font
- const TInt KApacFontId = EApacPlain16;
- const TInt KLatintFontId = ELatinBold12;
- TInt fontId = KLatintFontId;
-
- /* switch (AknLayoutUtils::Variant())
- {
- case EApacVariant:
- {
- fontId = KApacFontId;
- }
- break;
- case EEuropeanVariant:
- default:
- break;
- }
- FeatureManager::InitializeLibL();
-
- if (FeatureManager::FeatureSupported(KFeatureIdAvkonApac))
- {
- fontId = KApacFontId;
- }
-
- FeatureManager::UnInitializeLib();
-
- const CFont* font = AknLayoutUtils::FontFromId(fontId);
- TFontSpec spec = font->FontSpecInTwips();*/
- // TODO have to check for substitute of above.
const CFont* font = CEikonEnv::Static()->NormalFont();
TFontSpec spec = font->FontSpecInTwips();
iNative = CSvgJavaInterfaceImpl::NewL(spec);
--- a/javauis/m2g_qt/src/CSynchronization.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/CSynchronization.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -33,8 +33,7 @@
M2gGlobals* getM2gGlobals()
{
// Access the PLS of this process.
- //Todo have to check Uid for process.
- return Pls<M2gGlobals>(TUid::Uid(0x200211E2));
+ return Pls<M2gGlobals>(TUid::Uid(0x2002DCBD));
}
#else
--- a/javauis/m2g_qt/src/M2GGeneral.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/M2GGeneral.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
--- a/javauis/m2g_qt/src/M2GUtils.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/M2GUtils.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -96,13 +96,13 @@
TInt M2GBitmapUtils::BitQBlt(QImage& aTargetQimage,
- const QImage& aSourceQimage,
- const TPoint& aPoint,
- const TRect* aRect,
- const CFbsBitmap* aSourceMask)
+ const QImage& aSourceQimage,
+ const TPoint& aPoint,
+ const TRect* aRect,
+ const CFbsBitmap* aSourceMask)
{
M2G_DEBUG_2("M2G_DEBUG: M2GBitmapUtils::BitQBlt() - Point(x=%d, y=%d)", aPoint.iX, aPoint.iY);
-
+
QPixmap pixmapTarget = QPixmap::fromImage(aTargetQimage);
CFbsBitmap* aTarget = pixmapTarget.toSymbianCFbsBitmap();
@@ -341,6 +341,4 @@
CleanupStack::PopAndDestroy(tempBitmap);
M2G_DEBUG_0("TSWTBitBlt()-");
}
-//TODO Check for M2G_DO_LOCK M2G_DO_UNLOCK
-//TODO Put Check for aSvgProxyHandle in all the functions.
M2G_NS_END
--- a/javauis/m2g_qt/src/jni/M2GDocument.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GDocument.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -61,22 +61,22 @@
jstring aData)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _createDocument - begin");
-
+
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
JStringUtils data(*aJni, aData);
- //RJString data(*aJni, aData);
+
TPtrC16* bData = STATIC_CAST(TPtrC16*, &data);
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->CreateDocumentL(*bData, handle););
- }
+ }
M2G_DO_UNLOCK(aJni)
- handle = M2GGeneral::CheckErrorCodeAndHandle(aJni, err, handle, M2G_INVALID_HANDLE);
+ handle = M2GGeneral::CheckErrorCodeAndHandle(aJni, err, handle, M2G_INVALID_HANDLE);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GDocument ) _createDocument: %d - end", handle);
return handle;
}
@@ -106,19 +106,19 @@
// Execute native engine method
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->CreateElementNsL(
- aType,
- aDocumentHandle,
- handle); );
-
- }
- M2G_DO_UNLOCK(aJni)
-
+ aType,
+ aDocumentHandle,
+ handle););
+
+ }
+ M2G_DO_UNLOCK(aJni)
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GDocument ) _createElementNS: %d - end", handle);
return handle;
@@ -139,18 +139,18 @@
JNIEnv* aJni,
jclass,
jint aSvgProxyHandle,
- jint aDocumentHandle )
+ jint aDocumentHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _deleteDocument - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
// Extract the SVGProxy handle
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->DeleteDocumentL(aDocumentHandle););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -180,16 +180,16 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _getElementById - begin");
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
- //RJString id(*aJni, aId);
+
JStringUtils id(*aJni, aId);
TPtrC16* lId = STATIC_CAST(TPtrC16*, &id);
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->GetElementByIdL(aDocumentHandle, *lId, handle););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -218,13 +218,13 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _getViewportHeight - begin");
TInt err = KM2GNotOk;
TInt height = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->GetViewportHeightL(aDocumentHandle, height););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -255,13 +255,13 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _getViewportWidth - begin");
TInt err = KM2GNotOk;
TInt width = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->GetViewportWidthL(aDocumentHandle, width););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -295,11 +295,11 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err,aProxy->IsElementInDomL(
- aDocumentHandle, aElementHandle, isElementInDom););
- }
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err,aProxy->IsElementInDomL(
+ aDocumentHandle, aElementHandle, isElementInDom););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -338,34 +338,34 @@
jbyte* resBytes = NULL;
if (aResourceData)
- {
+ {
resBytes = aJni->GetByteArrayElements(aResourceData, NULL);
lResData8.Set(REINTERPRET_CAST(TUint8*, resBytes), aJni->GetArrayLength(aResourceData));
- }
+ }
TInt completed = -1;
TPtrC16* pUri = STATIC_CAST(TPtrC16*, &uri);
-
+
M2G_DO_LOCK
-
+
if (aSvgProxyHandle)
- {
-
+ {
+
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
-
+
TRAP(err, aProxy->RequestCompletedL(
- aDocumentHandle,
- *pUri,
- lResData8,
- completed););
- }
+ aDocumentHandle,
+ *pUri,
+ lResData8,
+ completed););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
if (aResourceData)
- {
+ {
aJni->ReleaseByteArrayElements(aResourceData, resBytes, JNI_ABORT); // don't copy back
- }
+ }
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GDocument ) _requestCompleted: %d - end", completed);
@@ -393,16 +393,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _setViewportHeight - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->SetViewportHeightL(
- (TM2GSvgDocumentHandle)aDocumentHandle, aHeight););
- }
+ (TM2GSvgDocumentHandle)aDocumentHandle, aHeight););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _setViewportHeight - end");
@@ -428,16 +428,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _setViewportWidth - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->SetViewportWidthL(
- (TM2GSvgDocumentHandle)aDocumentHandle, aWidth););
- }
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->SetViewportWidthL(
+ (TM2GSvgDocumentHandle)aDocumentHandle, aWidth););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GDocument ) _setViewportWidth - end");
}
--- a/javauis/m2g_qt/src/jni/M2GManager.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GManager.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -60,20 +60,20 @@
jint aSvgProxyHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _createSvgEngine - begin");
-
+
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
TRAP(err,JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle)->CreateSvgEngineL(handle););
- }
+ }
M2G_DO_UNLOCK(aJni)
handle = M2GGeneral::CheckErrorCodeAndHandle(
- aJni, err, handle, M2G_INVALID_HANDLE);
-
+ aJni, err, handle, M2G_INVALID_HANDLE);
+
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GManager ) _createSvgEngine: %d - end", handle);
return handle;
}
@@ -84,7 +84,7 @@
* Creates an svg proxy.
* @since Series S60 3.0
* @param Svg proxy handle
-/**
+ *
* JNI method
*/
JNIEXPORT jint JNICALL
@@ -111,8 +111,7 @@
* Calls MM2GSVGProxy::DeleteSvgEnginedL method.
* @since Series S60 3.0
* @param aProxy Proxy instance.
-
-/**
+ *
* JNI method
*/
JNIEXPORT void JNICALL
@@ -120,22 +119,22 @@
JNIEnv* aJni,
jclass,
jint aSvgProxyHandle,
- jint aSvgEngineHandle )
+ jint aSvgEngineHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _deleteSvgEngine - begin");
-
+
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- TRAP(err,JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle)->DeleteSvgEngineL(
- STATIC_CAST(TM2GSvgEngineHandle, aSvgEngineHandle)););
- }
+ {
+ TRAP(err,JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle)->DeleteSvgEngineL(
+ STATIC_CAST(TM2GSvgEngineHandle, aSvgEngineHandle)););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
-
+
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _deleteSvgEngine: - end");
}
@@ -149,8 +148,7 @@
* crashes when deleting svg document object that contains external resource)
* @since Series S60 3.0
* @param aProxy Proxy instance.
-
-/**
+ *
* JNI method
*/
JNIEXPORT void JNICALL
@@ -161,88 +159,17 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _deleteSvgProxy - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* proxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,delete proxy;);
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _deleteSvgProxy: - end");
}
-// -----------------------------------------------------------------------------
-// Java_com_nokia_microedition_m2g_M2GManager::_finalizeEventSource
-// -----------------------------------------------------------------------------
-/**
- * JNI method TODO check this function for modifications
- */
-//JNIEXPORT void JNICALL
-//Java_com_nokia_microedition_m2g_M2GManager__1finalizeEventSource(
-// JNIEnv *aJni, jclass, jint aEventSourceHandle, jboolean aUiToolkit)
-//{
-// M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GManager ) _finalizeEventSource: %d", aEventSourceHandle);
-// if (aUiToolkit)
-// {
-//// MSwtClient* client = reinterpret_cast< MSwtClient* >(aEventSourceHandle);
-//// if (client)
-//// {
-//// delete client;
-//// client = NULL;
-//// }
-// }
-// else
-// {
-// CM2GEventSource* eventSource = JavaUnhand< CM2GEventSource >(aEventSourceHandle);
-// if (eventSource)
-// {
-// eventSource->Dispose(*aJni);
-// }
-// eventSource = NULL;
-// }
-//}
-// -----------------------------------------------------------------------------
-// Java_com_nokia_microedition_m2g_M2GManager::_initEventSource
-// -----------------------------------------------------------------------------
-/**
- * JNI method TODO check this function for modifications
-
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_m2g_M2GManager__1initEventSource(
- JNIEnv *aJni,
- jclass aPeer,
- jint aServer)
-{
- M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _initEventSource - begin");
-
- M2G_DO_LOCK
- TRAPD(eventSourceHandle, eventSourceHandle = CM2GEventSource::NewL(
- *aJni, aPeer, aServer));
- M2G_DO_UNLOCK(aJni)
-
- M2GGeneral::CheckHandle(aJni, eventSourceHandle);
- M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GManager ) _initEventSource - end: %d", eventSourceHandle);
- return eventSourceHandle;
-}*/
-////TODO check this function for modifications
-//JNIEXPORT jint JNICALL
-//Java_com_nokia_microedition_m2g_M2GManager__1initSwtEventSource(
-// JNIEnv *aJni,
-// jclass /*aPeer*/)
-//{
-// M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GManager ) _initEventSource - begin");
-//
-// MSwtClient* client = NULL;
-// TRAP_IGNORE(client = SWT::CreateClientL());
-// if (!client)
-// {
-// return KErrNotFound;
-// }
-// M2GGeneral::CheckHandle(aJni, (int)client);
-// M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GManager ) _initEventSource - end: %d", eventSourceHandle);
-// return (int)client;
-//}
M2G_NS_END
--- a/javauis/m2g_qt/src/jni/M2GSVGAnimationElement.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GSVGAnimationElement.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -65,43 +65,43 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _beginElementAt - begin");
TInt err = KM2GNotOk;
-
+
if (aSvgProxyHandle && aDocumentHandle)
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
+ TInt16 restartAttribute;
+
+ TRAP(err, aProxy->GetEnumTraitL(
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, KM2GRestartAttribute),
+ restartAttribute);
+ )
+
+ TInt isActive;
+ TRAP(err, aProxy->IsActiveL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), isActive);)
+
+ if (isActive && (restartAttribute == KM2GRestartWhenNotActive))
{
- MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TInt16 restartAttribute;
-
- TRAP(err, aProxy->GetEnumTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, KM2GRestartAttribute),
- restartAttribute);
- )
-
- TInt isActive;
- TRAP(err, aProxy->IsActiveL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), isActive); )
-
- if (isActive && (restartAttribute == KM2GRestartWhenNotActive))
- {
- M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - active & restart att:%d", restartAttribute);
- }
- else if ((aCurrentTime != 0) && (restartAttribute == KM2GRestartNever))
- {
- // Cannot restart even if animation hasn't ended?
- M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - not active & restart att:%d", restartAttribute);
- }
- else
- {
- M2G_DEBUG_2("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - offset:%f & current:%f", aOffset, aCurrentTime);
- TRAP(err, aProxy->BeginElementAtL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- (aOffset+aCurrentTime) );
- )
- }
+ M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - active & restart att:%d", restartAttribute);
+ }
+ else if ((aCurrentTime != 0) && (restartAttribute == KM2GRestartNever))
+ {
+ // Cannot restart even if animation hasn't ended?
+ M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - not active & restart att:%d", restartAttribute);
}
+ else
+ {
+ M2G_DEBUG_2("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - offset:%f & current:%f", aOffset, aCurrentTime);
+ TRAP(err, aProxy->BeginElementAtL(
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ (aOffset+aCurrentTime));
+ )
+ }
+ }
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _beginElementAt - end");
-
+
}
// -----------------------------------------------------------------------------
// Java_com_nokia_microedition_m2g_M2GSVGAnimationElement::_endElementAt
@@ -125,13 +125,13 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _endElementAt - begin");
TInt err = KM2GNotOk;
-
+
MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
-
+
TRAP(err, aProxy->EndElementAtL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- aOffset);
- )
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ aOffset);
+ )
M2GGeneral::CheckErrorCode(aJni, err);
@@ -159,12 +159,12 @@
TInt err = KM2GNotOk;
TInt active = 0;
MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
-
+
TRAP(err, aProxy->IsActiveL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- active);
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ active);
)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _isActive: %d - end", active);
return STATIC_CAST(jboolean, (active == 1 ? ETrue : EFalse));
--- a/javauis/m2g_qt/src/jni/M2GSVGElement.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GSVGElement.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -64,14 +64,14 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->AppendChildL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgElementHandle, aChildElementHandle)); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aChildElementHandle)););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _appendChild - end");
M2GGeneral::CheckErrorCode(aJni, err);
}
@@ -96,15 +96,15 @@
TInt removeable = -1;
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _checkRemoveable - begin");
TInt err = KM2GNotOk;
-
-
+
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
-
+
TRAP(err, aProxy->CheckRemoveableL(aElementHandle, removeable););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -138,19 +138,19 @@
TM2GRectData rect;
TInt result = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetBBoxL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- rect, result); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ rect, result););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
aJni->SetFloatArrayRegion(
@@ -187,17 +187,17 @@
TM2GColorData color;
TInt result = -1;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetColorTraitL(
- aElementHandle,
- aAttributeTypeId,
- color,
- result); );
- }
+ aElementHandle,
+ aAttributeTypeId,
+ color,
+ result););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -237,15 +237,15 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getElementTypeId - begin");
TInt16 id = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetElementTypeIdL(aElementHandle, id); );
- }
+ TRAP(err, aProxy->GetElementTypeIdL(aElementHandle, id););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getElementTypeId: %d - end", id);
return id;
@@ -273,19 +273,19 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getEnumTrait - begin");
TInt16 enumTrait = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetEnumTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- enumTrait); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ enumTrait););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getEnumTrait: %d - end", enumTrait);
return enumTrait;
@@ -314,10 +314,10 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetFirstElementChildL(aElementHandle, childHandle); );
- }
+ TRAP(err, aProxy->GetFirstElementChildL(aElementHandle, childHandle););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -346,17 +346,17 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getFloatTrait - begin");
TInt err = KM2GNotOk;
TReal32 floatTrait = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err ,aProxy->GetFloatTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- floatTrait););
- }
+ TRAP(err ,aProxy->GetFloatTraitL(
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ floatTrait););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -388,17 +388,17 @@
TM2GMatrixData matrix;
TInt result = -1;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetMatrixTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- matrix, result); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ matrix, result););
+ }
M2G_DO_UNLOCK(aJni)
if (M2GGeneral::CheckErrorCode(aJni, err) == KM2GOk)
@@ -439,15 +439,15 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getNextElementSibling - begin");
TInt siblingHandle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetNextElementSiblingL(aElementHandle, siblingHandle); );
- }
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->GetNextElementSiblingL(aElementHandle, siblingHandle););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getNextElementSibling: %d - end", siblingHandle);
return siblingHandle;
@@ -472,14 +472,14 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getParent - begin");
TInt parentHandle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
+
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetParentL(aElementHandle, parentHandle););
- }
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -508,19 +508,19 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getPathTrait - begin");
TInt aPathTrait = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetPathTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- aPathTrait); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ aPathTrait););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getPathTrait: %d - end", aPathTrait);
return aPathTrait;
@@ -551,19 +551,19 @@
TM2GRectData rect;
TInt result = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err , aProxy->GetRectTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- rect, result); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ rect, result););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
aJni->SetFloatArrayRegion(
REINTERPRET_CAST(jfloatArray, aRectComponents),
@@ -595,15 +595,15 @@
TInt err = KM2GNotOk;
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetRootElementL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- rootElementHandle); );
- }
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ rootElementHandle););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getRootElement: %d - end", rootElementHandle);
@@ -631,18 +631,18 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getScreenBBox - begin");
TM2GScreenBBoxData screenBBox;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetScreenBBoxL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- screenBBox); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ screenBBox););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
aJni->SetFloatArrayRegion(
@@ -676,19 +676,19 @@
TPtrC16 attribute;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetStringTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- attribute); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ attribute););
+ }
M2G_DO_UNLOCK(aJni)
-
+
if ((M2GGeneral::CheckErrorCode(aJni, err) == KM2GOk) &&
(attribute.Length() > 0))
{
@@ -718,18 +718,18 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _getUsedFromElement - begin");
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->GetUsedFromElementL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- handle); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ handle););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _getUsedFromElement: %d - end", handle);
return handle;
@@ -755,18 +755,18 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _insertBefore - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
+
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
-
+
TRAP(err, aProxy->InsertBeforeL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgElementHandle, aNewChildElementHandle),
- STATIC_CAST(TM2GSvgElementHandle, aReferenceElementHandle)); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aNewChildElementHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aReferenceElementHandle)););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -787,21 +787,21 @@
JNIEnv* aJni,
jclass,
jint aSvgProxyHandle,
- jint aElementHandle )
+ jint aElementHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _isUsed - begin");
TInt result = KM2GNotOk;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->IsUsedL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), result); );
- }
+ TRAP(err, aProxy->IsUsedL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), result););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _isUsed: %d - end", result);
return result;
@@ -832,15 +832,15 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err ,aProxy->RemoveChildL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgElementHandle, aChildElementHandle), handle); );
- }
+ TRAP(err ,aProxy->RemoveChildL(
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aChildElementHandle), handle););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _removeChild: %d - end", handle);
@@ -876,16 +876,16 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->SetColorTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- color); );
- }
+ TRAP(err, aProxy->SetColorTraitL(
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ color););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _setColorTrait: %d - end", err);
}
@@ -899,7 +899,7 @@
* @param aProxy Proxy instance.
* @param aElementHandle Element pointer.
* @param aAttributeTypeId -
- * @param aValue
+ * @param aValue
*/
JNIEXPORT void JNICALL
Java_com_nokia_microedition_m2g_M2GSVGElement__1setEnumTrait(
@@ -912,17 +912,17 @@
{
M2G_DEBUG_2("M2G_DEBUG: JNI ( M2GSVGElement ) _setEnumTrait: type=%d, value=%d - begin", aAttributeTypeId, aValue);
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
-
+
TRAP(err, aProxy->SetEnumTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- aValue); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ aValue););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -950,17 +950,17 @@
{
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGElement ) _setFloatTrait: %f - begin", aValue);
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->SetFloatTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- aValue); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ aValue););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -999,19 +999,19 @@
}
// Release data source
aJni->ReleaseFloatArrayElements(aMatrixComponents, components, JNI_ABORT);
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->SetMatrixTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- matrix); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ matrix););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_6("JNI ( M2GSVGElement ) _setMatrixTrait: %f, %f, %f, %f, %f, %f - end", matrix[ 0 ], matrix[ 1 ], matrix[ 2 ], matrix[ 3 ], matrix[ 4 ], matrix[ 5 ]);
}
@@ -1037,17 +1037,17 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _setPathTrait - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->SetPathTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- STATIC_CAST(TM2GSvgPathHandle, aPathHandle)); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ STATIC_CAST(TM2GSvgPathHandle, aPathHandle)););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -1083,14 +1083,14 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
-
+
TRAP(err, aProxy->SetRectTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- rect); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ rect););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -1117,23 +1117,23 @@
jstring aValue)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _setStringTrait - begin");
- //RJString str(*aJni, aValue);
+
JStringUtils str(*aJni, aValue);
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TPtrC16 lValue=STATIC_CAST(TPtrC16, str);
-
+
TRAP(err, aProxy->SetStringTraitL(
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
- STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
- lValue); );
- }
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle),
+ STATIC_CAST(TM2GSvgAttrType, aAttributeTypeId),
+ lValue););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGElement ) _setStringTrait - end");
}
--- a/javauis/m2g_qt/src/jni/M2GSVGImage.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GSVGImage.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -64,15 +64,15 @@
TInt elementHandle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->DispatchMouseEventL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- aX, aY, elementHandle); );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->DispatchMouseEventL(
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ aX, aY, elementHandle););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -100,17 +100,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGImage ) _focusOn - begin");
- // TInt elementHandle = M2G_INVALID_HANDLE;
- TInt err = KM2GNotOk;
-
- if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->FocusOnL(
+ TInt err = KM2GNotOk;
+
+ if (aSvgProxyHandle)
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->FocusOnL(
STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle)); );
- }
-
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle)););
+ }
+
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGImage ) _focusOn: %d - end", err);
}
@@ -134,15 +133,15 @@
jint aDocumentHandle, jint aElementHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGImage ) _focusOut - begin");
- TInt err = KM2GNotOk;
-
+ TInt err = KM2GNotOk;
+
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err,aProxy->FocusOutL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- STATIC_CAST(TM2GSvgElementHandle, aElementHandle)); );
- }
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ STATIC_CAST(TM2GSvgElementHandle, aElementHandle)););
+ }
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGImage ) _focusOut: %d - end", err);
@@ -173,16 +172,16 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGImage ) _getExternalListItem - begin");
TPtrC16 lItem;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetExternalListItemL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- aIndex,
- lItem); );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->GetExternalListItemL(
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ aIndex,
+ lItem););
+ }
M2G_DO_UNLOCK(aJni)
if ((M2GGeneral::CheckErrorCode(aJni, err) == KM2GOk) && (lItem.Length() > 0))
@@ -211,17 +210,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGImage ) _getExternalListSize - begin");
- // TInt elementHandle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
TInt listSz = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetExternalListSizeL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), listSz); );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->GetExternalListSizeL(
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), listSz););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -251,18 +249,18 @@
jint aDocumentHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGImage ) _initViewport - begin");
- // TInt elementHandle = M2G_INVALID_HANDLE;
- TInt err = KM2GNotOk;
-
- if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->InitViewportL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle)); );
- }
- M2GGeneral::CheckErrorCode(aJni, err);
-
- M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGImage ) _initViewport: %d - end", err);
+
+ TInt err = KM2GNotOk;
+
+ if (aSvgProxyHandle)
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
+ TRAP(err, aProxy->InitViewportL(
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle)););
+ }
+ M2GGeneral::CheckErrorCode(aJni, err);
+
+ M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGImage ) _initViewport: %d - end", err);
}
--- a/javauis/m2g_qt/src/jni/M2GSVGPath.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GSVGPath.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -62,10 +62,10 @@
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->AddCloseL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle)); );
- }
+ TRAP(err, aProxy->AddCloseL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle)););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -89,29 +89,29 @@
jclass,
jint aSvgProxyHandle,
jint aPathHandle,
- jfloat aX1, jfloat aY1, jfloat aX2, jfloat aY2, jfloat aX3, jfloat aY3 )
+ jfloat aX1, jfloat aY1, jfloat aX2, jfloat aY2, jfloat aX3, jfloat aY3)
{
M2G_DEBUG_6("M2G_DEBUG: JNI ( M2GSVGPath ) _addCurveTo: X1=%f, Y1=%f, X2=%f, Y2=%f, X3=%f, Y3=%f - begin", aX1, aY1, aX2, aY2, aX3, aY3);
TInt err = KM2GNotOk;
TM2GPathCurveData curve;
- curve[ 0 ] = STATIC_CAST(TReal32, aX1);
- curve[ 1 ] = STATIC_CAST(TReal32, aY1);
- curve[ 2 ] = STATIC_CAST(TReal32, aX2);
- curve[ 3 ] = STATIC_CAST(TReal32, aY2);
- curve[ 4 ] = STATIC_CAST(TReal32, aX3);
- curve[ 5 ] = STATIC_CAST(TReal32, aY3);
+ curve[ 0 ] = STATIC_CAST(TReal32, aX1);
+ curve[ 1 ] = STATIC_CAST(TReal32, aY1);
+ curve[ 2 ] = STATIC_CAST(TReal32, aX2);
+ curve[ 3 ] = STATIC_CAST(TReal32, aY2);
+ curve[ 4 ] = STATIC_CAST(TReal32, aX3);
+ curve[ 5 ] = STATIC_CAST(TReal32, aY3);
- M2G_DO_LOCK
- if (aSvgProxyHandle)
- {
- MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->AddCurveToL(
+ M2G_DO_LOCK
+ if (aSvgProxyHandle)
+ {
+ MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
+ TRAP(err, aProxy->AddCurveToL(
STATIC_CAST(TM2GSvgPathHandle, aPathHandle),
- curve); );
- }
+ curve););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGPath ) _addCurveTo - end");
}
@@ -125,7 +125,7 @@
* @param aProxy Proxy instance.
* @param aPathHandle Svg path handle
* @param aX -
- * @param aY -
+ * @param aY -
*/
JNIEXPORT void JNICALL
Java_com_nokia_microedition_m2g_M2GSVGPath__1addLineTo(
@@ -133,20 +133,20 @@
jclass,
jint aSvgProxyHandle,
jint aPathHandle,
- jfloat aX, jfloat aY )
+ jfloat aX, jfloat aY)
{
M2G_DEBUG_2("M2G_DEBUG: JNI ( M2GSVGPath ) _addLineTo: X=%f, Y=%f - begin", aX, aY);
TInt err = KM2GNotOk;
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->AddLineToL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle), *(REINTERPRET_CAST(TReal32*, &aX)), *(REINTERPRET_CAST(TReal32*, &aY))); );
-
- }
+ TRAP(err, aProxy->AddLineToL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle), *(REINTERPRET_CAST(TReal32*, &aX)), *(REINTERPRET_CAST(TReal32*, &aY))););
+
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGPath ) _addLineTo - end");
@@ -173,13 +173,13 @@
{
M2G_DEBUG_2("M2G_DEBUG: JNI ( M2GSVGPath ) _addMoveTo: X=%f, Y=%f - begin", aX, aY);
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->AddMoveToL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aX, aY) );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
+ TRAP(err, aProxy->AddMoveToL(STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aX, aY));
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -208,18 +208,18 @@
jfloat aX1, jfloat aY1, jfloat aX2, jfloat aY2)
{
M2G_DEBUG_4("M2G_DEBUG: JNI ( M2GSVGPath ) _addQuadTo: X1=%f, Y1=%f, X2=%f, Y2=%f - begin", aX1, aY1, aX2, aY2);
- // TInt elementHandle = M2G_INVALID_HANDLE;
+
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->AddQuadToL(
- STATIC_CAST(TM2GSvgPathHandle, aPathHandle),aX1, aY1, aX2, aY2); );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
+ TRAP(err, aProxy->AddQuadToL(
+ STATIC_CAST(TM2GSvgPathHandle, aPathHandle),aX1, aY1, aX2, aY2););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGPath ) _addQuadTo - end");
}
@@ -243,13 +243,13 @@
TInt err = KM2GNotOk;
TInt pathHandle = M2G_INVALID_HANDLE;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
- MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
- TRAP(err, aProxy->CreatePathL(pathHandle); );
- }
+ {
+ MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
+ TRAP(err, aProxy->CreatePathL(pathHandle););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -275,14 +275,14 @@
{
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGPath ) _destroyPath: %d - begin", aPathHandle);
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
TRAP(err, aProxy->DestroyPathL(
- STATIC_CAST(TM2GSvgPathHandle, STATIC_CAST(TM2GSvgPathHandle, aPathHandle))); );
- }
+ STATIC_CAST(TM2GSvgPathHandle, STATIC_CAST(TM2GSvgPathHandle, aPathHandle))););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -309,17 +309,17 @@
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGPath ) _getNumberOfSegments - begin");
TInt err = KM2GNotOk;
TInt numberOfSegments = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
TRAP(err, aProxy->GetNumberOfSegmentsL(
- STATIC_CAST(TM2GSvgPathHandle, aPathHandle),
- numberOfSegments); );
- }
+ STATIC_CAST(TM2GSvgPathHandle, aPathHandle),
+ numberOfSegments););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGPath ) _getNumberOfSegments: %d - end", numberOfSegments);
return STATIC_CAST(jint, numberOfSegments);
@@ -347,14 +347,14 @@
M2G_DEBUG_2("M2G_DEBUG: JNI ( M2GSVGPath ) _getSegmentParameter: seg index=%d, param index=%d - begin", aSegmentIndex, aParamIndex);
TInt err = KM2GNotOk;
TReal32 segmentParam = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
TRAP(err, aProxy->GetSegmentParameterL(
- STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aSegmentIndex,aParamIndex, segmentParam); );
- }
+ STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aSegmentIndex,aParamIndex, segmentParam););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
@@ -386,14 +386,14 @@
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGPath ) _getSegmentType: index=%d - begin", aIndex);
TInt err = KM2GNotOk;
TInt16 aSegmentType = 0;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy * aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle);
TRAP(err, aProxy->GetSegmentTypeL(
- STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aIndex,aSegmentType); );
- }
+ STATIC_CAST(TM2GSvgPathHandle, aPathHandle), aIndex,aSegmentType););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
--- a/javauis/m2g_qt/src/jni/M2GSVGSVGElement.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GSVGSVGElement.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -61,17 +61,17 @@
M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _getMediaTime - begin");
TReal32 seconds = 0;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
- TRAP(err, aProxy->GetMediaTimeL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),seconds); );
- }
+ TRAP(err, aProxy->GetMediaTimeL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),seconds););
+ }
M2G_DO_UNLOCK(aJni)
M2GGeneral::CheckErrorCode(aJni, err);
-
+
M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _getMediaTime: %f - end", seconds);
return STATIC_CAST(jfloat, seconds);
}
@@ -98,19 +98,19 @@
{
M2G_DEBUG_0("JNI ( M2GSVGSVGElement ) _setMediaTime - begin");
TInt err = KM2GNotOk;
-
+
TReal32* lseconds = REINTERPRET_CAST(TReal32*, &aSeconds);
-
+
M2G_DO_LOCK
if (aSvgProxyHandle)
- {
+ {
MM2GSVGProxy* aProxy = JavaUnhand<MM2GSVGProxy>(aSvgProxyHandle);
TRAP(err, aProxy->SetMediaTimeL(
- STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
- *lseconds); );
- }
+ STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle),
+ *lseconds););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("JNI ( M2GSVGSVGElement ) _setMediaTime: %f - end", aSeconds);
--- a/javauis/m2g_qt/src/jni/M2GScalableGraphics.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m2g_qt/src/jni/M2GScalableGraphics.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-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"
@@ -53,53 +53,33 @@
* @param aRenderContextHandle Render context handle.
* @param aTargetHandle Target graphics handle
* @throws exception if not ok
-
-LOCAL_C void DoBindL(TInt aRenderContextHandle, TInt aTargetHandle, TBool aUiToolkit)
-{
- MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
- rc->BindL(aTargetHandle, aUiToolkit);
-}
-*/
-/**
- * JNI method
-
-JNIEXPORT jint JNICALL
-Java_com_nokia_microedition_m2g_M2GScalableGraphics__1bind(
- JNIEnv* aJni,
- jobject,
- jint aEventSourceHandle,
- jint aRenderContextHandle,
- jint aTargetHandle,
- jboolean aUiToolkit)
*/
-
-
JNIEXPORT jint JNICALL
Java_com_nokia_microedition_m2g_M2GScalableGraphics__1bind(
JNIEnv* aJni,
jobject,
jint aRenderContextHandle,
- jint aTargetHandle )
+ jint aTargetHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _bind - begin");
-
+
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
+
if (aRenderContextHandle)
- {
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
TRAP(err,rc->BindL(aTargetHandle););
- }
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GScalableGraphics ) _bind: %d - end", err);
- return err;
+ return err;
}
@@ -115,32 +95,28 @@
* @throws exception if not ok
*/
-
-
JNIEXPORT jint JNICALL
Java_com_nokia_microedition_m2g_M2GScalableGraphics__1createRenderContext(
JNIEnv* aJni,
jobject,
- jint aSvgProxyHandle )
+ jint aSvgProxyHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _createRenderContext - begin");
TInt handle = M2G_INVALID_HANDLE;
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
+
if (aSvgProxyHandle)
- {
- TRAP(err, MM2GRenderContext* rchandle = CM2GRenderContext::NewL(JavaUnhand<MM2GSVGProxy> (aSvgProxyHandle)); handle = JavaMakeHandle(rchandle); );
- }
+ {
+ TRAP(err, MM2GRenderContext* rchandle = CM2GRenderContext::NewL(JavaUnhand<MM2GSVGProxy> (aSvgProxyHandle)); handle = JavaMakeHandle(rchandle););
+ }
M2G_DO_UNLOCK(aJni)
-
+
handle = M2GGeneral::CheckErrorCodeAndHandle(aJni, err, handle, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GScalableGraphics ) _createRenderContext: %d - end", handle);
-
-
return handle;
}
@@ -159,16 +135,16 @@
jint aRenderContextHandle)
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _deleteRenderContext - begin");
-
+
M2G_DO_LOCK
-
+
if (aRenderContextHandle)
- {
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
delete rc;
- }
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _deleteRenderContext - end");
}
@@ -182,37 +158,30 @@
* @return KM2GOk if ok
*/
-
-/**
- * JNI method
- */
JNIEXPORT jint JNICALL
Java_com_nokia_microedition_m2g_M2GScalableGraphics__1release(
JNIEnv* aJni,
jobject,
- jint aSurfaceHandle,
+ jint /*aSurfaceHandle*/,
jint aRenderContextHandle)
{
-
+
// Release used target surface
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _release - begin");
TInt err = KM2GNotOk;
M2G_DO_LOCK
-
+
if (aRenderContextHandle)
- {
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
TRAP(err,rc->ReleaseL(););
-
- }
- M2G_DO_UNLOCK(aJni)//TODO Check for M2G_DO_LOCK M2G_DO_UNLOCK
-//TODO just check it pankaj 8/9/2010
-// Java::GFX::WindowSurface* surf = reinterpret_cast<Java::GFX::WindowSurface*>(aSurfaceHandle);
-// surf->release(); //TODO check This windows surface call detected from Graphics3d.inl
+ }
+ M2G_DO_UNLOCK(aJni)
+
M2GGeneral::CheckErrorCode(aJni, err);
-
- return err;
-
+
+ return err;
+
}
// -----------------------------------------------------------------------------
// Java_com_nokia_microedition_m2g_M2GScalableGraphics::_render
@@ -228,10 +197,6 @@
* @throws Exception if not ok
*/
-
-/**
- * JNI method
- */
JNIEXPORT jint JNICALL
Java_com_nokia_microedition_m2g_M2GScalableGraphics__1renderLCDUI(
JNIEnv* aJni,
@@ -249,15 +214,15 @@
TInt err = KM2GNotOk;
M2G_DO_LOCK
-
+
if (aRenderContextHandle && aDocumentHandle)
- {
- MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
- TRAP(err,rc->RenderLCDUIL(aDocumentHandle, aCurrentTime, aSvgW, aSvgH, rr););
- }
+ {
+ MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
+ TRAP(err,rc->RenderLCDUIL(aDocumentHandle, aCurrentTime, aSvgW, aSvgH, rr););
+ }
M2G_DO_UNLOCK(aJni)
-
- M2GGeneral::CheckErrorCode(aJni, err);
+
+ M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GScalableGraphics ) _render: %d - end", err);
return err;
}
@@ -280,23 +245,23 @@
TM2GRenderRect rr(aX, aY, aClipX, aClipY, aClipW, aClipH);
TInt err = KM2GNotOk;
jintArray returnDataJava = aJni->NewIntArray(10);
-
+
M2G_DO_LOCK
-
+
TInt returnData[10];
-
+
if (aRenderContextHandle && aDocumentHandle)
- {
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
- TRAP(err,rc->RenderESWTL(aDocumentHandle,aCurrentTime,aSvgW,aSvgH,rr,aUseNativeClear,returnData););
- }
+ TRAP(err,rc->RenderESWTL(aDocumentHandle,aCurrentTime,aSvgW,aSvgH,rr,aUseNativeClear,returnData););
+ }
M2G_DO_UNLOCK(aJni)
-
+
if (returnDataJava != NULL)
aJni->SetIntArrayRegion(returnDataJava, 0, 10, const_cast<TInt*>(returnData));
-
- M2GGeneral::CheckErrorCode(aJni, err);
+
+ M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GScalableGraphics ) _render: %d - end", err);
return returnDataJava;
}
@@ -318,16 +283,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _setRenderingQuality - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
- if ( aRenderContextHandle)
- {
+
+ if (aRenderContextHandle)
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
TRAP(err,rc->SetRenderingQualityL(aMode););
- }
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _setRenderingQuality - end");
@@ -351,16 +316,16 @@
{
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _setTransparency - begin");
TInt err = KM2GNotOk;
-
+
M2G_DO_LOCK
-
+
if (aRenderContextHandle)
- {
+ {
MM2GRenderContext* rc = JavaUnhand<MM2GRenderContext>(aRenderContextHandle);
- TRAP(err,rc->SetTransparency( (TReal32)aAlpha ););
- }
+ TRAP(err,rc->SetTransparency((TReal32)aAlpha););
+ }
M2G_DO_UNLOCK(aJni)
-
+
M2GGeneral::CheckErrorCode(aJni, err);
M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GScalableGraphics ) _setTransparency - end");
--- a/javauis/m3g_qt/inc/m3g_jsr184.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m3g_qt/inc/m3g_jsr184.h Fri Oct 29 11:49:32 2010 +0300
@@ -27,7 +27,7 @@
# error includes Java dependencies; do not include into the core module.
#endif
-#include <m3g/m3g_core.h>
+#include <M3G/m3g_core.h>
#if defined(__cplusplus)
extern "C"
--- a/javauis/m3g_qt/src/jni/image2d.inl Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/m3g_qt/src/jni/image2d.inl Fri Oct 29 11:49:32 2010 +0300
@@ -65,20 +65,11 @@
if (aImageHandle != 0)
{
Java::GFX::Image* cgfxImage = reinterpret_cast<Java::GFX::Image*>(aImageHandle);
- QImage qtImage;
-
- if (!cgfxImage)
+ QImage qtImage = cgfxImage->toImage();
+ if (qtImage.isNull())
{
return 0;
}
- else
- {
- qtImage = cgfxImage->toImage();
- if (qtImage.isNull())
- {
- return 0;
- }
- }
// m3g needs format in 32bpp, i.e. in RGB32 or ARGB32 so
// if format is not one of those convert it here
@@ -102,6 +93,7 @@
image = m3gCreateImage((M3GInterface)aHM3g, (M3GImageFormat)aFormat, width, height, 0);
if (image == NULL)
{
+ M3G_DO_UNLOCK(aEnv)
return 0; // exception automatically raised
}
@@ -109,6 +101,7 @@
if (tempPixels == NULL)
{
m3gDeleteObject((M3GObject) image);
+ M3G_DO_UNLOCK(aEnv)
return 0;
}
@@ -186,6 +179,7 @@
if (image == NULL)
{
M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
+ M3G_DO_UNLOCK(aEnv)
return 0;
}
@@ -199,6 +193,7 @@
aEnv->ReleaseByteArrayElements(aImage, image, JNI_ABORT);
}
M3G_RAISE_EXCEPTION(aEnv, "java/lang/OutOfMemoryError");
+ M3G_DO_UNLOCK(aEnv)
return 0;
}
--- a/javauis/nokiauiapi_qt/inc/CSoftNotification.h Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/inc/CSoftNotification.h Fri Oct 29 11:49:32 2010 +0300
@@ -14,7 +14,7 @@
#include <e32base.h>
#include <jni.h>
-#include <HbIndicatorsymbian.h>
+#include <hbindicatorsymbian.h>
#include <HbDeviceNotificationDialogsymbian.h>
NONSHARABLE_CLASS(CSoftNotification) : public CBase,
--- a/javauis/nokiauiapi_qt/javasrc/com/nokia/mid/ui/DeviceControl.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/javasrc/com/nokia/mid/ui/DeviceControl.java Fri Oct 29 11:49:32 2010 +0300
@@ -207,11 +207,9 @@
{
public void run()
{
- System.out.println("Java Nokia UI API flashLights duration = "+duration);
OS.MobileDevice_flashLights(
Internal_PackageSupport.initializeMobileDevice(
Internal_PackageSupport.getDisplayInstance()),duration);
- System.out.println("Java Nokia UI API End flashLights ");
}
});
}
@@ -291,11 +289,9 @@
{
public void run()
{
- System.out.println("Java Nokia UI API start vibra with duration = "+vibraDuration);
vibraSupported = OS.MobileDevice_vibration(
Internal_PackageSupport.initializeMobileDevice(
Internal_PackageSupport.getDisplayInstance()),vibraDuration);
- System.out.println("Java Nokia UI API End vibra ");
}
});
}
--- a/javauis/nokiauiapi_qt/javasrc_j2me/com/nokia/mid/ui/TactileFeedback.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/javasrc_j2me/com/nokia/mid/ui/TactileFeedback.java Fri Oct 29 11:49:32 2010 +0300
@@ -100,13 +100,13 @@
*/
public static final int FEEDBACK_STYLE_SENSITIVE = 2;
- private final String invalidFeedbackStyleMsg = "Invalid feedback style specified";
- private final String invalidControlTypeMsg = "Invalid object provided for tactile feedback registration";
+ private static final String MSG_INVALID_FEEDBACK_STYLE = "Invalid feedback style specified";
+ private static final String MSG_INVALID_OBJECT_TYPE = "Invalid object provided for tactile feedback registration";
private static final int TYPE_INVALID = 0;
private static final int TYPE_ESWT = 1;
private static final int TYPE_LCDUI = 2;
- private static boolean feedbackEnabled;
+ private volatile boolean feedbackEnabled;
/**
* Constructs tactile feedback engine object. The object may be used in both
@@ -131,7 +131,7 @@
{
if ((style != FEEDBACK_STYLE_BASIC)
&& (style != FEEDBACK_STYLE_SENSITIVE))
- throw new IllegalArgumentException(invalidFeedbackStyleMsg);
+ throw new IllegalArgumentException(MSG_INVALID_FEEDBACK_STYLE);
if (org.eclipse.swt.widgets.Display.getCurrent() == null)
{
final int fStyle = style;
@@ -241,11 +241,11 @@
{
int type = controlType(uiObject);
if (type == TYPE_INVALID)
- throw new IllegalArgumentException(invalidControlTypeMsg);
+ throw new IllegalArgumentException(MSG_INVALID_OBJECT_TYPE);
if ((style != FEEDBACK_STYLE_BASIC)
&& (style != FEEDBACK_STYLE_SENSITIVE))
- throw new IllegalArgumentException(invalidFeedbackStyleMsg);
+ throw new IllegalArgumentException(MSG_INVALID_FEEDBACK_STYLE);
int controlHandle = getControlHandle(uiObject);
if (type == TYPE_LCDUI)
@@ -299,7 +299,7 @@
int type = controlType(uiObject);
if (type == TYPE_INVALID)
- throw new IllegalArgumentException(invalidControlTypeMsg);
+ throw new IllegalArgumentException(MSG_INVALID_OBJECT_TYPE);
int controlHandle = getControlHandle(uiObject);
if (type == TYPE_LCDUI)
@@ -343,7 +343,7 @@
int type = controlType(uiObject);
if (type == TYPE_INVALID)
- throw new IllegalArgumentException(invalidControlTypeMsg);
+ throw new IllegalArgumentException(MSG_INVALID_OBJECT_TYPE);
int controlHandle = getControlHandle(uiObject);
@@ -395,7 +395,7 @@
int type = controlType(uiObject);
if (type == TYPE_INVALID)
- throw new IllegalArgumentException(invalidControlTypeMsg);
+ throw new IllegalArgumentException(MSG_INVALID_OBJECT_TYPE);
int controlHandle = getControlHandle(uiObject);
if (type == TYPE_LCDUI)
--- a/javauis/nokiauiapi_qt/softindicatorplugin/src/javasoftindicator.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/softindicatorplugin/src/javasoftindicator.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -226,7 +226,7 @@
}
catch (JavaStorageException& ex)
{
- LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString());
+ LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %S", ex.toString().c_str());
}
}
--- a/javauis/nokiauiapi_qt/softnoteplugin/src/javasoftnotehandler.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/softnoteplugin/src/javasoftnotehandler.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -12,7 +12,7 @@
#include <memory>
#include <badesca.h>
#include <hbsymbianvariant.h>
-#include <HbIndicatorsymbian.h>
+#include <hbindicatorsymbian.h>
#include <javastorageentry.h>
#include <javastorage.h>
@@ -110,10 +110,10 @@
// ----------------------------------------------------------------------------
// javasoftnotehandler::amAdded
// ----------------------------------------------------------------------------
-void javasoftnotehandler::amAdded(const uids_t& aUids)
+void javasoftnotehandler::amAdded(const uids_t& /*aUids*/)
{
JELOG2(EJavaCaptain);
- LOG1(EJavaCaptain, EInfo, "javasoftnotehandler::amAdded, %d uids", aUids.size());
+ LOG(EJavaCaptain, EInfo, "javasoftnotehandler::amAdded");
}
// ----------------------------------------------------------------------------
@@ -236,7 +236,7 @@
}
catch(JavaStorageException& ex)
{
- LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString());
+ LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %S", ex.toString().c_str());
}
}
@@ -294,7 +294,7 @@
}
catch(JavaStorageException& ex)
{
- LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString());
+ LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString().c_str());
}
}
--- a/javauis/nokiauiapi_qt/src/CGlobalIndicators.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/src/CGlobalIndicators.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -39,10 +39,10 @@
const TInt KPropertyGlobalIndicatorUninitialized = 0;
//com_nokia_mid_ui_GlobalIndicators_INDICATOR_UNINITIALIZED;
-const TInt KPropertyGlobalIndicatorHide = 0;
+//const TInt KPropertyGlobalIndicatorHide = 0;
//com_nokia_mid_ui_GlobalIndicators_INDICATOR_HIDE;
-const TInt KPropertyGlobalIndicatorShow = 0;
+//const TInt KPropertyGlobalIndicatorShow = 0;
//com_nokia_mid_ui_GlobalIndicators_INDICATOR_SHOW;
}
@@ -57,10 +57,10 @@
// Sets the value for given global indicator.
// -----------------------------------------------------------------------------
//
-TInt CGlobalIndicators::SetGlobalIndicator(TInt aIndicator, TInt aValue)
+TInt CGlobalIndicators::SetGlobalIndicator(TInt /*aIndicator*/, TInt /*aValue*/)
{
- LOG2(EJavaGlobalInd, EInfo,
+ /* LOG2(EJavaGlobalInd, EInfo,
"GlobalIndicators::SetGlobalIndicator indicator:%d, value:%d",
aIndicator, aValue);
@@ -76,9 +76,9 @@
{
//convertedIndicator = KCoreAppUIsUipInd;
}
-
+*/
TInt readValue = KPropertyGlobalIndicatorUninitialized;
- RProperty property;
+ //RProperty property;
/* TInt ret = property.Attach(KPSUidCoreApplicationUIs, convertedIndicator);
if (KErrNone == ret)
--- a/javauis/nokiauiapi_qt/src/CSoftNotification.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/src/CSoftNotification.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -112,7 +112,7 @@
}
catch (JavaStorageException& ex)
{
- LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString());
+ LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %S", ex.toString().c_str());
}
if(!iIsNoteExist && iNotificationId == 0)
@@ -469,6 +469,6 @@
}
catch (JavaStorageException& ex)
{
- LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %s", ex.toString());
+ LOG1(EJavaStorage, EInfo," JavaSoftNote Exception %S", ex.toString().c_str());
}
}
--- a/javauis/nokiauiapi_qt/src/os.cpp Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/nokiauiapi_qt/src/os.cpp Fri Oct 29 11:49:32 2010 +0300
@@ -14,7 +14,7 @@
#include <touchfeedback.h>
#include <com_nokia_mj_impl_nokiauiapi_OS.h>
#include "autorelease.h"
-#include "csoftnotification.h"
+#include "CSoftNotification.h"
static CCoeControl* convertToSymbian(QWidget* window)
{
@@ -172,29 +172,31 @@
Java_com_nokia_mj_impl_nokiauiapi_OS_setText(JNIEnv* aJniEnv, jclass /*aPeer*/,
jint aSoftNotificationHandle, jstring aPrimaryText, jstring aSecondaryText)
{
+ if (aPrimaryText == NULL || aSecondaryText == NULL)
+ {
+ // These arguments are checked already on Java side, no need to try
+ // to recover from NULL strings.
+ return KErrArgument;
+ }
+
CSoftNotification* softNotification =
reinterpret_cast<CSoftNotification*> (aSoftNotificationHandle);
// Convert from java string to Symbian descriptor
HBufC* bufferPrimaryText = NULL;
- if (aPrimaryText != NULL)
+ bufferPrimaryText = JavaStringToSymbianString(aJniEnv, aPrimaryText);
+ if (bufferPrimaryText == NULL)
{
- bufferPrimaryText = JavaStringToSymbianString(aJniEnv, aPrimaryText);
- if (bufferPrimaryText == NULL)
- {
- return KErrNoMemory;
- }
+ return KErrNoMemory;
}
HBufC* bufferSecondaryText = NULL;
- if (aSecondaryText != NULL)
+ bufferSecondaryText = JavaStringToSymbianString(aJniEnv,
+ aSecondaryText);
+ if (bufferSecondaryText == NULL)
{
- bufferSecondaryText = JavaStringToSymbianString(aJniEnv,
- aSecondaryText);
- if (bufferSecondaryText == NULL)
- {
- return KErrNoMemory;
- }
+ return KErrNoMemory;
}
+
TRAPD(err,softNotification->SetTextL(*bufferPrimaryText, *bufferSecondaryText));
return err;
}
@@ -232,18 +234,21 @@
Java_com_nokia_mj_impl_nokiauiapi_OS_setImagePath(JNIEnv* aJniEnv,
jclass /*aPeer*/, jint aSoftNotificationHandle, jstring aImagePath )
{
+ if (aImagePath == NULL)
+ {
+ return KErrArgument;
+ }
+
CSoftNotification* softNotification =
reinterpret_cast<CSoftNotification*> (aSoftNotificationHandle);
// Convert from java string to Symbian descriptor
HBufC* bufferImagePath = NULL;
- if (aImagePath != NULL)
+ bufferImagePath = JavaStringToSymbianString(aJniEnv, aImagePath);
+ if (bufferImagePath == NULL)
{
- bufferImagePath = JavaStringToSymbianString(aJniEnv, aImagePath);
- if (bufferImagePath == NULL)
- {
- return KErrNoMemory;
- }
+ return KErrNoMemory;
}
+
TRAPD(err,softNotification->SetImagePathL(*bufferImagePath));
return err;
}
Binary file javauis/tsrc/fute/doc/LCDUI_Functional_Test_Cases.xls has changed
Binary file javauis/tsrc/fute/doc/eSWT_Functional_Test_Cases.xls has changed
--- a/javauis/tsrc/fute/lcdui/Midp_StringItem_01/build.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/build.xml Fri Oct 29 11:49:32 2010 +0300
@@ -25,13 +25,47 @@
<property name="midlet1.name" value="Midp_StringItem_01"/>
<property name="midlet1.icon.name" value=""/>
<property name="midlet1.package.name" value="Midp_StringItem_01"/>
+ <property name="midlet2.name" value="StringItemTests1"/>
+ <property name="midlet2.icon.name" value=""/>
+ <property name="midlet2.package.name" value="StringItemTests1"/>
+ <property name="midlet3.name" value="StringItemTests2"/>
+ <property name="midlet3.icon.name" value=""/>
+ <property name="midlet3.package.name" value="StringItemTests2"/>
<property name="midlet.permissions" value=""/>
<property name="package.name" value="Midp_StringItem_01"/>
<property name="company.name" value="Nokia"/>
- <property name="midlet.version" value="1.2"/>
+ <property name="midlet.version" value="1.3"/>
<property name="midlet.description" value=""/>
- <!-- Get settings for a basic MIDlet. -->
- <import file="../../properties-basic-midlet.xml"/>
+ <!-- Package Preverifed classes, resources and MANIFEST file -->
+ <target name="pack" depends="preverify">
+ <wtkjad jadfile="${bin}/${package.name}.jad"
+ jarfile="${bin}/${package.name}.jar"
+ update="true"
+ config="1.1"
+ profile="2.1"
+ manifest="${bin}/MANIFEST.MF"
+ name="${package.name}"
+ vendor="${company.name}">
+ <attribute name="MIDlet-Permissions" value="${midlet.permissions}"/>
+ <attribute name="MicroEdition-Profile" value="MIDP-2.1"/>
+ <attribute name="MicroEdition-Configuration" value="CLDC-1.1"/>
+ <attribute name="MIDlet-Version" value="${midlet.version}"/>
+ <attribute name="MIDlet-Description" value="${midlet.description}"/>
+ <midlet name="${midlet1.name}" icon="${midlet1.icon.name}" class="${midlet1.package.name}" />
+ <midlet name="${midlet2.name}" icon="${midlet2.icon.name}" class="${midlet2.package.name}" />
+ <midlet name="${midlet3.name}" icon="${midlet3.icon.name}" class="${midlet3.package.name}" />
+ </wtkjad>
+
+ <wtkpackage
+ jarfile="${bin}/${package.name}.jar"
+ jadfile="${bin}/${package.name}.jad"
+ classpath="${project.class.path}"
+ basedir="${prever}"
+ autoversion="false">
+ <fileset dir="${res}"
+ excludes="**/distribution.policy.s60" />
+ </wtkpackage>
+ </target>
</project>
\ No newline at end of file
--- a/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/FormStringItemTests.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/FormStringItemTests.java Fri Oct 29 11:49:32 2010 +0300
@@ -155,13 +155,13 @@
*/
public void commandAction(Command c, Displayable s)
{
- if (c == cmdBack)
+ if(c == cmdBack)
{
label.setString(null);
text.setString(null);
Display.getDisplay(m).setCurrent(this);
}
- else if (c == cmdLongText)
+ else if(c == cmdLongText)
{
String longString = "This is a really long string. Check that you can successfully" +
" read the last line (congratulations).\n" +
@@ -208,69 +208,69 @@
stringItemForm.append(si);
Display.getDisplay(m).setCurrent(stringItemForm);
}
- else if (c == cmdNext)
+ else if(c == cmdNext)
{
change++;
changeForm();
}
- else if (c == cmdRemoveCommand)
+ else if(c == cmdRemoveCommand)
{
Item item = null;
item = stringItemForm.get(0);
item.removeCommand(cmdUnlock);
item.removeCommand(cmdItem);
}
- else if (c == cmdRestoreCommand)
+ else if(c == cmdRestoreCommand)
{
Item item = null;
item = stringItemForm.get(0);
item.addCommand(cmdUnlock);
item.setDefaultCommand(cmdItem);
}
- else if (c == cmdRemoveItem)
+ else if(c == cmdRemoveItem)
{
stringItemForm.delete(0);
}
- else if (c == cmdLayout)
+ else if(c == cmdLayout)
{
layoutTest(Item.PLAIN);
}
- else if (c == cmdLayoutHL)
+ else if(c == cmdLayoutHL)
{
layoutTest(Item.HYPERLINK);
}
- else if (c == cmdLayoutButton)
+ else if(c == cmdLayoutButton)
{
layoutTest(Item.BUTTON);
}
- else if (c == cmdVLayout)
+ else if(c == cmdVLayout)
{
verticalLayoutTest(Item.PLAIN);
}
- else if (c == cmdVLayoutHL)
+ else if(c == cmdVLayoutHL)
{
verticalLayoutTest(Item.HYPERLINK);
}
- else if (c == cmdVLayoutButton)
+ else if(c == cmdVLayoutButton)
{
verticalLayoutTest(Item.BUTTON);
}
- else if (c == cmdAddListeners)
+ else if(c == cmdAddListeners)
{
int size = stringItemForm.size();
- for (int i = 0; i < size; i++)
+ for(int i = 0; i < size; i++)
{
Item item = null;
item = stringItemForm.get(i);
item.setItemCommandListener(this);
}
}
- else if (c == cmdExit)
+ else if(c == cmdExit)
{
m.destroyApp(false);
m.notifyDestroyed();
}
- else if (c == cmdScreenF)
+ else if(c == cmdScreenF)
{
stringItemForm.addCommand(cmdItemF);
stringItemForm.addCommand(cmdOkF);
@@ -283,68 +283,68 @@
String lo = cg.getString(index);
int layout = 0;
- if (c == cmdCreate)
+ if(c == cmdCreate)
si = new StringItem(l, t);
- else if (c == cmdCreateHL || c == cmdCreateHLM)
+ else if(c == cmdCreateHL || c == cmdCreateHLM)
{
si = new StringItem(l, t, Item.HYPERLINK);
si.setDefaultCommand(cmdItem);
}
- else if (c == cmdCreateButton || c == cmdCreateButtonM)
+ else if(c == cmdCreateButton || c == cmdCreateButtonM)
{
si = new StringItem(l, t, Item.BUTTON);
si.setDefaultCommand(cmdItem);
}
- if (lo.equals(cgTypes[0]))
+ if(lo.equals(cgTypes[0]))
{
layout = Item.LAYOUT_DEFAULT;
}
- else if (lo.equals(cgTypes[1]))
+ else if(lo.equals(cgTypes[1]))
{
layout = Item.LAYOUT_LEFT;
}
- else if (lo.equals(cgTypes[2]))
+ else if(lo.equals(cgTypes[2]))
{
layout = Item.LAYOUT_RIGHT;
}
- else if (lo.equals(cgTypes[3]))
+ else if(lo.equals(cgTypes[3]))
{
layout = Item.LAYOUT_CENTER;
}
- else if (lo.equals(cgTypes[4]))
+ else if(lo.equals(cgTypes[4]))
{
layout = Item.LAYOUT_TOP;
}
- else if (lo.equals(cgTypes[5]))
+ else if(lo.equals(cgTypes[5]))
{
layout = Item.LAYOUT_BOTTOM;
}
- else if (lo.equals(cgTypes[6]))
+ else if(lo.equals(cgTypes[6]))
{
layout = Item.LAYOUT_VCENTER;
}
- else if (lo.equals(cgTypes[7]))
+ else if(lo.equals(cgTypes[7]))
{
layout = Item.LAYOUT_NEWLINE_BEFORE;
}
- else if (lo.equals(cgTypes[8]))
+ else if(lo.equals(cgTypes[8]))
{
layout = Item.LAYOUT_NEWLINE_AFTER;
}
- else if (lo.equals(cgTypes[9]))
+ else if(lo.equals(cgTypes[9]))
{
layout = Item.LAYOUT_SHRINK;
}
- else if (lo.equals(cgTypes[10]))
+ else if(lo.equals(cgTypes[10]))
{
layout = Item.LAYOUT_VSHRINK;
}
- else if (lo.equals(cgTypes[11]))
+ else if(lo.equals(cgTypes[11]))
{
layout = Item.LAYOUT_EXPAND;
}
- else if (lo.equals(cgTypes[12]))
+ else if(lo.equals(cgTypes[12]))
{
layout = Item.LAYOUT_VEXPAND;
}
@@ -355,7 +355,7 @@
stringItemForm.addCommand(cmdRemoveCommand);
stringItemForm.addCommand(cmdRestoreCommand);
stringItemForm.addCommand(cmdRemoveItem);
- if (c == cmdCreateButtonM || c == cmdCreateHLM)
+ if(c == cmdCreateButtonM || c == cmdCreateHLM)
{
si.addCommand(cmdBack);
}
@@ -364,32 +364,32 @@
}
public void commandAction(Command c, Item i)
{
- if (c == cmdBack)
+ if(c == cmdBack)
{
label.setString(null);
text.setString(null);
Display.getDisplay(m).setCurrent(this);
}
- else if (c == cmdUnlock)
+ else if(c == cmdUnlock)
{
i.setPreferredSize(-1,-1);
}
- else if (c == cmdItem)
+ else if(c == cmdItem)
{
i.setLabel(i.getLabel() + ".");
}
}
private void setSize(String width, String height)
{
- if (width.equals("") && height.equals(""))
+ if(width.equals("") && height.equals(""))
{
si.setPreferredSize(-1,-1);
}
- else if (height.equals(""))
+ else if(height.equals(""))
{
si.setPreferredSize(Integer.parseInt(width),-1);
}
- else if (width.equals(""))
+ else if(width.equals(""))
{
si.setPreferredSize(-1,Integer.parseInt(height));
}
@@ -417,7 +417,7 @@
si5.setLayout(StringItem.LAYOUT_EXPAND | StringItem.LAYOUT_NEWLINE_BEFORE);
si5.setDefaultCommand(cmdBack);
- if (mode != Item.PLAIN)
+ if(mode != Item.PLAIN)
{
si.setDefaultCommand(cmdBack);
si2.setDefaultCommand(cmdBack);
@@ -438,7 +438,7 @@
stringItemForm.deleteAll();
si = new StringItem("Default","String",mode);
Spacer sp = new Spacer(10, this.getHeight());
- if (mode != Item.PLAIN)
+ if(mode != Item.PLAIN)
{
si.setDefaultCommand(cmdBack);
}
@@ -451,7 +451,7 @@
private void changeForm()
{
- switch (change)
+ switch(change)
{
case -1:
stringItemForm.setTitle("Default");
--- a/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests1.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests1.java Fri Oct 29 11:49:32 2010 +0300
@@ -54,6 +54,8 @@
// Commands for the StringItems
private Command cmdItem1 = new Command("Itemcommand1", Command.ITEM, 1);
private Command cmdItem2 = new Command("Itemcommand2", Command.ITEM, 1);
+ // Command to exit the MIDlet
+ private Command cmdExit = new Command("Exit", Command.EXIT, 1);
/**
* Signals the MIDlet to start and enter the Active state.
@@ -75,6 +77,7 @@
stringItemForm.addCommand(cmd07);
stringItemForm.addCommand(cmd08);
stringItemForm.addCommand(cmd09);
+ stringItemForm.addCommand(cmdExit);
stringItemForm.setCommandListener(this);
Display.getDisplay(this).setCurrent(stringItemForm);
}
@@ -103,14 +106,14 @@
*/
public void commandAction(Command c, Displayable s)
{
- if (c == cmdSI1)
+ if(c == cmdSI1)
{
// Plain type
stringItemForm.deleteAll();
si = new StringItem("Label", "Text");
stringItemForm.append(si);
}
- else if (c == cmdSI2)
+ else if(c == cmdSI2)
{
// Hyperlink type
stringItemForm.deleteAll();
@@ -120,7 +123,7 @@
si.addCommand(cmdItem2);
si.setItemCommandListener(this);
}
- else if (c == cmdSI3)
+ else if(c == cmdSI3)
{
// Button type
stringItemForm.deleteAll();
@@ -130,22 +133,22 @@
si.addCommand(cmdItem2);
si.setItemCommandListener(this);
}
- else if (c == cmd01)
+ else if(c == cmd01)
{
si.setLabel("This is the label");
si.setText("This is the text.");
}
- else if (c == cmd02)
+ else if(c == cmd02)
{
si.setLabel("");
si.setText("This is the text.");
}
- else if (c == cmd03)
+ else if(c == cmd03)
{
si.setLabel(" ");
si.setText("This is the text.");
}
- else if (c == cmd04)
+ else if(c == cmd04)
{
si.setLabel("This is the label");
si.setText("This is a very long text. " +
@@ -156,27 +159,27 @@
"This is a very long text. " +
"This is a very long text.");
}
- else if (c == cmd05)
+ else if(c == cmd05)
{
si.setLabel("Label with 1\nnewline char");
si.setText("This is the text.");
}
- else if (c == cmd06)
+ else if(c == cmd06)
{
si.setLabel("Label with 2\n\nnewline chars");
si.setText("This is the text.");
}
- else if (c == cmd07)
+ else if(c == cmd07)
{
si.setLabel("This is the label");
si.setText("Text with 1\nnewline char.");
}
- else if (c == cmd08)
+ else if(c == cmd08)
{
si.setLabel("This is the label");
si.setText("Text with 2\n\nnewline chars.");
}
- else if (c == cmd09)
+ else if(c == cmd09)
{
si.setText("This is the text.");
si.setLabel("This is a very long label. " +
@@ -187,6 +190,10 @@
"This is a very long label. " +
"This is a very long label.");
}
+ else if(c == cmdExit)
+ {
+ this.notifyDestroyed();
+ }
}
public void commandAction(Command c, Item i)
--- a/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests2.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_StringItem_01/src/StringItemTests2.java Fri Oct 29 11:49:32 2010 +0300
@@ -63,6 +63,8 @@
// Commands for the StringItems
private Command cmdItem1 = new Command("Itemcommand1", Command.ITEM, 1);
private Command cmdItem2 = new Command("Itemcommand2", Command.ITEM, 1);
+ // Command to exit the MIDlet
+ private Command cmdExit = new Command("Exit", Command.EXIT, 1);
/**
* Signals the MIDlet to start and enter the Active state.
@@ -81,6 +83,7 @@
mainForm.addCommand(cmdAdd);
mainForm.addCommand(cmdForward);
+ mainForm.addCommand(cmdExit);
mainForm.setCommandListener(this);
stringItemForm.addCommand(cmdBack);
stringItemForm.addCommand(cmdClear);
@@ -112,17 +115,17 @@
*/
public void commandAction(Command c, Displayable s)
{
- if (c == cmdAdd)
+ if(c == cmdAdd)
{
// Create correct type of stringitem
int index = cgType.getSelectedIndex();
- if (index == 0)
+ if(index == 0)
si = new StringItem("", "", Item.PLAIN);
else
{
- if (index == 1)
+ if(index == 1)
si = new StringItem("", "", Item.HYPERLINK);
- else if (index == 2)
+ else if(index == 2)
si = new StringItem("", "", Item.BUTTON);
si.addCommand(cmdItem1);
si.addCommand(cmdItem2);
@@ -131,7 +134,7 @@
// Set the label
index = cgLabel.getSelectedIndex();
- if (index == 0)
+ if(index == 0)
si.setLabel("");
else
si.setLabel(cgLabel.getString(index));
@@ -142,18 +145,22 @@
Display.getDisplay(this).setCurrent(stringItemForm);
}
- else if (c == cmdBack)
+ else if(c == cmdBack)
{
Display.getDisplay(this).setCurrent(mainForm);
}
- else if (c == cmdClear)
+ else if(c == cmdClear)
{
stringItemForm.deleteAll();
}
- else if (c == cmdForward)
+ else if(c == cmdForward)
{
Display.getDisplay(this).setCurrent(stringItemForm);
}
+ else if(c == cmdExit)
+ {
+ this.notifyDestroyed();
+ }
}
public void commandAction(Command c, Item i)
--- a/javauis/tsrc/fute/lcdui/Midp_TextBox_01/build.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_01/build.xml Fri Oct 29 11:49:32 2010 +0300
@@ -28,10 +28,65 @@
<property name="midlet.permissions" value=""/>
<property name="package.name" value="Midp_TextBox_01"/>
<property name="company.name" value="Nokia"/>
- <property name="midlet.version" value="1.2"/>
+ <property name="midlet.version" value="1.3"/>
<property name="midlet.description" value=""/>
- <!-- Get settings for a basic MIDlet. -->
- <import file="../../properties-basic-midlet.xml"/>
+ <!-- Package Preverifed classes, resources and MANIFEST file -->
+ <target name="pack" depends="preverify">
+ <wtkjad jadfile="${bin}/${package.name}.jad"
+ jarfile="${bin}/${package.name}.jar"
+ update="true"
+ config="1.1"
+ profile="2.1"
+ manifest="${bin}/MANIFEST.MF"
+ name="${package.name}"
+ vendor="${company.name}">
+ <attribute name="MIDlet-Permissions" value="${midlet.permissions}"/>
+ <attribute name="MicroEdition-Profile" value="MIDP-2.1"/>
+ <attribute name="MicroEdition-Configuration" value="CLDC-1.1"/>
+ <attribute name="MIDlet-Version" value="${midlet.version}"/>
+ <attribute name="MIDlet-Description" value="${midlet.description}"/>
+ <midlet name="${midlet1.name}" icon="${midlet1.icon.name}" class="${midlet1.package.name}" />
+ </wtkjad>
+
+ <wtkjad jadfile="${bin}/${package.name}_fullscreen.jad"
+ jarfile="${bin}/${package.name}.jar"
+ update="true"
+ config="1.1"
+ profile="2.1"
+ manifest="${bin}/MANIFEST.MF"
+ name="${package.name}"
+ vendor="${company.name}">
+ <attribute name="MIDlet-Permissions" value="${midlet.permissions}"/>
+ <attribute name="MicroEdition-Profile" value="MIDP-2.1"/>
+ <attribute name="MicroEdition-Configuration" value="CLDC-1.1"/>
+ <attribute name="MIDlet-Version" value="${midlet.version}"/>
+ <attribute name="MIDlet-Description" value="${midlet.description}"/>
+ <attribute name="Nokia-UI-Enhancement" value="FullScreenTextBox"/>
+ <midlet name="${midlet1.name}" icon="${midlet1.icon.name}" class="${midlet1.package.name}" />
+ </wtkjad>
+
+ <wtkpackage
+ jarfile="${bin}/${package.name}.jar"
+ jadfile="${bin}/${package.name}.jad"
+ classpath="${project.class.path}"
+ basedir="${prever}"
+ autoversion="false">
+ <fileset dir="${res}"
+ excludes="**/distribution.policy.s60" />
+ </wtkpackage>
+
+ <wtkpackage
+ jarfile="${bin}/${package.name}.jar"
+ jadfile="${bin}/${package.name}_fullscreen.jad"
+ classpath="${project.class.path}"
+ basedir="${prever}"
+ autoversion="false">
+ <exclude_from_manifest name="Nokia-UI-Enhancement"/>
+ <fileset dir="${res}"
+ excludes="**/distribution.policy.s60" />
+ </wtkpackage>
+
+ </target>
</project>
\ No newline at end of file
--- a/javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/ScreenTextBoxTests.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_TextBox_01/src/ScreenTextBoxTests.java Fri Oct 29 11:49:32 2010 +0300
@@ -226,6 +226,7 @@
listConstraints.setCommandListener(this);
listConstraints.addCommand(cmdBack);
listConstraints.addCommand(cmdOk);
+ listConstraints.setSelectCommand(cmdOk);
Display.getDisplay(parent).setCurrent(listConstraints);
}
--- a/javauis/tsrc/fute/lcdui/Midp_TextField_05/build.xml Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_05/build.xml Fri Oct 29 11:49:32 2010 +0300
@@ -28,7 +28,7 @@
<property name="midlet.permissions" value=""/>
<property name="package.name" value="Midp_TextField_05"/>
<property name="company.name" value="Nokia"/>
- <property name="midlet.version" value="1.1"/>
+ <property name="midlet.version" value="1.2"/>
<property name="midlet.description" value="This is a test MIDlet to test TextField initial input modes."/>
<!-- Get settings for a basic MIDlet. -->
--- a/javauis/tsrc/fute/lcdui/Midp_TextField_05/src/TextFieldTests.java Fri Oct 15 12:29:39 2010 +0300
+++ b/javauis/tsrc/fute/lcdui/Midp_TextField_05/src/TextFieldTests.java Fri Oct 29 11:49:32 2010 +0300
@@ -150,10 +150,10 @@
tf4.setInitialInputMode("UCB_HEBREW");
tf5.setLabel("UCB_ARABIC");
- tf4.setInitialInputMode("UCB_ARABIC");
+ tf5.setInitialInputMode("UCB_ARABIC");
tf6.setLabel("UCB_THAI");
- tf4.setInitialInputMode("UCB_THAI");
+ tf6.setInitialInputMode("UCB_THAI");
append(tf1);
append(tf2);
append(tf3);
@@ -188,10 +188,10 @@
tf4.setInitialInputMode("IS_FULLWIDTH_LATIN");
tf5.setLabel("IS_HALFWIDTH_KATAKANA");
- tf4.setInitialInputMode("IS_HALFWIDTH_KATAKANA");
+ tf5.setInitialInputMode("IS_HALFWIDTH_KATAKANA");
tf6.setLabel("IS_KANJI");
- tf4.setInitialInputMode("IS_KANJI");
+ tf6.setInitialInputMode("IS_KANJI");
append(tf1);
append(tf2);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/rom/java_2_2_S60_50.iby Fri Oct 29 11:49:32 2010 +0300
@@ -0,0 +1,421 @@
+/*
+* 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:
+* Image-description file of the Java package for ROFS1.
+* This version is for making S60 5.0 image that contains Jrt 2.2
+*/
+
+#ifndef __JAVA_IBY__
+#define __JAVA_IBY__
+
+#include <data_caging_paths_for_iby.hrh>
+
+// Helper defines
+define JAVA_RES_BLD ABI_DIR\BUILD_DIR\z\resource\java
+define JAVA_RES_IMG RESOURCE_FILES_DIR\java
+define JAVA_VM_RES_BLD JAVA_RES_BLD\jvm\lib\jrt
+define JAVA_VM_RES_IMG JAVA_RES_IMG\jvm\lib\jrt
+define JAVA_POLICY_BLD ABI_DIR\BUILD_DIR\z\resource\java\security\policies
+define JAVA_POLICY_IMG RESOURCE_FILES_DIR\java\security\policies
+
+
+///////////////////////////////////////////////////////////
+// 5.0 binaries needed by 3D, we must put these to ROM //
+///////////////////////////////////////////////////////////
+
+#include <egl.iby>
+#include <opengles.iby>
+
+
+////////////////////////////
+// Java Manager collection//
+////////////////////////////
+
+// stub sis
+data=ZSYSTEM\install\java.sis System\Install\java.sis
+
+
+// Captain
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_autostarter.dll SHARED_LIB_DIR\javacaptain_ext_autostarter.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_btdeviceclassmanager.dll SHARED_LIB_DIR\javacaptain_ext_btdeviceclassmanager.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_config.dll SHARED_LIB_DIR\javacaptain_ext_config.dll
+// file=ABI_DIR\BUILD_DIR\javacaptain_ext_ondemand_2.dll SHARED_LIB_DIR\javacaptain_ext_ondemand_2.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_ondemand_7.dll SHARED_LIB_DIR\javacaptain_ext_ondemand_7.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_preinstallerstarter.dll SHARED_LIB_DIR\javacaptain_ext_preinstallerstarter.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_pushregistryplugin.dll SHARED_LIB_DIR\javacaptain_ext_pushregistryplugin.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_storageserverplugin.dll SHARED_LIB_DIR\javacaptain_ext_storageserverplugin.dll
+file=ABI_DIR\BUILD_DIR\javacaptain_ext_settingslistener.dll SHARED_LIB_DIR\javacaptain_ext_settingslistener.dll
+file=ABI_DIR\BUILD_DIR\javacaptain.exe PROGRAMS_DIR\javacaptain.exe
+
+// Registry
+file=ABI_DIR\BUILD_DIR\javaregistryclient.dll SHARED_LIB_DIR\javaregistryclient.dll
+file=ABI_DIR\BUILD_DIR\javasizehelperclient.dll SHARED_LIB_DIR\javasizehelperclient.dll
+file=ABI_DIR\BUILD_DIR\javasizehelperserver.dll SHARED_LIB_DIR\javasizehelperserver.dll
+
+// Installer
+ECOM_PLUGIN(ifeui.dll,ifeui.rsc)
+data=ZRESOURCE\plugins\ifeui.rsc ECOM_RESOURCE_DIR\ifeui.rsc
+data=ZPRIVATE\10003a3f\apps\javainstaller_reg.rsc \private\10003a3f\import\apps\javainstaller_reg.rsc
+data=ZRESOURCE\apps\javainstaller_loc.rsc APP_RESOURCE_DIR\javainstaller_loc.rsc
+data=ZRESOURCE\apps\javainstaller_icon.mif APP_BITMAP_DIR\javainstaller_icon.mif
+file=ABI_DIR\BUILD_DIR\javainstaller.dll SHARED_LIB_DIR\javainstaller.dll
+data=JAVA_VM_RES_BLD\javainstallerui.odc JAVA_VM_RES_IMG\javainstallerui.odc
+file=ABI_DIR\BUILD_DIR\javainstallerui.dll SHARED_LIB_DIR\javainstallerui.dll
+data=JAVA_VM_RES_BLD\javainstaller.odc JAVA_VM_RES_IMG\javainstaller.odc
+file=ABI_DIR\BUILD_DIR\javainstallerstarter.dll PROGRAMS_DIR\javainstallerstarter.dll
+file=ABI_DIR\BUILD_DIR\javapreinstaller.dll PROGRAMS_DIR\javapreinstaller.dll
+data=ZRESOURCE\java\java_app.mif JAVA_RES_IMG\java_app.mif
+data=ZRESOURCE\java\java_trusted.png JAVA_RES_IMG\java_trusted.png
+data=ZRESOURCE\java\java_untrusted.png JAVA_RES_IMG\java_untrusted.png
+data=DATAZ_\private\102033E6\installer\inst_plugins.cfg \private\102033E6\installer\inst_plugins.cfg
+
+// Launchers
+file=ABI_DIR\BUILD_DIR\javalauncher.exe PROGRAMS_DIR\javalauncher.exe
+ECOM_PLUGIN(javaappschemeplugin.dll,javaappschemeplugin.rsc)
+data=ZRESOURCE\plugins\javaappschemeplugin.rsc ECOM_RESOURCE_DIR\javaappschemeplugin.rsc
+
+// SID Checker
+ECOM_PLUGIN(javasidchecker.dll,10281FBE.rsc)
+data=ZRESOURCE\plugins\javasidchecker.rsc ECOM_RESOURCE_DIR\javasidchecker.rsc
+
+// Recognizers
+ECOM_PLUGIN(recjar.dll, 102031FB.rsc)
+data=ZRESOURCE\plugins\recjar.rsc ECOM_RESOURCE_DIR\recjar.rsc
+
+// Backup & Restore
+file=ABI_DIR\BUILD_DIR\javabackup.exe PROGRAMS_DIR\javabackup.exe
+ECOM_PLUGIN(midp2backupplugin.dll,10282474.rsc)
+data=ZRESOURCE\plugins\midp2backupplugin.rsc ECOM_RESOURCE_DIR\midp2backupplugin.rsc
+data=DATAZ_\private\1028246F\backup_registration.xml \private\1028246F\backup_registration.xml
+data=DATAZ_\private\102033E6\backup_registration.xml \private\102033E6\backup_registration.xml
+
+
+/////////////////////////
+// Java UIs collection //
+/////////////////////////
+
+// CoreUi
+file=ABI_DIR\BUILD_DIR\javacoreui.dll SHARED_LIB_DIR\javacoreui.dll
+data=JAVA_VM_RES_BLD\javacoreui.odc JAVA_VM_RES_IMG\javacoreui.odc
+
+// eSWT
+file=ABI_DIR\BUILD_DIR\eswt.dll SHARED_LIB_DIR\eswt.dll
+data=JAVA_VM_RES_BLD\eswt.odc JAVA_VM_RES_IMG\eswt.odc
+file=ABI_DIR\BUILD_DIR\eswtphysics.dll SHARED_LIB_DIR\eswtphysics.dll
+file=ABI_DIR\BUILD_DIR\eswtapifacade.dll SHARED_LIB_DIR\eswtapifacade.dll
+file=ABI_DIR\BUILD_DIR\eswtdirectcontent.dll SHARED_LIB_DIR\eswtdirectcontent.dll
+data=JAVA_VM_RES_BLD\eswtdirectcontent.odc JAVA_VM_RES_IMG\eswtdirectcontent.odc
+data=ZPRIVATE\10003a3f\apps\eswt_reg.rsc \private\10003a3f\import\apps\eswt_reg.rsc
+
+// LCDUI
+file=ABI_DIR\BUILD_DIR\javalcdui.dll SHARED_LIB_DIR\javalcdui.dll
+data=JAVA_VM_RES_BLD\javalcdui.odc JAVA_VM_RES_IMG\javalcdui.odc
+file=ABI_DIR\BUILD_DIR\lcdui.dll SHARED_LIB_DIR\lcdui.dll
+file=ABI_DIR\BUILD_DIR\lcdgr.dll SHARED_LIB_DIR\lcdgr.dll
+file=ABI_DIR\BUILD_DIR\lcdgdrv.dll SHARED_LIB_DIR\lcdgdrv.dll
+file=ABI_DIR\BUILD_DIR\lcdgdrvi.dll SHARED_LIB_DIR\lcdgdrvi.dll
+file=ABI_DIR\BUILD_DIR\lcduiphysicswrap.dll SHARED_LIB_DIR\lcduiphysicswrap.dll
+ECOM_PLUGIN(LCDC4K.dll, 10208164.rsc)
+ECOM_PLUGIN(LCDC64K.dll, 10208162.rsc)
+ECOM_PLUGIN(LCDC16MU.dll, 10208166.rsc)
+ECOM_PLUGIN(LCDC16MA.dll, 10208168.rsc)
+data=ZRESOURCE\java\lcdgr.rsc JAVA_RES_IMG\lcdgr.rsc
+data=ZPRIVATE\10003a3f\apps\lcdui_reg.rsc \private\10003a3f\import\apps\lcdui_reg.rsc
+
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,lcdui)
+
+// AMMS API
+file=ABI_DIR\BUILD_DIR\javaamms.dll SHARED_LIB_DIR\javaamms.dll
+data=JAVA_VM_RES_BLD\javaamms.odc JAVA_VM_RES_IMG\javaamms.odc
+
+// Mobile Media API
+file=ABI_DIR\BUILD_DIR\javamobilemedia.dll SHARED_LIB_DIR\javamobilemedia.dll
+data=JAVA_VM_RES_BLD\javamobilemedia.odc JAVA_VM_RES_IMG\javamobilemedia.odc
+data=ABI_DIR\BUILD_DIR\z\system\sounds\digital\CamcorderJavaCapture.wav \System\Sounds\Digital\CamcorderJavaCapture.wav
+data=ABI_DIR\BUILD_DIR\z\system\sounds\digital\CamcorderJavaStart.wav \System\Sounds\Digital\CamcorderJavaStart.wav
+
+// MobInfo API
+file=ABI_DIR\BUILD_DIR\javamobinfo.dll SHARED_LIB_DIR\javamobinfo.dll
+data=JAVA_VM_RES_BLD\javamobinfo.odc JAVA_VM_RES_IMG\javamobinfo.odc
+
+// GlobalIndicators API
+file=ABI_DIR\BUILD_DIR\javaglobalindicators.dll SHARED_LIB_DIR\javaglobalindicators.dll
+data=JAVA_VM_RES_BLD\javaglobalindicators.odc JAVA_VM_RES_IMG\javaglobalindicators.odc
+
+// SoftNotification API
+file=ABI_DIR\BUILD_DIR\javasoftnotification.dll SHARED_LIB_DIR\javasoftnotification.dll
+data=JAVA_VM_RES_BLD\javasoftnotification.odc JAVA_VM_RES_IMG\javasoftnotification.odc
+
+// 2G API
+file=ABI_DIR\BUILD_DIR\javam2g.dll SHARED_LIB_DIR\javam2g.dll
+data=JAVA_VM_RES_BLD\javam2g.odc JAVA_VM_RES_IMG\javam2g.odc
+
+// 3G API
+file=ABI_DIR\BUILD_DIR\javam3g.dll SHARED_LIB_DIR\javam3g.dll
+data=JAVA_VM_RES_BLD\javam3g.odc JAVA_VM_RES_IMG\javam3g.odc
+
+// Nokia Sound API
+file=ABI_DIR\BUILD_DIR\javanokiasound.dll SHARED_LIB_DIR\javanokiasound.dll
+data=JAVA_VM_RES_BLD\javanokiasound.odc JAVA_VM_RES_IMG\javanokiasound.odc
+
+// Remote Connection Observer
+file=ABI_DIR\BUILD_DIR\javaremconobserver.dll SHARED_LIB_DIR\javaremconobserver.dll
+
+// Legacy utilities
+file=ABI_DIR\BUILD_DIR\javalegacyutils.dll SHARED_LIB_DIR\javalegacyutils.dll
+data=JAVA_VM_RES_BLD\javalegacyutils.odc JAVA_VM_RES_IMG\javalegacyutils.odc
+
+
+/////////////////////////////
+// Java Runtimes collection //
+/////////////////////////////
+
+// Runtime utilities
+file=ABI_DIR\BUILD_DIR\javaruntimeui.dll SHARED_LIB_DIR\javaruntimeui.dll
+data=JAVA_VM_RES_BLD\javaruntimeui.odc JAVA_VM_RES_IMG\javaruntimeui.odc
+file=ABI_DIR\BUILD_DIR\javaruntimestarterutils.dll SHARED_LIB_DIR\javaruntimestarterutils.dll
+file=ABI_DIR\BUILD_DIR\javastarter.dll SHARED_LIB_DIR\javastarter.dll
+
+// MIDP runtime
+//file=ABI_DIR\BUILD_DIR\javamidp.exe PROGRAMS_DIR\javamidp.exe
+file=ABI_DIR\BUILD_DIR\j9midps60.exe PROGRAMS_DIR\j9midps60.exe
+file=ABI_DIR\BUILD_DIR\javamidpstarter.dll SHARED_LIB_DIR\javamidpstarter.dll
+file=ABI_DIR\BUILD_DIR\javamidpruntime.dll SHARED_LIB_DIR\javamidpruntime.dll
+data=JAVA_VM_RES_BLD\javamidpruntime.odc JAVA_VM_RES_IMG\javamidpruntime.odc
+
+// An empty JVM argument modifier (to prevent 3rd parties from installing a DLL with this name)
+// To enable JVM argument modifier - comment 1st line below and uncomment 2nd line below
+file=ABI_DIR\BUILD_DIR\javajvmargsmodifier.dll SHARED_LIB_DIR\javajvmargsmodifier.dll
+//file=ABI_DIR\BUILD_DIR\javajvmargsmodifierfile.dll SHARED_LIB_DIR\javajvmargsmodifier.dll
+
+
+/////////////////////////////
+// Java Commons collection //
+/////////////////////////////
+
+// J9 JVM
+file=ABI_DIR\BUILD_DIR\j9.dll SHARED_LIB_DIR\j9.dll
+file=ABI_DIR\BUILD_DIR\j9vmall23.dll SHARED_LIB_DIR\j9vmall23.dll
+file=ABI_DIR\BUILD_DIR\j9mjit23.dll SHARED_LIB_DIR\j9mjit23.dll
+file=ABI_DIR\BUILD_DIR\jclcldc11_23.dll SHARED_LIB_DIR\jclcldc11_23.dll
+file=ABI_DIR\BUILD_DIR\jclcdc11_23.dll SHARED_LIB_DIR\jclcdc11_23.dll
+file=ABI_DIR\BUILD_DIR\j9fdm23.dll SHARED_LIB_DIR\j9fdm23.dll
+file=ABI_DIR\BUILD_DIR\JvmNativePort.dll SHARED_LIB_DIR\JvmNativePort.dll
+data=JAVA_RES_BLD\jvm\bin\java.properties JAVA_RES_IMG\jvm\bin\java.properties
+data=JAVA_RES_BLD\jvm\lib\security\java.policy JAVA_RES_IMG\jvm\lib\security\java.policy
+data=JAVA_RES_BLD\jvm\lib\security\java.security JAVA_RES_IMG\jvm\lib\security\java.security
+
+// Utilities
+file=ABI_DIR\BUILD_DIR\javautils.dll SHARED_LIB_DIR\javautils.dll
+data=JAVA_VM_RES_BLD\javautils.odc JAVA_VM_RES_IMG\javautils.odc
+file=ABI_DIR\BUILD_DIR\javacomms.dll SHARED_LIB_DIR\javacomms.dll
+data=JAVA_VM_RES_BLD\javacomms.odc JAVA_VM_RES_IMG\javacomms.odc
+file=ABI_DIR\BUILD_DIR\javaipc.dll SHARED_LIB_DIR\javaipc.dll
+file=ABI_DIR\BUILD_DIR\javafileutils.dll SHARED_LIB_DIR\javafileutils.dll
+data=JAVA_VM_RES_BLD\javafileutils.odc JAVA_VM_RES_IMG\javafileutils.odc
+file=ABI_DIR\BUILD_DIR\javadebugapi.dll SHARED_LIB_DIR\javadebugapi.dll
+
+// Security dlls
+file=ABI_DIR\BUILD_DIR\javasecurity.dll SHARED_LIB_DIR\javasecurity.dll
+data=JAVA_VM_RES_BLD\javasecurity.odc JAVA_VM_RES_IMG\javasecurity.odc
+ECOM_PLUGIN(javaunicertstoreplugin.dll,200213A3.rsc)
+data=ZRESOURCE\plugins\javaunicertstoreplugin.rsc ECOM_RESOURCE_DIR\javaunicertstoreplugin.rsc
+
+// Security certs & policies
+data=JAVA_POLICY_BLD\s60_manufacturer.ser JAVA_POLICY_IMG\s60_manufacturer.ser
+data=JAVA_POLICY_BLD\s60_operator.ser JAVA_POLICY_IMG\s60_operator.ser
+data=JAVA_POLICY_BLD\s60_trustedthirdparty.ser JAVA_POLICY_IMG\s60_trustedthirdparty.ser
+data=JAVA_POLICY_BLD\s60_untrusted.ser JAVA_POLICY_IMG\s60_untrusted.ser
+data=JAVA_POLICY_BLD\msa_manufacturer.ser JAVA_POLICY_IMG\msa_manufacturer.ser
+data=JAVA_POLICY_BLD\msa_operator.ser JAVA_POLICY_IMG\msa_operator.ser
+data=JAVA_POLICY_BLD\msa_trustedthirdparty.ser JAVA_POLICY_IMG\msa_trustedthirdparty.ser
+data=JAVA_POLICY_BLD\msa_untrusted.ser JAVA_POLICY_IMG\msa_untrusted.ser
+data=JAVA_POLICY_BLD\att_manufacturer.ser JAVA_POLICY_IMG\att_manufacturer.ser
+data=JAVA_POLICY_BLD\att_operator.ser JAVA_POLICY_IMG\att_operator.ser
+data=JAVA_POLICY_BLD\att_operatorextra.ser JAVA_POLICY_IMG\att_operatorextra.ser
+data=JAVA_POLICY_BLD\att_trustedthirdparty.ser JAVA_POLICY_IMG\att_trustedthirdparty.ser
+data=JAVA_POLICY_BLD\att_untrusted.ser JAVA_POLICY_IMG\att_untrusted.ser
+data=JAVA_POLICY_BLD\all.ser JAVA_POLICY_IMG\all.ser
+
+
+// Java environment info
+file=ABI_DIR\BUILD_DIR\javaenvinfo.dll SHARED_LIB_DIR\javaenvinfo.dll
+data=ABI_DIR\BUILD_DIR\Z\Resource\versions\java.txt RESOURCE_FILES_DIR\versions\java.txt
+
+// Storage
+file=ABI_DIR\BUILD_DIR\javastorage.dll SHARED_LIB_DIR\javastorage.dll
+data=JAVA_VM_RES_BLD\javastorage.odc JAVA_VM_RES_IMG\javastorage.odc
+
+// GCF base
+file=ABI_DIR\BUILD_DIR\javagcf.dll SHARED_LIB_DIR\javagcf.dll
+data=JAVA_VM_RES_BLD\javagcf.odc JAVA_VM_RES_IMG\javagcf.odc
+
+// Connection Manager
+file=ABI_DIR\BUILD_DIR\javaconnectionmanager.dll SHARED_LIB_DIR\javaconnectionmanager.dll
+data=JAVA_VM_RES_BLD\javaconnectionmanager.odc JAVA_VM_RES_IMG\javaconnectionmanager.odc
+
+// Http & https protocols
+file=ABI_DIR\BUILD_DIR\javahttp.dll SHARED_LIB_DIR\javahttp.dll
+file=ABI_DIR\BUILD_DIR\javahttps.dll SHARED_LIB_DIR\javahttps.dll
+data=JAVA_VM_RES_BLD\javahttp.odc JAVA_VM_RES_IMG\javahttp.odc
+data=JAVA_VM_RES_BLD\javahttps.odc JAVA_VM_RES_IMG\javahttps.odc
+
+// Socket protocol
+file=ABI_DIR\BUILD_DIR\javasocket.dll SHARED_LIB_DIR\javasocket.dll
+file=ABI_DIR\BUILD_DIR\javasocketscplugin.dll SHARED_LIB_DIR\javasocketscplugin.dll
+data=JAVA_VM_RES_BLD\javasocket.odc JAVA_VM_RES_IMG\javasocket.odc
+
+// Secure socket protocol
+file=ABI_DIR\BUILD_DIR\javassl.dll SHARED_LIB_DIR\javassl.dll
+data=JAVA_VM_RES_BLD\javassl.odc JAVA_VM_RES_IMG\javassl.odc
+
+
+////////////////////////////////
+// Java Extensions collection //
+////////////////////////////////
+
+// Push
+file=ABI_DIR\BUILD_DIR\javapushcontroller.dll SHARED_LIB_DIR\javapushcontroller.dll
+file=ABI_DIR\BUILD_DIR\javapushregistry.dll SHARED_LIB_DIR\javapushregistry.dll
+data=JAVA_VM_RES_BLD\javapushregistry.odc JAVA_VM_RES_IMG\javapushregistry.odc
+
+// Bluetooth
+file=ABI_DIR\BUILD_DIR\javabluecove.dll SHARED_LIB_DIR\javabluecove.dll
+file=ABI_DIR\BUILD_DIR\javabluetooth.dll SHARED_LIB_DIR\javabluetooth.dll
+file=ABI_DIR\BUILD_DIR\javabluetoothcommons.dll SHARED_LIB_DIR\javabluetoothcommons.dll
+file=ABI_DIR\BUILD_DIR\javabtgoepscplugin.dll SHARED_LIB_DIR\javabtgoepscplugin.dll
+file=ABI_DIR\BUILD_DIR\javabtl2capscplugin.dll SHARED_LIB_DIR\javabtl2capscplugin.dll
+file=ABI_DIR\BUILD_DIR\javabtsppscplugin.dll SHARED_LIB_DIR\javabtsppscplugin.dll
+data=JAVA_VM_RES_BLD\javabluecove.odc JAVA_VM_RES_IMG\javabluecove.odc
+data=JAVA_VM_RES_BLD\javabluetooth.odc JAVA_VM_RES_IMG\javabluetooth.odc
+data=JAVA_VM_RES_BLD\javabluetoothcommons.odc JAVA_VM_RES_IMG\javabluetoothcommons.odc
+
+// WMA
+file=ABI_DIR\BUILD_DIR\javawma.dll SHARED_LIB_DIR\javawma.dll
+file=ABI_DIR\BUILD_DIR\javawmamms.dll SHARED_LIB_DIR\javawmamms.dll
+file=ABI_DIR\BUILD_DIR\javacbsscplugin.dll SHARED_LIB_DIR\javacbsscplugin.dll
+file=ABI_DIR\BUILD_DIR\javammsscplugin.dll SHARED_LIB_DIR\javammsscplugin.dll
+file=ABI_DIR\BUILD_DIR\javasmsscplugin.dll SHARED_LIB_DIR\javasmsscplugin.dll
+data=JAVA_VM_RES_BLD\javawma.odc JAVA_VM_RES_IMG\javawma.odc
+data=JAVA_VM_RES_BLD\javawmamms.odc JAVA_VM_RES_IMG\javawmamms.odc
+
+// Comm
+file=ABI_DIR\BUILD_DIR\javacomm.dll SHARED_LIB_DIR\javacomm.dll
+data=JAVA_VM_RES_BLD\javacomm.odc JAVA_VM_RES_IMG\javacomm.odc
+
+// Datagram
+file=ABI_DIR\BUILD_DIR\javadatagram.dll SHARED_LIB_DIR\javadatagram.dll
+file=ABI_DIR\BUILD_DIR\javadatagramscplugin.dll SHARED_LIB_DIR\javadatagramscplugin.dll
+data=JAVA_VM_RES_BLD\javadatagram.odc JAVA_VM_RES_IMG\javadatagram.odc
+
+// Location API
+file=ABI_DIR\BUILD_DIR\javalocation.dll SHARED_LIB_DIR\javalocation.dll
+data=JAVA_VM_RES_BLD\javalocation.odc JAVA_VM_RES_IMG\javalocation.odc
+
+// Sensor API
+file=ABI_DIR\BUILD_DIR\javasensor.dll SHARED_LIB_DIR\javasensor.dll
+data=JAVA_VM_RES_BLD\javasensor.odc JAVA_VM_RES_IMG\javasensor.odc
+
+// Web services API
+file=ABI_DIR\BUILD_DIR\javawebservices.dll SHARED_LIB_DIR\javawebservices.dll
+data=JAVA_VM_RES_BLD\javawebservices.odc JAVA_VM_RES_IMG\javawebservices.odc
+
+// PIM API
+file=ABI_DIR\BUILD_DIR\javapim.dll SHARED_LIB_DIR\javapim.dll
+data=JAVA_VM_RES_BLD\javapim.odc JAVA_VM_RES_IMG\javapim.odc
+
+// RMS API
+file=ABI_DIR\BUILD_DIR\javarms.dll SHARED_LIB_DIR\javarms.dll
+data=JAVA_VM_RES_BLD\javarms.odc JAVA_VM_RES_IMG\javarms.odc
+
+// SATSA API
+file=ABI_DIR\BUILD_DIR\javasatsa.dll SHARED_LIB_DIR\javasatsa.dll
+data=JAVA_VM_RES_BLD\javasatsa.odc JAVA_VM_RES_IMG\javasatsa.odc
+
+// File API
+file=ABI_DIR\BUILD_DIR\javafile.dll SHARED_LIB_DIR\javafile.dll
+data=JAVA_VM_RES_BLD\javafile.odc JAVA_VM_RES_IMG\javafile.odc
+
+// IAP Info API
+file=ABI_DIR\BUILD_DIR\javaiapinfo.dll SHARED_LIB_DIR\javaiapinfo.dll
+data=JAVA_VM_RES_BLD\javaiapinfo.odc JAVA_VM_RES_IMG\javaiapinfo.odc
+
+
+///////////////////
+// Miscellaneous //
+///////////////////
+
+// Generated localization file resources
+data=JAVA_VM_RES_BLD\resources.jar JAVA_VM_RES_IMG\resources.jar
+
+// ODC list files
+data=ZRESOURCE\java\midpOdcList JAVA_RES_IMG\midpodclist
+data=ZRESOURCE\java\installerOdcList JAVA_RES_IMG\installerodclist
+data=ZRESOURCE\java\tckRunnerOdcList JAVA_RES_IMG\tckrunnerodclist
+data=ZRESOURCE\java\javacontrolpanelodclist JAVA_RES_IMG\javacontrolpanelodclist
+
+// trust roots list
+data=ZRESOURCE\java\security\trustroots\midprootslist JAVA_RES_IMG\security\trustroots\midprootslist
+
+// Utility for Services team
+// file=ABI_DIR\BUILD_DIR\javaupgradeapp.exe PROGRAMS_DIR\javaupgradeapp.exe
+
+
+////////////////////////////////
+// Old Java binaries //
+////////////////////////////////
+
+file=ABI_DIR\BUILD_DIR\JcfUtils.dll SHARED_LIB_DIR\JcfUtils.dll
+file=ABI_DIR\BUILD_DIR\javadrmutils.dll SHARED_LIB_DIR\javadrmutils.dll
+file=ABI_DIR\BUILD_DIR\javalogger.dll SHARED_LIB_DIR\javalogger.dll
+
+file=ABI_DIR\BUILD_DIR\javareader.dll SHARED_LIB_DIR\javareader.dll
+file=ABI_DIR\BUILD_DIR\jcfjadjarmatcher.dll SHARED_LIB_DIR\jcfjadjarmatcher.dll
+file=ABI_DIR\BUILD_DIR\jarfiledecoder.dll SHARED_LIB_DIR\jarfiledecoder.dll
+file=ABI_DIR\BUILD_DIR\javaregistrymidpclient.dll SHARED_LIB_DIR\javaregistrymidpclient.dll
+
+////////////////////////////////
+// 5.0 specific binaries //
+////////////////////////////////
+
+file=ABI_DIR\BUILD_DIR\javaafterflashconverter.exe PROGRAMS_DIR\javaafterflashconverter.exe
+file=ABI_DIR\BUILD_DIR\javausersettingsconfigurator.exe PROGRAMS_DIR\javausersettingsconfigurator.exe
+
+file=ABI_DIR\BUILD_DIR\Systemams.exe PROGRAMS_DIR\Systemams.exe
+
+file=ABI_DIR\BUILD_DIR\InstalledAppsRegistry.dll SHARED_LIB_DIR\InstalledAppsRegistry.dll
+file=ABI_DIR\BUILD_DIR\javaregistry.dll SHARED_LIB_DIR\javaregistry.dll
+
+file=ABI_DIR\BUILD_DIR\midp2cenrep.dll SHARED_LIB_DIR\midp2cenrep.dll
+
+file=ABI_DIR\BUILD_DIR\javaptivariation.dll SHARED_LIB_DIR\javaptivariation.dll
+
+file=ABI_DIR\BUILD_DIR\midp2permissiondb.dll SHARED_LIB_DIR\midp2permissiondb.dll
+file=ABI_DIR\BUILD_DIR\midp2userpreferences.dll SHARED_LIB_DIR\midp2userpreferences.dll
+
+file=ABI_DIR\BUILD_DIR\midp2securitypolicyV2.dll SHARED_LIB_DIR\midp2securitypolicyV2.dll
+
+
+// Needed by AppMngr
+#include <gtemailmtm.iby>
+
+// The Java 1.x security policy files formerly exported by MIDP20.iby
+data=ZRESOURCE\java\midp2securitypolicy\s60_rp.xpf \RESOURCE_FILES_DIR\java\midp2securitypolicy\s60_rp.xpf
+data=ZRESOURCE\java\midp2securitypolicy\msa_rp.xpf \RESOURCE_FILES_DIR\java\midp2securitypolicy\msa_rp.xpf
+
+// SystemAMS DBMS policy file
+data=ZPRIVATE\100012A5\policy\102045FE.spd \private\100012A5\policy\102045FE.spd
+
+
+#endif